{
  "version": 3,
  "sources": ["../package.json", "../lib/base/RestException.js", "../lib/http/response.js", "../lib/http/request.js", "../lib/base/RequestClient.js", "../lib/base/Domain.js", "../lib/base/Page.js", "../lib/base/deserialize.js", "../lib/base/values.js", "../lib/rest/accounts/v1/authTokenPromotion.js", "../lib/rest/accounts/v1/credential/aws.js", "../lib/rest/accounts/v1/credential/publicKey.js", "../lib/rest/accounts/v1/credential.js", "../lib/rest/accounts/v1/secondaryAuthToken.js", "../lib/base/Version.js", "../lib/rest/accounts/V1.js", "../lib/rest/Accounts.js", "../lib/rest/api/v2010/account/address/dependentPhoneNumber.js", "../lib/base/serialize.js", "../lib/rest/api/v2010/account/address.js", "../lib/rest/api/v2010/account/application.js", "../lib/rest/api/v2010/account/authorizedConnectApp.js", "../lib/rest/api/v2010/account/availablePhoneNumber/local.js", "../lib/rest/api/v2010/account/availablePhoneNumber/machineToMachine.js", "../lib/rest/api/v2010/account/availablePhoneNumber/mobile.js", "../lib/rest/api/v2010/account/availablePhoneNumber/national.js", "../lib/rest/api/v2010/account/availablePhoneNumber/sharedCost.js", "../lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js", "../lib/rest/api/v2010/account/availablePhoneNumber/voip.js", "../lib/rest/api/v2010/account/availablePhoneNumber.js", "../lib/rest/api/v2010/account/balance.js", "../lib/rest/api/v2010/account/call/event.js", "../lib/rest/api/v2010/account/call/feedback.js", "../lib/rest/api/v2010/account/call/feedbackSummary.js", "../lib/rest/api/v2010/account/call/notification.js", "../lib/rest/api/v2010/account/call/payment.js", "../lib/rest/api/v2010/account/call/recording.js", "../lib/rest/api/v2010/account/call/siprec.js", "../lib/rest/api/v2010/account/call/stream.js", "../lib/rest/api/v2010/account/call.js", "../lib/rest/api/v2010/account/conference/participant.js", "../lib/rest/api/v2010/account/conference/recording.js", "../lib/rest/api/v2010/account/conference.js", "../lib/rest/api/v2010/account/connectApp.js", "../lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js", "../lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js", "../lib/rest/api/v2010/account/incomingPhoneNumber/local.js", "../lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js", "../lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js", "../lib/rest/api/v2010/account/incomingPhoneNumber.js", "../lib/rest/api/v2010/account/key.js", "../lib/rest/api/v2010/account/message/feedback.js", "../lib/rest/api/v2010/account/message/media.js", "../lib/rest/api/v2010/account/message.js", "../lib/rest/api/v2010/account/newKey.js", "../lib/rest/api/v2010/account/newSigningKey.js", "../lib/rest/api/v2010/account/notification.js", "../lib/rest/api/v2010/account/outgoingCallerId.js", "../lib/rest/api/v2010/account/queue/member.js", "../lib/rest/api/v2010/account/queue.js", "../lib/rest/api/v2010/account/recording/addOnResult/payload.js", "../lib/rest/api/v2010/account/recording/addOnResult.js", "../lib/rest/api/v2010/account/recording/transcription.js", "../lib/rest/api/v2010/account/recording.js", "../lib/rest/api/v2010/account/shortCode.js", "../lib/rest/api/v2010/account/signingKey.js", "../lib/rest/api/v2010/account/sip/credentialList/credential.js", "../lib/rest/api/v2010/account/sip/credentialList.js", "../lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js", "../lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js", "../lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping.js", "../lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js", "../lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping.js", "../lib/rest/api/v2010/account/sip/domain/authTypes.js", "../lib/rest/api/v2010/account/sip/domain/credentialListMapping.js", "../lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js", "../lib/rest/api/v2010/account/sip/domain.js", "../lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js", "../lib/rest/api/v2010/account/sip/ipAccessControlList.js", "../lib/rest/api/v2010/account/sip.js", "../lib/rest/api/v2010/account/token.js", "../lib/rest/api/v2010/account/transcription.js", "../lib/rest/api/v2010/account/usage/record/allTime.js", "../lib/rest/api/v2010/account/usage/record/daily.js", "../lib/rest/api/v2010/account/usage/record/lastMonth.js", "../lib/rest/api/v2010/account/usage/record/monthly.js", "../lib/rest/api/v2010/account/usage/record/thisMonth.js", "../lib/rest/api/v2010/account/usage/record/today.js", "../lib/rest/api/v2010/account/usage/record/yearly.js", "../lib/rest/api/v2010/account/usage/record/yesterday.js", "../lib/rest/api/v2010/account/usage/record.js", "../lib/rest/api/v2010/account/usage/trigger.js", "../lib/rest/api/v2010/account/usage.js", "../lib/rest/api/v2010/account/validationRequest.js", "../lib/rest/api/v2010/account.js", "../lib/rest/api/V2010.js", "../lib/rest/Api.js", "../lib/rest/autopilot/v1/assistant/defaults.js", "../lib/rest/autopilot/v1/assistant/dialogue.js", "../lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js", "../lib/rest/autopilot/v1/assistant/fieldType.js", "../lib/rest/autopilot/v1/assistant/modelBuild.js", "../lib/rest/autopilot/v1/assistant/query.js", "../lib/rest/autopilot/v1/assistant/styleSheet.js", "../lib/rest/autopilot/v1/assistant/task/field.js", "../lib/rest/autopilot/v1/assistant/task/sample.js", "../lib/rest/autopilot/v1/assistant/task/taskActions.js", "../lib/rest/autopilot/v1/assistant/task/taskStatistics.js", "../lib/rest/autopilot/v1/assistant/task.js", "../lib/rest/autopilot/v1/assistant/webhook.js", "../lib/rest/autopilot/v1/assistant.js", "../lib/rest/autopilot/v1/restoreAssistant.js", "../lib/rest/autopilot/V1.js", "../lib/rest/Autopilot.js", "../lib/rest/chat/v1/credential.js", "../lib/rest/chat/v1/service/channel/invite.js", "../lib/rest/chat/v1/service/channel/member.js", "../lib/rest/chat/v1/service/channel/message.js", "../lib/rest/chat/v1/service/channel.js", "../lib/rest/chat/v1/service/role.js", "../lib/rest/chat/v1/service/user/userChannel.js", "../lib/rest/chat/v1/service/user.js", "../lib/rest/chat/v1/service.js", "../lib/rest/chat/V1.js", "../lib/rest/chat/v2/credential.js", "../lib/rest/chat/v2/service/binding.js", "../lib/rest/chat/v2/service/channel/invite.js", "../lib/rest/chat/v2/service/channel/member.js", "../lib/rest/chat/v2/service/channel/message.js", "../lib/rest/chat/v2/service/channel/webhook.js", "../lib/rest/chat/v2/service/channel.js", "../lib/rest/chat/v2/service/role.js", "../lib/rest/chat/v2/service/user/userBinding.js", "../lib/rest/chat/v2/service/user/userChannel.js", "../lib/rest/chat/v2/service/user.js", "../lib/rest/chat/v2/service.js", "../lib/rest/chat/V2.js", "../lib/rest/chat/v3/channel.js", "../lib/rest/chat/V3.js", "../lib/rest/Chat.js", "../lib/rest/conversations/v1/addressConfiguration.js", "../lib/rest/conversations/v1/configuration/webhook.js", "../lib/rest/conversations/v1/configuration.js", "../lib/rest/conversations/v1/conversation/message/deliveryReceipt.js", "../lib/rest/conversations/v1/conversation/message.js", "../lib/rest/conversations/v1/conversation/participant.js", "../lib/rest/conversations/v1/conversation/webhook.js", "../lib/rest/conversations/v1/conversation.js", "../lib/rest/conversations/v1/credential.js", "../lib/rest/conversations/v1/participantConversation.js", "../lib/rest/conversations/v1/role.js", "../lib/rest/conversations/v1/service/binding.js", "../lib/rest/conversations/v1/service/configuration/notification.js", "../lib/rest/conversations/v1/service/configuration/webhook.js", "../lib/rest/conversations/v1/service/configuration.js", "../lib/rest/conversations/v1/service/conversation/message/deliveryReceipt.js", "../lib/rest/conversations/v1/service/conversation/message.js", "../lib/rest/conversations/v1/service/conversation/participant.js", "../lib/rest/conversations/v1/service/conversation/webhook.js", "../lib/rest/conversations/v1/service/conversation.js", "../lib/rest/conversations/v1/service/participantConversation.js", "../lib/rest/conversations/v1/service/role.js", "../lib/rest/conversations/v1/service/user/userConversation.js", "../lib/rest/conversations/v1/service/user.js", "../lib/rest/conversations/v1/service.js", "../lib/rest/conversations/v1/user/userConversation.js", "../lib/rest/conversations/v1/user.js", "../lib/rest/conversations/V1.js", "../lib/rest/Conversations.js", "../lib/rest/events/v1/eventType.js", "../lib/rest/events/v1/schema/version.js", "../lib/rest/events/v1/schema.js", "../lib/rest/events/v1/sink/sinkTest.js", "../lib/rest/events/v1/sink/sinkValidate.js", "../lib/rest/events/v1/sink.js", "../lib/rest/events/v1/subscription/subscribedEvent.js", "../lib/rest/events/v1/subscription.js", "../lib/rest/events/V1.js", "../lib/rest/Events.js", "../lib/rest/fax/v1/fax/faxMedia.js", "../lib/rest/fax/v1/fax.js", "../lib/rest/fax/V1.js", "../lib/rest/Fax.js", "../lib/rest/flexApi/v1/channel.js", "../lib/rest/flexApi/v1/configuration.js", "../lib/rest/flexApi/v1/flexFlow.js", "../lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.js", "../lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.js", "../lib/rest/flexApi/v1/interaction/interactionChannel.js", "../lib/rest/flexApi/v1/interaction.js", "../lib/rest/flexApi/v1/webChannel.js", "../lib/rest/flexApi/V1.js", "../lib/rest/FlexApi.js", "../lib/rest/frontlineApi/v1/user.js", "../lib/rest/frontlineApi/V1.js", "../lib/rest/FrontlineApi.js", "../lib/rest/insights/v1/annotation.js", "../lib/rest/insights/v1/call/summary.js", "../lib/rest/insights/v1/call/event.js", "../lib/rest/insights/v1/call/metric.js", "../lib/rest/insights/v1/call.js", "../lib/rest/insights/v1/callSummaries.js", "../lib/rest/insights/v1/conference/conferenceParticipant.js", "../lib/rest/insights/v1/conference.js", "../lib/rest/insights/v1/room/participant.js", "../lib/rest/insights/v1/room.js", "../lib/rest/insights/v1/setting.js", "../lib/rest/insights/V1.js", "../lib/rest/Insights.js", "../lib/rest/ipMessaging/v1/credential.js", "../lib/rest/ipMessaging/v1/service/channel/invite.js", "../lib/rest/ipMessaging/v1/service/channel/member.js", "../lib/rest/ipMessaging/v1/service/channel/message.js", "../lib/rest/ipMessaging/v1/service/channel.js", "../lib/rest/ipMessaging/v1/service/role.js", "../lib/rest/ipMessaging/v1/service/user/userChannel.js", "../lib/rest/ipMessaging/v1/service/user.js", "../lib/rest/ipMessaging/v1/service.js", "../lib/rest/ipMessaging/V1.js", "../lib/rest/ipMessaging/v2/credential.js", "../lib/rest/ipMessaging/v2/service/binding.js", "../lib/rest/ipMessaging/v2/service/channel/invite.js", "../lib/rest/ipMessaging/v2/service/channel/member.js", "../lib/rest/ipMessaging/v2/service/channel/message.js", "../lib/rest/ipMessaging/v2/service/channel/webhook.js", "../lib/rest/ipMessaging/v2/service/channel.js", "../lib/rest/ipMessaging/v2/service/role.js", "../lib/rest/ipMessaging/v2/service/user/userBinding.js", "../lib/rest/ipMessaging/v2/service/user/userChannel.js", "../lib/rest/ipMessaging/v2/service/user.js", "../lib/rest/ipMessaging/v2/service.js", "../lib/rest/ipMessaging/V2.js", "../lib/rest/IpMessaging.js", "../lib/rest/lookups/v1/phoneNumber.js", "../lib/rest/lookups/V1.js", "../lib/rest/Lookups.js", "../lib/rest/media/v1/mediaProcessor.js", "../lib/rest/media/v1/mediaRecording.js", "../lib/rest/media/v1/playerStreamer/playbackGrant.js", "../lib/rest/media/v1/playerStreamer.js", "../lib/rest/media/V1.js", "../lib/rest/Media.js", "../lib/rest/messaging/v1/brandRegistration/brandVetting.js", "../lib/rest/messaging/v1/brandRegistration.js", "../lib/rest/messaging/v1/deactivation.js", "../lib/rest/messaging/v1/externalCampaign.js", "../lib/rest/messaging/v1/service/alphaSender.js", "../lib/rest/messaging/v1/service/phoneNumber.js", "../lib/rest/messaging/v1/service/shortCode.js", "../lib/rest/messaging/v1/service/usAppToPerson.js", "../lib/rest/messaging/v1/service/usAppToPersonUsecase.js", "../lib/rest/messaging/v1/service.js", "../lib/rest/messaging/v1/usecase.js", "../lib/rest/messaging/V1.js", "../lib/rest/Messaging.js", "../lib/rest/monitor/v1/alert.js", "../lib/rest/monitor/v1/event.js", "../lib/rest/monitor/V1.js", "../lib/rest/Monitor.js", "../lib/rest/notify/v1/credential.js", "../lib/rest/notify/v1/service/binding.js", "../lib/rest/notify/v1/service/notification.js", "../lib/rest/notify/v1/service.js", "../lib/rest/notify/V1.js", "../lib/rest/Notify.js", "../lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.js", "../lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.js", "../lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js", "../lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.js", "../lib/rest/numbers/v2/regulatoryCompliance/bundle.js", "../lib/rest/numbers/v2/regulatoryCompliance/endUser.js", "../lib/rest/numbers/v2/regulatoryCompliance/endUserType.js", "../lib/rest/numbers/v2/regulatoryCompliance/regulation.js", "../lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js", "../lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js", "../lib/rest/numbers/v2/regulatoryCompliance.js", "../lib/rest/numbers/V2.js", "../lib/rest/Numbers.js", "../lib/rest/preview/bulk_exports/exportConfiguration.js", "../lib/rest/preview/bulk_exports/export/day.js", "../lib/rest/preview/bulk_exports/export/exportCustomJob.js", "../lib/rest/preview/bulk_exports/export/job.js", "../lib/rest/preview/bulk_exports/export.js", "../lib/rest/preview/BulkExports.js", "../lib/rest/preview/deployed_devices/fleet/certificate.js", "../lib/rest/preview/deployed_devices/fleet/deployment.js", "../lib/rest/preview/deployed_devices/fleet/device.js", "../lib/rest/preview/deployed_devices/fleet/key.js", "../lib/rest/preview/deployed_devices/fleet.js", "../lib/rest/preview/DeployedDevices.js", "../lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.js", "../lib/rest/preview/hosted_numbers/authorizationDocument.js", "../lib/rest/preview/hosted_numbers/hostedNumberOrder.js", "../lib/rest/preview/HostedNumbers.js", "../lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js", "../lib/rest/preview/marketplace/availableAddOn.js", "../lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js", "../lib/rest/preview/marketplace/installedAddOn.js", "../lib/rest/preview/Marketplace.js", "../lib/rest/preview/sync/service/document/documentPermission.js", "../lib/rest/preview/sync/service/document.js", "../lib/rest/preview/sync/service/syncList/syncListItem.js", "../lib/rest/preview/sync/service/syncList/syncListPermission.js", "../lib/rest/preview/sync/service/syncList.js", "../lib/rest/preview/sync/service/syncMap/syncMapItem.js", "../lib/rest/preview/sync/service/syncMap/syncMapPermission.js", "../lib/rest/preview/sync/service/syncMap.js", "../lib/rest/preview/sync/service.js", "../lib/rest/preview/Sync.js", "../lib/rest/preview/trusted_comms/brandedChannel/channel.js", "../lib/rest/preview/trusted_comms/brandedChannel.js", "../lib/rest/preview/trusted_comms/brandsInformation.js", "../lib/rest/preview/trusted_comms/cps.js", "../lib/rest/preview/trusted_comms/currentCall.js", "../lib/rest/preview/TrustedComms.js", "../lib/rest/preview/understand/assistant/assistantFallbackActions.js", "../lib/rest/preview/understand/assistant/assistantInitiationActions.js", "../lib/rest/preview/understand/assistant/dialogue.js", "../lib/rest/preview/understand/assistant/fieldType/fieldValue.js", "../lib/rest/preview/understand/assistant/fieldType.js", "../lib/rest/preview/understand/assistant/modelBuild.js", "../lib/rest/preview/understand/assistant/query.js", "../lib/rest/preview/understand/assistant/styleSheet.js", "../lib/rest/preview/understand/assistant/task/field.js", "../lib/rest/preview/understand/assistant/task/sample.js", "../lib/rest/preview/understand/assistant/task/taskActions.js", "../lib/rest/preview/understand/assistant/task/taskStatistics.js", "../lib/rest/preview/understand/assistant/task.js", "../lib/rest/preview/understand/assistant.js", "../lib/rest/preview/Understand.js", "../lib/rest/preview/wireless/command.js", "../lib/rest/preview/wireless/ratePlan.js", "../lib/rest/preview/wireless/sim/usage.js", "../lib/rest/preview/wireless/sim.js", "../lib/rest/preview/Wireless.js", "../lib/rest/Preview.js", "../lib/rest/pricing/v1/messaging/country.js", "../lib/rest/pricing/v1/messaging.js", "../lib/rest/pricing/v1/phoneNumber/country.js", "../lib/rest/pricing/v1/phoneNumber.js", "../lib/rest/pricing/v1/voice/country.js", "../lib/rest/pricing/v1/voice/number.js", "../lib/rest/pricing/v1/voice.js", "../lib/rest/pricing/V1.js", "../lib/rest/pricing/v2/country.js", "../lib/rest/pricing/v2/number.js", "../lib/rest/pricing/v2/voice/country.js", "../lib/rest/pricing/v2/voice/number.js", "../lib/rest/pricing/v2/voice.js", "../lib/rest/pricing/V2.js", "../lib/rest/Pricing.js", "../lib/rest/proxy/v1/service/phoneNumber.js", "../lib/rest/proxy/v1/service/session/interaction.js", "../lib/rest/proxy/v1/service/session/participant/messageInteraction.js", "../lib/rest/proxy/v1/service/session/participant.js", "../lib/rest/proxy/v1/service/session.js", "../lib/rest/proxy/v1/service/shortCode.js", "../lib/rest/proxy/v1/service.js", "../lib/rest/proxy/V1.js", "../lib/rest/Proxy.js", "../lib/rest/serverless/v1/service/asset/assetVersion.js", "../lib/rest/serverless/v1/service/asset.js", "../lib/rest/serverless/v1/service/build/buildStatus.js", "../lib/rest/serverless/v1/service/build.js", "../lib/rest/serverless/v1/service/environment/deployment.js", "../lib/rest/serverless/v1/service/environment/log.js", "../lib/rest/serverless/v1/service/environment/variable.js", "../lib/rest/serverless/v1/service/environment.js", "../lib/rest/serverless/v1/service/function/functionVersion/functionVersionContent.js", "../lib/rest/serverless/v1/service/function/functionVersion.js", "../lib/rest/serverless/v1/service/function.js", "../lib/rest/serverless/v1/service.js", "../lib/rest/serverless/V1.js", "../lib/rest/Serverless.js", "../lib/rest/studio/v1/flow/engagement/engagementContext.js", "../lib/rest/studio/v1/flow/engagement/step/stepContext.js", "../lib/rest/studio/v1/flow/engagement/step.js", "../lib/rest/studio/v1/flow/engagement.js", "../lib/rest/studio/v1/flow/execution/executionContext.js", "../lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.js", "../lib/rest/studio/v1/flow/execution/executionStep.js", "../lib/rest/studio/v1/flow/execution.js", "../lib/rest/studio/v1/flow.js", "../lib/rest/studio/V1.js", "../lib/rest/studio/v2/flow/execution/executionContext.js", "../lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.js", "../lib/rest/studio/v2/flow/execution/executionStep.js", "../lib/rest/studio/v2/flow/execution.js", "../lib/rest/studio/v2/flow/flowRevision.js", "../lib/rest/studio/v2/flow/testUser.js", "../lib/rest/studio/v2/flow.js", "../lib/rest/studio/v2/flowValidate.js", "../lib/rest/studio/V2.js", "../lib/rest/Studio.js", "../lib/rest/sync/v1/service/document/documentPermission.js", "../lib/rest/sync/v1/service/document.js", "../lib/rest/sync/v1/service/syncList/syncListItem.js", "../lib/rest/sync/v1/service/syncList/syncListPermission.js", "../lib/rest/sync/v1/service/syncList.js", "../lib/rest/sync/v1/service/syncMap/syncMapItem.js", "../lib/rest/sync/v1/service/syncMap/syncMapPermission.js", "../lib/rest/sync/v1/service/syncMap.js", "../lib/rest/sync/v1/service/syncStream/streamMessage.js", "../lib/rest/sync/v1/service/syncStream.js", "../lib/rest/sync/v1/service.js", "../lib/rest/sync/V1.js", "../lib/rest/Sync.js", "../lib/rest/taskrouter/v1/workspace/activity.js", "../lib/rest/taskrouter/v1/workspace/event.js", "../lib/rest/taskrouter/v1/workspace/taskChannel.js", "../lib/rest/taskrouter/v1/workspace/task/reservation.js", "../lib/rest/taskrouter/v1/workspace/task.js", "../lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js", "../lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.js", "../lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.js", "../lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.js", "../lib/rest/taskrouter/v1/workspace/taskQueue.js", "../lib/rest/taskrouter/v1/workspace/worker/reservation.js", "../lib/rest/taskrouter/v1/workspace/worker/workerChannel.js", "../lib/rest/taskrouter/v1/workspace/worker/workerStatistics.js", "../lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.js", "../lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.js", "../lib/rest/taskrouter/v1/workspace/worker/workersStatistics.js", "../lib/rest/taskrouter/v1/workspace/worker.js", "../lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js", "../lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.js", "../lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.js", "../lib/rest/taskrouter/v1/workspace/workflow.js", "../lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js", "../lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.js", "../lib/rest/taskrouter/v1/workspace/workspaceStatistics.js", "../lib/rest/taskrouter/v1/workspace.js", "../lib/rest/taskrouter/V1.js", "../lib/rest/Taskrouter.js", "../lib/rest/trunking/v1/trunk/credentialList.js", "../lib/rest/trunking/v1/trunk/ipAccessControlList.js", "../lib/rest/trunking/v1/trunk/originationUrl.js", "../lib/rest/trunking/v1/trunk/phoneNumber.js", "../lib/rest/trunking/v1/trunk/recording.js", "../lib/rest/trunking/v1/trunk.js", "../lib/rest/trunking/V1.js", "../lib/rest/Trunking.js", "../lib/rest/trusthub/v1/customerProfiles/customerProfilesChannelEndpointAssignment.js", "../lib/rest/trusthub/v1/customerProfiles/customerProfilesEntityAssignments.js", "../lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.js", "../lib/rest/trusthub/v1/customerProfiles.js", "../lib/rest/trusthub/v1/endUser.js", "../lib/rest/trusthub/v1/endUserType.js", "../lib/rest/trusthub/v1/policies.js", "../lib/rest/trusthub/v1/supportingDocument.js", "../lib/rest/trusthub/v1/supportingDocumentType.js", "../lib/rest/trusthub/v1/trustProducts/trustProductsChannelEndpointAssignment.js", "../lib/rest/trusthub/v1/trustProducts/trustProductsEntityAssignments.js", "../lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.js", "../lib/rest/trusthub/v1/trustProducts.js", "../lib/rest/trusthub/V1.js", "../lib/rest/Trusthub.js", "../lib/rest/verify/v2/form.js", "../lib/rest/verify/v2/service/accessToken.js", "../lib/rest/verify/v2/service/entity/challenge/notification.js", "../lib/rest/verify/v2/service/entity/challenge.js", "../lib/rest/verify/v2/service/entity/factor.js", "../lib/rest/verify/v2/service/entity/newFactor.js", "../lib/rest/verify/v2/service/entity.js", "../lib/rest/verify/v2/service/messagingConfiguration.js", "../lib/rest/verify/v2/service/rateLimit/bucket.js", "../lib/rest/verify/v2/service/rateLimit.js", "../lib/rest/verify/v2/service/verificationCheck.js", "../lib/rest/verify/v2/service/verification.js", "../lib/rest/verify/v2/service/webhook.js", "../lib/rest/verify/v2/service.js", "../lib/rest/verify/v2/template.js", "../lib/rest/verify/v2/verificationAttempt.js", "../lib/rest/verify/v2/verificationAttemptsSummary.js", "../lib/rest/verify/V2.js", "../lib/rest/Verify.js", "../lib/rest/video/v1/compositionHook.js", "../lib/rest/video/v1/composition.js", "../lib/rest/video/v1/compositionSettings.js", "../lib/rest/video/v1/recording.js", "../lib/rest/video/v1/recordingSettings.js", "../lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js", "../lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribeRule.js", "../lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribedTrack.js", "../lib/rest/video/v1/room/roomParticipant.js", "../lib/rest/video/v1/room/roomRecordingRule.js", "../lib/rest/video/v1/room/recording.js", "../lib/rest/video/v1/room.js", "../lib/rest/video/V1.js", "../lib/rest/Video.js", "../lib/rest/voice/v1/archivedCall.js", "../lib/rest/voice/v1/byocTrunk.js", "../lib/rest/voice/v1/connectionPolicy/connectionPolicyTarget.js", "../lib/rest/voice/v1/connectionPolicy.js", "../lib/rest/voice/v1/dialingPermissions/bulkCountryUpdate.js", "../lib/rest/voice/v1/dialingPermissions/country/highriskSpecialPrefix.js", "../lib/rest/voice/v1/dialingPermissions/country.js", "../lib/rest/voice/v1/dialingPermissions/settings.js", "../lib/rest/voice/v1/dialingPermissions.js", "../lib/rest/voice/v1/ipRecord.js", "../lib/rest/voice/v1/sourceIpMapping.js", "../lib/rest/voice/V1.js", "../lib/rest/Voice.js", "../lib/rest/wireless/v1/command.js", "../lib/rest/wireless/v1/ratePlan.js", "../lib/rest/wireless/v1/sim/dataSession.js", "../lib/rest/wireless/v1/sim/usageRecord.js", "../lib/rest/wireless/v1/sim.js", "../lib/rest/wireless/v1/usageRecord.js", "../lib/rest/wireless/V1.js", "../lib/rest/Wireless.js", "../lib/rest/supersim/v1/esimProfile.js", "../lib/rest/supersim/v1/fleet.js", "../lib/rest/supersim/v1/ipCommand.js", "../lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.js", "../lib/rest/supersim/v1/networkAccessProfile.js", "../lib/rest/supersim/v1/network.js", "../lib/rest/supersim/v1/sim/billingPeriod.js", "../lib/rest/supersim/v1/sim.js", "../lib/rest/supersim/v1/smsCommand.js", "../lib/rest/supersim/v1/usageRecord.js", "../lib/rest/supersim/V1.js", "../lib/rest/Supersim.js", "../lib/rest/bulkexports/v1/exportConfiguration.js", "../lib/rest/bulkexports/v1/export/day.js", "../lib/rest/bulkexports/v1/export/exportCustomJob.js", "../lib/rest/bulkexports/v1/export/job.js", "../lib/rest/bulkexports/v1/export.js", "../lib/rest/bulkexports/V1.js", "../lib/rest/Bulkexports.js", "../lib/rest/Twilio.js", "../lib/webhooks/webhooks.js", "../lib/base/obsolete.js", "../lib/jwt/AccessToken.js", "../lib/jwt/ClientCapability.js", "../lib/jwt/taskrouter/TaskRouterCapability.js", "../lib/jwt/taskrouter/util.js", "../lib/twiml/TwiML.js", "../lib/twiml/VoiceResponse.js", "../lib/twiml/MessagingResponse.js", "../lib/twiml/FaxResponse.js", "../lib/index.js", "../index.js", "../src/index.ts", "../src/helpers.ts"],
  "sourcesContent": ["{\n  \"name\": \"@signalwire/compatibility-api\",\n  \"description\": \"SignalWire Compatibility API\",\n  \"author\": \"SignalWire Team <open.source@signalwire.com>\",\n  \"license\": \"MIT\",\n  \"version\": \"3.1.4\",\n  \"keywords\": [\n    \"signalwire\",\n    \"voice\",\n    \"laml\",\n    \"sms\",\n    \"rest\",\n    \"api\"\n  ],\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/signalwire/compatibility-api-js\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/signalwire/compatibility-api-js/issues\"\n  },\n  \"homepage\": \"https://developer.signalwire.com/compatibility-api\",\n  \"dependencies\": {\n    \"axios\": \"^0.26.1\",\n    \"dayjs\": \"^1.8.29\",\n    \"https-proxy-agent\": \"^5.0.0\",\n    \"jsonwebtoken\": \"9.0.0\",\n    \"lodash\": \"^4.17.21\",\n    \"q\": \"2.0.x\",\n    \"qs\": \"^6.9.4\",\n    \"rootpath\": \"^0.1.2\",\n    \"scmp\": \"^2.1.0\",\n    \"url-parse\": \"^1.5.9\",\n    \"xmlbuilder\": \"^13.0.2\"\n  },\n  \"devDependencies\": {\n    \"@types/node\": \"9.6.57\",\n    \"esbuild\": \"^0.17.19\",\n    \"esbuild-node-externals\": \"^1.7.0\",\n    \"eslint\": \"^7.28.0\",\n    \"express\": \"^4.17.1\",\n    \"jasmine\": \"~3.5.0\",\n    \"jsdoc\": \"^4.0.2\",\n    \"jshint\": \"^2.11.0\",\n    \"mock-fs\": \"^4.12.0\",\n    \"nock\": \"^10.0.6\",\n    \"node-mocks-http\": \"^1.8.1\",\n    \"nyc\": \"^15.1.0\",\n    \"proxyquire\": \"^2.1.3\",\n    \"typescript\": \"^2.9.2\"\n  },\n  \"scripts\": {\n    \"test\": \"npm run test:javascript && npm run test:typescript\",\n    \"test:javascript\": \"jasmine spec/**/**.spec.js\",\n    \"test:typescript\": \"tsc examples/typescript/example.ts --noEmit --strict\",\n    \"jshint\": \"jshint lib/rest/** lib/base/** lib/http/**\",\n    \"jscs\": \"eslint lib/base/**/**.js lib/http/**/**.js --fix\",\n    \"check\": \"npm run jshint && npm run jscs\",\n    \"ci\": \"npm run nyc && npm run nsp\",\n    \"coverage\": \"nyc npm test\",\n    \"jsdoc\": \"jsdoc -r lib -d docs\",\n    \"nsp\": \"if [ `npm --version | cut -d'.' -f1` -ge \\\"6\\\" ]; then npm audit --production; else echo \\\"npm audit is not available for npm < 6.0\\\"; fi\",\n    \"nyc\": \"if [ `node --version | cut -d'.' -f1 | cut -c2-` -ge \\\"8\\\" ]; then npm run coverage; else npm test; fi\",\n    \"tsc\": \"tsc -p tsconfig.cjs.json\",\n    \"tsc:esm\": \"tsc -p tsconfig.esm.json\",\n    \"build\": \"node build.js\"\n  },\n  \"files\": [\n    \"dist\",\n    \"lib\",\n    \"src\",\n    \"index.js\",\n    \"index.d.ts\",\n    \"compatibility-api.d.ts\"\n  ],\n  \"main\": \"dist/index.node.js\",\n  \"exports\": {\n    \"require\": \"./dist/index.node.js\",\n    \"default\": \"./dist/index.node.mjs\"\n  },\n  \"types\": \"./compatibility-api.d.ts\",\n  \"engines\": {\n    \"node\": \">=12\"\n  }\n}\n", "'use strict';\n\nclass RestException extends Error {\n  constructor(response) {\n    super('[HTTP ' + response.statusCode + '] Failed to execute request');\n\n    const body = typeof response.body === 'string' ? JSON.parse(response.body) : response.body;\n    this.status = response.statusCode;\n    this.message = body.message;\n    this.code = body.code;\n    this.moreInfo = body.more_info; /* jshint ignore:line */\n    this.details = body.details;\n  }\n}\n\nmodule.exports = RestException;\n", "'use strict';\n\nvar Response = function(statusCode, body, headers) {\n  this.statusCode = statusCode;\n  this.body = body;\n  this.headers = headers;\n};\n\nResponse.prototype.toString = function() {\n  return 'HTTP ' + this.statusCode + ' ' + this.body;\n};\n\nmodule.exports = Response;\n", "'use strict';\n\nvar _ = require('lodash');\n\nvar Request = function(opts) {\n  opts = opts || {};\n\n  this.method = opts.method || this.ANY;\n  this.url = opts.url || this.ANY;\n  this.auth = opts.auth || this.ANY;\n  this.params = opts.params || this.ANY;\n  this.data = opts.data || this.ANY;\n  this.headers = opts.headers || this.ANY;\n  this.ca = opts.ca;\n};\n\nRequest.prototype.ANY = '*';\n\nRequest.prototype.attributeEqual = function(lhs, rhs) {\n  if (lhs === this.ANY || rhs === this.ANY) {\n    return true;\n  }\n\n  lhs = lhs || undefined;\n  rhs = rhs || undefined;\n\n  return _.isEqual(lhs, rhs);\n};\n\nRequest.prototype.isEqual = function(other) {\n  return (this.attributeEqual(this.method, other.method) &&\n      this.attributeEqual(this.url, other.url) &&\n      this.attributeEqual(this.auth, other.auth) &&\n      this.attributeEqual(this.params, other.params) &&\n      this.attributeEqual(this.data, other.data) &&\n      this.attributeEqual(this.headers, other.headers));\n};\n\nRequest.prototype.toString = function() {\n  var auth = '';\n  if (this.auth && this.auth !== this.ANY) {\n    auth = this.auth + ' ';\n  }\n\n  var params = '';\n  if (this.params && this.params !== this.ANY) {\n    params = '?' + _.join(_.chain(_.keys(this.params))\n      .map(function(key) { return key + '=' + this.params[key]; }.bind(this))\n      .value(), '&');\n  }\n\n  var data = '';\n  if (this.data && this.data !== this.ANY) {\n    if (this.method === 'GET') {\n      data = '\\n -G';\n    }\n\n    data = data + '\\n' + _.join(\n      _.map(this.data, function(value, key) {\n        return ' -d ' + key + '='  + value;\n      }), '\\n');\n  }\n\n  var headers = '';\n  if (this.headers && this.headers !== this.ANY) {\n    headers = '\\n' + _.join(\n      _.map(this.headers, function(value, key) {\n        return ' -H ' + key + '='  + value;\n      }), '\\n');\n  }\n\n  return auth + this.method + ' ' + this.url + params + data + headers;\n};\n\nmodule.exports = Request;\n", "'use strict';\n\nvar _ = require('lodash');\nvar axios = require('axios');\nvar fs = require('fs');\nvar HttpsProxyAgent = require('https-proxy-agent');\nvar Q = require('q');\nvar qs = require('qs');\nvar Response = require('../http/response');\nvar Request = require('../http/request');\n\naxios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';\n\nvar RequestClient = function () { };\n\n/**\n * Make http request\n * @param {object} opts - The options argument\n * @param {string} opts.method - The http method\n * @param {string} opts.uri - The request uri\n * @param {string} [opts.username] - The username used for auth\n * @param {string} [opts.password] - The password used for auth\n * @param {object} [opts.headers] - The request headers\n * @param {object} [opts.params] - The request params\n * @param {object} [opts.data] - The request data\n * @param {int} [opts.timeout=30000] - The request timeout in milliseconds\n * @param {boolean} [opts.allowRedirects] - Should the client follow redirects\n * @param {boolean} [opts.forever] - Set to true to use the forever-agent\n * @param {string} [opts.logLevel] - Show debug logs\n */\nRequestClient.prototype.request = function (opts) {\n  opts = opts || {};\n  if (!opts.method) {\n    throw new Error('http method is required');\n  }\n\n  if (!opts.uri) {\n    throw new Error('uri is required');\n  }\n\n  var deferred = Q.defer();\n  var headers = opts.headers || {};\n\n  if (!headers.Connection && !headers.connection && opts.forever) {\n    headers.Connection = 'keep-alive';\n  } else if (!headers.Connection && !headers.connection) {\n    headers.Connection = 'close';\n  }\n\n  if (opts.username && opts.password) {\n    var b64Auth = Buffer.from(opts.username + ':' + opts.password).toString('base64');\n    headers.Authorization = 'Basic ' + b64Auth;\n  }\n\n  var options = {\n    timeout: opts.timeout || 30000,\n    maxRedirects: opts.allowRedirects ? 10 : 0, // Same number of allowed redirects as request module default\n    url: opts.uri,\n    method: opts.method,\n    headers: opts.headers,\n    httpsAgent: process.env.HTTP_PROXY ? new HttpsProxyAgent(process.env.HTTP_PROXY) : undefined,\n    proxy: false,\n    validateStatus: status => status >= 100 && status < 600,\n  };\n\n  if (process.env.TWILIO_CA_BUNDLE !== undefined) {\n    if (this.ca === undefined) {\n      this.ca = fs.readFileSync(process.env.TWILIO_CA_BUNDLE);\n    }\n    options.ca = this.ca;\n  }\n\n  if (!_.isNull(opts.data)) {\n    options.data = qs.stringify(opts.data, { arrayFormat: 'repeat' });\n  }\n\n  if (!_.isNull(opts.params)) {\n    options.params = opts.params;\n    options.paramsSerializer = (params) => {\n      return qs.stringify(params, { arrayFormat: 'repeat' });\n    };\n  }\n\n  var optionsRequest = {\n    method: options.method,\n    url: options.url,\n    auth: b64Auth || null,\n    params: options.params,\n    data: opts.data,\n    headers: options.headers,\n    ca: options.ca\n  };\n\n  if (opts.logLevel === 'debug') {\n    this.logRequest(options)\n  }\n\n  var _this = this;\n  this.lastResponse = undefined;\n  this.lastRequest = new Request(optionsRequest);\n\n  axios(options).then((response) => {\n    if (opts.logLevel === 'debug') {\n      console.log(`response.statusCode: ${response.status}`)\n      console.log(`response.headers: ${JSON.stringify(response.headers)}`)\n    }\n    _this.lastResponse = new Response(response.status, response.data, response.headers);\n    deferred.resolve({\n      statusCode: response.status,\n      body: response.data,\n      headers: response.headers,\n    });\n  }).catch((error) => {\n    _this.lastResponse = undefined;\n    deferred.reject(error);\n  });\n\n  return deferred.promise;\n};\n\nRequestClient.prototype.filterLoggingHeaders = function (headers){\n  return Object.keys(headers).filter((header) => {\n    return !'authorization'.includes(header.toLowerCase());\n  });\n}\n\nRequestClient.prototype.logRequest = function (options){\n  console.log('-- BEGIN Twilio API Request --');\n  console.log(`${options.method} ${options.url}`);\n\n  if (options.params) {\n    console.log('Querystring:');\n    console.log(options.params);\n  }\n\n  if (options.headers) {\n    console.log('Headers:');\n    const filteredHeaderKeys = this.filterLoggingHeaders(options.headers);\n    filteredHeaderKeys.forEach((header) => console.log(`${header}: ${options.headers[header]}`));\n  }\n\n  console.log('-- END Twilio API Request --');\n}\n\nmodule.exports = RequestClient;\n", "'use strict';\nvar _ = require('lodash');\n\n/**\n * Base domain object\n *\n * @constructor\n *\n * @param {Twilio} twilio - A Twilio Client\n * @param {string} baseUrl - Base url for this domain\n */\nfunction Domain(twilio, baseUrl) {\n  this.twilio = twilio;\n  this.baseUrl = baseUrl;\n}\n\n/**\n * Turn a uri into an absolute url\n *\n * @param  {string} uri uri to transform\n * @return {string} absolute url\n */\nDomain.prototype.absoluteUrl = function(uri) {\n  return _.trim(this.baseUrl, '/') + '/' + _.trim(uri, '/');\n};\n\n/**\n * Make request to this domain\n *\n * @param {object} opts request options\n * @return {Promise} request promise\n */\nDomain.prototype.request = function(opts) {\n  return this.twilio.request(_.assign({}, opts, {\n    uri: this.absoluteUrl(opts.uri),\n  }));\n};\n\nmodule.exports = Domain;\n", "'use strict';\n\nvar _ = require('lodash');\nvar RestException = require('./RestException');\n\n/**\n * @constructor\n *\n * @description Base page object to maintain request state.\n *\n * @param {Version} version - A twilio version instance\n * @param {Object} response - The http response\n * @param {Object} solution - path solution\n */\nfunction Page(version, response, solution) {\n  var payload = this.processResponse(response);\n\n  this._version = version;\n  this._payload = payload;\n  this._solution = solution;\n\n  this.nextPageUrl = this.getNextPageUrl();\n  this.previousPageUrl = this.getPreviousPageUrl();\n\n  this.instances = this.loadInstances(this.loadPage(payload));\n}\n\n/**\n * @constant META_KEYS\n * @description meta keys returned in a list request\n */\nPage.prototype.META_KEYS = [\n  'end',\n  'first_page_uri',\n  'last_page_uri',\n  'next_page_uri',\n  'num_pages',\n  'page',\n  'page_size',\n  'previous_page_uri',\n  'start',\n  'total',\n  'uri',\n];\n\n/**\n * Get the url of the previous page of records\n *\n * @return {string|undefined} url of the previous page\n */\nPage.prototype.getPreviousPageUrl = function() {\n  if ('meta' in this._payload && 'previous_page_url' in this._payload.meta && this._payload.meta.previous_page_url) { // jshint ignore:line\n    return this._payload.meta.previous_page_url; // jshint ignore:line\n  }\n\n  if ('previous_page_uri' in this._payload && this._payload.previous_page_uri) { // jshint ignore:line\n    return this._version._domain.absoluteUrl(this._payload.previous_page_uri); // jshint ignore:line\n  }\n\n  return undefined;\n};\n\n/**\n * Get the url of the next page of records\n *\n * @return {string|undefined} url of the next page\n */\nPage.prototype.getNextPageUrl = function() {\n  if ('meta' in this._payload && 'next_page_url' in this._payload.meta && this._payload.meta.next_page_url) { // jshint ignore:line\n    return this._payload.meta.next_page_url; // jshint ignore:line\n  }\n\n  if ('next_page_uri' in this._payload && this._payload.next_page_uri) { // jshint ignore:line\n    return this._version._domain.absoluteUrl(this._payload.next_page_uri); // jshint ignore:line\n  }\n\n  return undefined;\n};\n\n/**\n * Build a new instance given a json payload\n * @abstract\n *\n * @param {object} payload - Payload response from the API\n * @return {object} instance of a resource\n */\nPage.prototype.getInstance = function(payload) {\n  throw new Error('Page.get_instance() must be implemented in the derived class');\n};\n\n/**\n * Load a list of records\n *\n * @param  {object} resources json payload of records\n * @return {Array} list of resources\n */\nPage.prototype.loadInstances = function(resources) {\n  return _.map(resources, function(resource) {\n    return this.getInstance(resource);\n  }.bind(this));\n};\n\n/**\n * Fetch the next page of records\n *\n * @return {promise} promise that resolves to next page of results\n */\nPage.prototype.nextPage = function() {\n  if (!this.nextPageUrl) {\n    return undefined;\n  }\n\n  var promise = this._version._domain.twilio.request({\n    method: 'GET',\n    uri: this.nextPageUrl,\n  });\n\n  promise = promise.then(function(response) {\n    return new this.constructor(this._version, response, this._solution);\n  }.bind(this));\n\n  return promise;\n};\n\n/**\n * Fetch the previous page of records\n *\n * @return {promise} promise that resolves to previous page of results\n */\nPage.prototype.previousPage = function() {\n  if (!this.previousPageUrl) {\n    return undefined;\n  }\n\n  var promise = this._version._domain.twilio.request({\n    method: 'GET',\n    uri: this.previousPageUrl,\n  });\n\n  promise = promise.then(function(response) {\n    return new this.constructor(this._version, response, this._solution);\n  }.bind(this));\n\n  return promise;\n};\n\n/**\n * Parse json response from API\n * @throws {Error} If non 200 status code is returned\n *\n * @param  {object} response API response\n * @return {object} json parsed response\n */\nPage.prototype.processResponse = function(response) {\n  if (response.statusCode !== 200) {\n    throw new RestException(response);\n  }\n\n  if (typeof response.body === 'string') {\n    return JSON.parse(response.body);\n  }\n  return response.body;\n};\n\n/**\n * Load a page of records\n * @throws {Error} If records cannot be deserialized\n *\n * @param  {object} payload json payload\n * @return {array} the page of records\n */\nPage.prototype.loadPage = function(payload) {\n  if ('meta' in payload && 'key' in payload.meta) {\n    return payload[payload.meta.key];\n  }\n\n  var keys = _.chain(payload)\n    .keys()\n    .difference(this.META_KEYS)\n    .value();\n\n  if (keys.length === 1) {\n    return payload[keys[0]];\n  }\n\n  throw new Error('Page Records cannot be deserialized');\n};\n\nmodule.exports = Page;\n", "'use strict';\n\nvar _ = require('lodash');\nvar dayjs = require('dayjs');\nvar utc = require('dayjs/plugin/utc');\n\ndayjs.extend(utc);\n\n/**\n * @namespace deserialize\n */\n\nfunction parseDate(s, format) {\n  var m = dayjs.utc(s, format);\n  if (m.isValid()) {\n    return m.toDate();\n  }\n\n  return s;\n}\n\nfunction parseNumber(n, parser) {\n  var parsed = parser(n);\n  if (isNaN(parsed)) {\n    return n;\n  }\n\n  return parsed;\n}\n\n/**\n * @function iso8601Date\n * @memberOf deserialize\n * @description parse a string into a Date object\n *\n * @param  {string} s date string in YYYY-MM-DD format\n * @return {Date} Date object\n */\nfunction iso8601Date(s) {\n  return parseDate(s, 'YYYY-MM-DD');\n}\n\n/**\n * @function iso8601DateTime\n * @memberOf deserialize\n * @description parse a string into a Date object\n *\n * @param  {String} s date string in YYYY-MM-DD[T]HH:mm:ss[Z] format\n * @return {Date} Date object\n */\nfunction iso8601DateTime(s) {\n  return parseDate(s, 'YYYY-MM-DD[T]HH:mm:ss[Z]');\n}\n\n/**\n * @function rfc2822DateTime\n * @memberOf deserialize\n * @description parse a string into a Date object\n *\n * @param  {String} s date string in ddd, DD MMM YYYY HH:mm:ss [+0000] format\n * @return {Date} Date object\n */\nfunction rfc2822DateTime(s) {\n  return parseDate(s, 'ddd, DD MMM YYYY HH:mm:ss [+0000]');\n}\n\n/**\n * @function decimal\n * @memberOf deserialize\n * @description parse a string into a decimal\n *\n * @param  {string} d decimal value as string\n * @return {number} number object\n */\nfunction decimal(d) {\n  return parseNumber(d, parseFloat);\n}\n\n/**\n * @function integer\n * @memberOf deserialize\n * @description parse a string into a integer\n *\n * @param  {string} i integer value as string\n * @return {number} number object\n */\nfunction integer(i) {\n  return parseNumber(i, _.parseInt);\n}\n\nmodule.exports = {\n  iso8601Date: iso8601Date,\n  iso8601DateTime: iso8601DateTime,\n  rfc2822DateTime: rfc2822DateTime,\n  decimal: decimal,\n  integer: integer,\n};\n", "'use strict';\nvar _ = require('lodash');\n\n/**\n * @namespace values\n */\n\n/**\n * @function of\n * @memberOf values\n * @description removes all undefined values of an object\n *\n * @param  {object} obj object to filter\n * @return {object} object with no undefined values\n */\nfunction of(obj) {\n  return _.omitBy(obj, _.isUndefined);\n}\n\nmodule.exports = {\n  of: of,\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar AuthTokenPromotionList;\nvar AuthTokenPromotionPage;\nvar AuthTokenPromotionInstance;\nvar AuthTokenPromotionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthTokenPromotionList\n *\n * @constructor Twilio.Accounts.V1.AuthTokenPromotionList\n *\n * @param {Twilio.Accounts.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nAuthTokenPromotionList = function AuthTokenPromotionList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function authTokenPromotion\n   * @memberof Twilio.Accounts.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Accounts.V1.AuthTokenPromotionContext}\n   */\n  /* jshint ignore:end */\n  function AuthTokenPromotionListInstance(sid) {\n    return AuthTokenPromotionListInstance.get(sid);\n  }\n\n  AuthTokenPromotionListInstance._version = version;\n  // Path Solution\n  AuthTokenPromotionListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a auth_token_promotion\n   *\n   * @function get\n   * @memberof Twilio.Accounts.V1.AuthTokenPromotionList#\n   *\n   * @returns {Twilio.Accounts.V1.AuthTokenPromotionContext}\n   */\n  /* jshint ignore:end */\n  AuthTokenPromotionListInstance.get = function get() {\n    return new AuthTokenPromotionContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Accounts.V1.AuthTokenPromotionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AuthTokenPromotionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AuthTokenPromotionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AuthTokenPromotionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthTokenPromotionPage\n *\n * @constructor Twilio.Accounts.V1.AuthTokenPromotionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AuthTokenPromotionSolution} solution - Path solution\n *\n * @returns AuthTokenPromotionPage\n */\n/* jshint ignore:end */\nAuthTokenPromotionPage = function AuthTokenPromotionPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AuthTokenPromotionPage.prototype, Page.prototype);\nAuthTokenPromotionPage.prototype.constructor = AuthTokenPromotionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AuthTokenPromotionInstance\n *\n * @function getInstance\n * @memberof Twilio.Accounts.V1.AuthTokenPromotionPage#\n *\n * @param {AuthTokenPromotionPayload} payload - Payload response from the API\n *\n * @returns AuthTokenPromotionInstance\n */\n/* jshint ignore:end */\nAuthTokenPromotionPage.prototype.getInstance = function getInstance(payload) {\n  return new AuthTokenPromotionInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.AuthTokenPromotionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthTokenPromotionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthTokenPromotionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthTokenPromotionContext\n *\n * @constructor Twilio.Accounts.V1.AuthTokenPromotionInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that the secondary Auth Token was created for\n * @property {string} authToken - The promoted Auth Token\n * @property {Date} dateCreated -\n *          The ISO 8601 formatted date and time in UTC when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 formatted date and time in UTC when the resource was last updated\n * @property {string} url -\n *          The URI for this resource, relative to `https://accounts.twilio.com`\n *\n * @param {V1} version - Version of the resource\n * @param {AuthTokenPromotionPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nAuthTokenPromotionInstance = function AuthTokenPromotionInstance(version,\n    payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.authToken = payload.auth_token; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(AuthTokenPromotionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AuthTokenPromotionContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a AuthTokenPromotionInstance\n *\n * @function update\n * @memberof Twilio.Accounts.V1.AuthTokenPromotionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthTokenPromotionInstance\n */\n/* jshint ignore:end */\nAuthTokenPromotionInstance.prototype.update = function update(callback) {\n  return this._proxy.update(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.AuthTokenPromotionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthTokenPromotionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthTokenPromotionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthTokenPromotionContext\n *\n * @constructor Twilio.Accounts.V1.AuthTokenPromotionContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nAuthTokenPromotionContext = function AuthTokenPromotionContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/AuthTokens/Promote`;\n};\n\n/* jshint ignore:start */\n/**\n * update a AuthTokenPromotionInstance\n *\n * @function update\n * @memberof Twilio.Accounts.V1.AuthTokenPromotionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthTokenPromotionInstance\n */\n/* jshint ignore:end */\nAuthTokenPromotionContext.prototype.update = function update(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.update({uri: this._uri, method: 'POST'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AuthTokenPromotionInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.AuthTokenPromotionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthTokenPromotionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAuthTokenPromotionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AuthTokenPromotionList: AuthTokenPromotionList,\n  AuthTokenPromotionPage: AuthTokenPromotionPage,\n  AuthTokenPromotionInstance: AuthTokenPromotionInstance,\n  AuthTokenPromotionContext: AuthTokenPromotionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AwsList;\nvar AwsPage;\nvar AwsInstance;\nvar AwsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AwsList\n *\n * @constructor Twilio.Accounts.V1.CredentialContext.AwsList\n *\n * @param {Twilio.Accounts.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nAwsList = function AwsList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function aws\n   * @memberof Twilio.Accounts.V1.CredentialContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Accounts.V1.CredentialContext.AwsContext}\n   */\n  /* jshint ignore:end */\n  function AwsListInstance(sid) {\n    return AwsListInstance.get(sid);\n  }\n\n  AwsListInstance._version = version;\n  // Path Solution\n  AwsListInstance._solution = {};\n  AwsListInstance._uri = `/Credentials/AWS`;\n  /* jshint ignore:start */\n  /**\n   * Streams AwsInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Accounts.V1.CredentialContext.AwsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AwsListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AwsInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Accounts.V1.CredentialContext.AwsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AwsListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AwsInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Accounts.V1.CredentialContext.AwsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AwsListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AwsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AwsInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Accounts.V1.CredentialContext.AwsList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AwsListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AwsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a AwsInstance\n   *\n   * @function create\n   * @memberof Twilio.Accounts.V1.CredentialContext.AwsList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.credentials -\n   *          A string that contains the AWS access credentials in the format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.accountSid] -\n   *          The Subaccount this Credential should be associated with.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AwsInstance\n   */\n  /* jshint ignore:end */\n  AwsListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['credentials'])) {\n      throw new Error('Required parameter \"opts[\\'credentials\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Credentials': _.get(opts, 'credentials'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'AccountSid': _.get(opts, 'accountSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AwsInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a aws\n   *\n   * @function get\n   * @memberof Twilio.Accounts.V1.CredentialContext.AwsList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Accounts.V1.CredentialContext.AwsContext}\n   */\n  /* jshint ignore:end */\n  AwsListInstance.get = function get(sid) {\n    return new AwsContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Accounts.V1.CredentialContext.AwsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AwsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AwsListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AwsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AwsPage\n *\n * @constructor Twilio.Accounts.V1.CredentialContext.AwsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AwsSolution} solution - Path solution\n *\n * @returns AwsPage\n */\n/* jshint ignore:end */\nAwsPage = function AwsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AwsPage.prototype, Page.prototype);\nAwsPage.prototype.constructor = AwsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AwsInstance\n *\n * @function getInstance\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsPage#\n *\n * @param {AwsPayload} payload - Payload response from the API\n *\n * @returns AwsInstance\n */\n/* jshint ignore:end */\nAwsPage.prototype.getInstance = function getInstance(payload) {\n  return new AwsInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAwsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAwsPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AwsContext\n *\n * @constructor Twilio.Accounts.V1.CredentialContext.AwsInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url -\n *          The URI for this resource, relative to `https://accounts.twilio.com`\n *\n * @param {V1} version - Version of the resource\n * @param {AwsPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAwsInstance = function AwsInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(AwsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AwsContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AwsInstance\n *\n * @function fetch\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AwsInstance\n */\n/* jshint ignore:end */\nAwsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AwsInstance\n *\n * @function update\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AwsInstance\n */\n/* jshint ignore:end */\nAwsInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AwsInstance\n *\n * @function remove\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AwsInstance\n */\n/* jshint ignore:end */\nAwsInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAwsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAwsInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AwsContext\n *\n * @constructor Twilio.Accounts.V1.CredentialContext.AwsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAwsContext = function AwsContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Credentials/AWS/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AwsInstance\n *\n * @function fetch\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AwsInstance\n */\n/* jshint ignore:end */\nAwsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AwsInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AwsInstance\n *\n * @function update\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AwsInstance\n */\n/* jshint ignore:end */\nAwsContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AwsInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AwsInstance\n *\n * @function remove\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AwsInstance\n */\n/* jshint ignore:end */\nAwsContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.CredentialContext.AwsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAwsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAwsContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AwsList: AwsList,\n  AwsPage: AwsPage,\n  AwsInstance: AwsInstance,\n  AwsContext: AwsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar PublicKeyList;\nvar PublicKeyPage;\nvar PublicKeyInstance;\nvar PublicKeyContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PublicKeyList\n *\n * @constructor Twilio.Accounts.V1.CredentialContext.PublicKeyList\n *\n * @param {Twilio.Accounts.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nPublicKeyList = function PublicKeyList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function publicKey\n   * @memberof Twilio.Accounts.V1.CredentialContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Accounts.V1.CredentialContext.PublicKeyContext}\n   */\n  /* jshint ignore:end */\n  function PublicKeyListInstance(sid) {\n    return PublicKeyListInstance.get(sid);\n  }\n\n  PublicKeyListInstance._version = version;\n  // Path Solution\n  PublicKeyListInstance._solution = {};\n  PublicKeyListInstance._uri = `/Credentials/PublicKeys`;\n  /* jshint ignore:start */\n  /**\n   * Streams PublicKeyInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  PublicKeyListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists PublicKeyInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PublicKeyListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of PublicKeyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PublicKeyListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PublicKeyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of PublicKeyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PublicKeyListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PublicKeyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a PublicKeyInstance\n   *\n   * @function create\n   * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.publicKey - A URL encoded representation of the public key\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.accountSid] -\n   *          The Subaccount this Credential should be associated with.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed PublicKeyInstance\n   */\n  /* jshint ignore:end */\n  PublicKeyListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['publicKey'])) {\n      throw new Error('Required parameter \"opts[\\'publicKey\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PublicKey': _.get(opts, 'publicKey'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'AccountSid': _.get(opts, 'accountSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PublicKeyInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a public_key\n   *\n   * @function get\n   * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Accounts.V1.CredentialContext.PublicKeyContext}\n   */\n  /* jshint ignore:end */\n  PublicKeyListInstance.get = function get(sid) {\n    return new PublicKeyContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PublicKeyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PublicKeyListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PublicKeyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PublicKeyPage\n *\n * @constructor Twilio.Accounts.V1.CredentialContext.PublicKeyPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PublicKeySolution} solution - Path solution\n *\n * @returns PublicKeyPage\n */\n/* jshint ignore:end */\nPublicKeyPage = function PublicKeyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PublicKeyPage.prototype, Page.prototype);\nPublicKeyPage.prototype.constructor = PublicKeyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PublicKeyInstance\n *\n * @function getInstance\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyPage#\n *\n * @param {PublicKeyPayload} payload - Payload response from the API\n *\n * @returns PublicKeyInstance\n */\n/* jshint ignore:end */\nPublicKeyPage.prototype.getInstance = function getInstance(payload) {\n  return new PublicKeyInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPublicKeyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPublicKeyPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PublicKeyContext\n *\n * @constructor Twilio.Accounts.V1.CredentialContext.PublicKeyInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Credential that the PublicKey resource belongs to\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url -\n *          The URI for this resource, relative to `https://accounts.twilio.com`\n *\n * @param {V1} version - Version of the resource\n * @param {PublicKeyPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nPublicKeyInstance = function PublicKeyInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(PublicKeyInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PublicKeyContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a PublicKeyInstance\n *\n * @function fetch\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PublicKeyInstance\n */\n/* jshint ignore:end */\nPublicKeyInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a PublicKeyInstance\n *\n * @function update\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PublicKeyInstance\n */\n/* jshint ignore:end */\nPublicKeyInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a PublicKeyInstance\n *\n * @function remove\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PublicKeyInstance\n */\n/* jshint ignore:end */\nPublicKeyInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPublicKeyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPublicKeyInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PublicKeyContext\n *\n * @constructor Twilio.Accounts.V1.CredentialContext.PublicKeyContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nPublicKeyContext = function PublicKeyContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Credentials/PublicKeys/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PublicKeyInstance\n *\n * @function fetch\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PublicKeyInstance\n */\n/* jshint ignore:end */\nPublicKeyContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PublicKeyInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a PublicKeyInstance\n *\n * @function update\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PublicKeyInstance\n */\n/* jshint ignore:end */\nPublicKeyContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PublicKeyInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a PublicKeyInstance\n *\n * @function remove\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PublicKeyInstance\n */\n/* jshint ignore:end */\nPublicKeyContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.CredentialContext.PublicKeyContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPublicKeyContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPublicKeyContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PublicKeyList: PublicKeyList,\n  PublicKeyPage: PublicKeyPage,\n  PublicKeyInstance: PublicKeyInstance,\n  PublicKeyContext: PublicKeyContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AwsList = require('./credential/aws').AwsList;\nvar PublicKeyList = require('./credential/publicKey').PublicKeyList;\n\nvar CredentialList;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialList\n *\n * @constructor Twilio.Accounts.V1.CredentialList\n *\n * @param {Twilio.Accounts.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCredentialList = function CredentialList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function credentials\n   * @memberof Twilio.Accounts.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Accounts.V1.CredentialContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListInstance(sid) {\n    return CredentialListInstance.get(sid);\n  }\n\n  CredentialListInstance._version = version;\n  // Path Solution\n  CredentialListInstance._solution = {};\n\n  // Components\n  CredentialListInstance._publicKey = undefined;\n  CredentialListInstance._aws = undefined;\n\n  Object.defineProperty(CredentialListInstance,\n    'publicKey', {\n      get: function publicKey() {\n        if (!this._publicKey) {\n          this._publicKey = new PublicKeyList(this._version);\n        }\n\n        return this._publicKey;\n      }\n  });\n\n  Object.defineProperty(CredentialListInstance,\n    'aws', {\n      get: function aws() {\n        if (!this._aws) {\n          this._aws = new AwsList(this._version);\n        }\n\n        return this._aws;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Accounts.V1.CredentialList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListInstance;\n};\n\nmodule.exports = {\n  CredentialList: CredentialList\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SecondaryAuthTokenList;\nvar SecondaryAuthTokenPage;\nvar SecondaryAuthTokenInstance;\nvar SecondaryAuthTokenContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SecondaryAuthTokenList\n *\n * @constructor Twilio.Accounts.V1.SecondaryAuthTokenList\n *\n * @param {Twilio.Accounts.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSecondaryAuthTokenList = function SecondaryAuthTokenList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function secondaryAuthToken\n   * @memberof Twilio.Accounts.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Accounts.V1.SecondaryAuthTokenContext}\n   */\n  /* jshint ignore:end */\n  function SecondaryAuthTokenListInstance(sid) {\n    return SecondaryAuthTokenListInstance.get(sid);\n  }\n\n  SecondaryAuthTokenListInstance._version = version;\n  // Path Solution\n  SecondaryAuthTokenListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a secondary_auth_token\n   *\n   * @function get\n   * @memberof Twilio.Accounts.V1.SecondaryAuthTokenList#\n   *\n   * @returns {Twilio.Accounts.V1.SecondaryAuthTokenContext}\n   */\n  /* jshint ignore:end */\n  SecondaryAuthTokenListInstance.get = function get() {\n    return new SecondaryAuthTokenContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Accounts.V1.SecondaryAuthTokenList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SecondaryAuthTokenListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SecondaryAuthTokenListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SecondaryAuthTokenListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SecondaryAuthTokenPage\n *\n * @constructor Twilio.Accounts.V1.SecondaryAuthTokenPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SecondaryAuthTokenSolution} solution - Path solution\n *\n * @returns SecondaryAuthTokenPage\n */\n/* jshint ignore:end */\nSecondaryAuthTokenPage = function SecondaryAuthTokenPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SecondaryAuthTokenPage.prototype, Page.prototype);\nSecondaryAuthTokenPage.prototype.constructor = SecondaryAuthTokenPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SecondaryAuthTokenInstance\n *\n * @function getInstance\n * @memberof Twilio.Accounts.V1.SecondaryAuthTokenPage#\n *\n * @param {SecondaryAuthTokenPayload} payload - Payload response from the API\n *\n * @returns SecondaryAuthTokenInstance\n */\n/* jshint ignore:end */\nSecondaryAuthTokenPage.prototype.getInstance = function getInstance(payload) {\n  return new SecondaryAuthTokenInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.SecondaryAuthTokenPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSecondaryAuthTokenPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSecondaryAuthTokenPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SecondaryAuthTokenContext\n *\n * @constructor Twilio.Accounts.V1.SecondaryAuthTokenInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that the secondary Auth Token was created for\n * @property {Date} dateCreated -\n *          The ISO 8601 formatted date and time in UTC when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 formatted date and time in UTC when the resource was last updated\n * @property {string} secondaryAuthToken - The generated secondary Auth Token\n * @property {string} url -\n *          The URI for this resource, relative to `https://accounts.twilio.com`\n *\n * @param {V1} version - Version of the resource\n * @param {SecondaryAuthTokenPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nSecondaryAuthTokenInstance = function SecondaryAuthTokenInstance(version,\n    payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.secondaryAuthToken = payload.secondary_auth_token; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(SecondaryAuthTokenInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SecondaryAuthTokenContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * create a SecondaryAuthTokenInstance\n *\n * @function create\n * @memberof Twilio.Accounts.V1.SecondaryAuthTokenInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SecondaryAuthTokenInstance\n */\n/* jshint ignore:end */\nSecondaryAuthTokenInstance.prototype.create = function create(callback) {\n  return this._proxy.create(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SecondaryAuthTokenInstance\n *\n * @function remove\n * @memberof Twilio.Accounts.V1.SecondaryAuthTokenInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SecondaryAuthTokenInstance\n */\n/* jshint ignore:end */\nSecondaryAuthTokenInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.SecondaryAuthTokenInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSecondaryAuthTokenInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSecondaryAuthTokenInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SecondaryAuthTokenContext\n *\n * @constructor Twilio.Accounts.V1.SecondaryAuthTokenContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSecondaryAuthTokenContext = function SecondaryAuthTokenContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/AuthTokens/Secondary`;\n};\n\n/* jshint ignore:start */\n/**\n * create a SecondaryAuthTokenInstance\n *\n * @function create\n * @memberof Twilio.Accounts.V1.SecondaryAuthTokenContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SecondaryAuthTokenInstance\n */\n/* jshint ignore:end */\nSecondaryAuthTokenContext.prototype.create = function create(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.create({uri: this._uri, method: 'POST'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SecondaryAuthTokenInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SecondaryAuthTokenInstance\n *\n * @function remove\n * @memberof Twilio.Accounts.V1.SecondaryAuthTokenContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SecondaryAuthTokenInstance\n */\n/* jshint ignore:end */\nSecondaryAuthTokenContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Accounts.V1.SecondaryAuthTokenContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSecondaryAuthTokenContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSecondaryAuthTokenContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SecondaryAuthTokenList: SecondaryAuthTokenList,\n  SecondaryAuthTokenPage: SecondaryAuthTokenPage,\n  SecondaryAuthTokenInstance: SecondaryAuthTokenInstance,\n  SecondaryAuthTokenContext: SecondaryAuthTokenContext\n};\n", "'use strict';\nvar _ = require('lodash');\nvar RestException = require('./RestException');\n\n/**\n * @constructor\n *\n * @description Base version object\n *\n * @param {Domain} domain twilio domain\n * @param {Version} version api version\n */\nfunction Version(domain, version) {\n  this._domain = domain;\n  this._version = version;\n}\n\n/**\n * Generate absolute url from a uri\n *\n * @param  {string} uri uri to transform\n * @return {string} transformed url\n */\nVersion.prototype.absoluteUrl = function(uri) {\n  return this._domain.absoluteUrl(this.relativeUrl(uri));\n};\n\n/**\n * Generate relative url from a uri\n *\n * @param  {string} uri uri to transform\n * @return {string} transformed url\n */\nVersion.prototype.relativeUrl = function(uri) {\n  return _.trim(this._version, '/') + '/' + _.trim(uri, '/');\n};\n\n/**\n * Make a request against the domain\n *\n * @param  {object} opts request options\n * @return {Promise} promise that resolves to request response\n */\nVersion.prototype.request = function(opts) {\n  return this._domain.request(_.assign({}, opts, {\n    uri: this.relativeUrl(opts.uri),\n  }));\n};\n\n/**\n * Fetch a instance of a record\n * @throws {Error} If response returns non 2xx or 3xx status code\n *\n * @param  {object} opts request options\n * @return {Promise} promise that resolves to fetched result\n */\nVersion.prototype.fetch = function(opts) {\n  var qResponse = this.request(opts);\n\n  qResponse = qResponse.then(\n    function success(response) {\n      if (response.statusCode < 200 || response.statusCode >= 400) {\n        throw new RestException(response);\n      }\n\n      if (typeof response.body === 'string') {\n        return JSON.parse(response.body);\n      }\n      return response.body;\n    }\n  );\n\n  return qResponse;\n};\n\n/**\n * Update a record\n * @throws {Error} If response returns non 2xx status code\n *\n * @param  {object} opts request options\n * @return {Promise} promise that resolves to updated result\n */\nVersion.prototype.update = function(opts) {\n  var qResponse = this.request(opts);\n  qResponse = qResponse.then(\n    function success(response) {\n      if (response.statusCode < 200 || response.statusCode >= 300) {\n        throw new RestException(response);\n      }\n\n      if (typeof response.body === 'string') {\n        return JSON.parse(response.body);\n      }\n      return response.body;\n    }\n  );\n\n  return qResponse;\n};\n\n/**\n * Delete a record\n * @throws {Error} If response returns a 5xx status\n *\n * @param  {object} opts request options\n * @return {Promise} promise that resolves to true if record was deleted\n */\nVersion.prototype.remove = function(opts) {\n  var qResponse = this.request(opts);\n  qResponse = qResponse.then(\n    function success(response) {\n      if (response.statusCode < 200 || response.statusCode >= 300) {\n        throw new RestException(response);\n      }\n\n      return response.statusCode === 204;\n    }\n  );\n\n  return qResponse;\n};\n\n/**\n * Create a new record\n * @throws {Error} If response returns non 2xx or 201 status code\n *\n * @param  {object} opts request options\n * @return {Promise} promise that resolves to created record\n */\nVersion.prototype.create = function(opts) {\n  var qResponse = this.request(opts);\n  qResponse = qResponse.then(\n    function success(response) {\n      if (response.statusCode < 200 || response.statusCode >= 300) {\n        throw new RestException(response);\n      }\n      if (typeof response.body === 'string') {\n        return JSON.parse(response.body);\n      }\n      return response.body;\n    }\n  );\n\n  return qResponse;\n};\n\n/**\n * Fetch a page of records\n *\n * @param  {object} opts request options\n * @return {Promise} promise that resolves to page of records\n */\nVersion.prototype.page = function(opts) {\n  return this.request(opts);\n};\n\n/**\n * Process limits for list requests\n *\n * @param {object} [opts] ...\n * @param {number} [opts.limit] The maximum number of items to fetch\n * @param {number} [opts.pageSize] The maximum number of items to return\n *                                  with every request\n */\nVersion.prototype.readLimits = function(opts) {\n  var limit = opts.limit;\n  var pageSize = opts.pageSize;\n  if (!_.isNil(limit) && (!_.isFinite(limit) || limit <= 0)) {\n    throw new TypeError('Parameter limit must be a positive integer');\n  }\n\n  if (!_.isNil(pageSize) && (!_.isFinite(pageSize) || pageSize <= 0)) {\n    throw new TypeError('Parameter pageSize must be a positive integer');\n  }\n\n  if (limit && !pageSize) {\n    pageSize = limit;\n  }\n\n  return {\n    limit: limit,\n    pageSize: pageSize\n  };\n};\n\nmodule.exports = Version;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar AuthTokenPromotionList = require(\n    './v1/authTokenPromotion').AuthTokenPromotionList;\nvar CredentialList = require('./v1/credential').CredentialList;\nvar SecondaryAuthTokenList = require(\n    './v1/secondaryAuthToken').SecondaryAuthTokenList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Accounts\n *\n * @constructor Twilio.Accounts.V1\n *\n * @property {Twilio.Accounts.V1.AuthTokenPromotionList} authTokenPromotion -\n *          authTokenPromotion resource\n * @property {Twilio.Accounts.V1.CredentialList} credentials - credentials resource\n * @property {Twilio.Accounts.V1.SecondaryAuthTokenList} secondaryAuthToken -\n *          secondaryAuthToken resource\n *\n * @param {Twilio.Accounts} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._authTokenPromotion = undefined;\n  this._credentials = undefined;\n  this._secondaryAuthToken = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'authTokenPromotion', {\n    get: function() {\n      this._authTokenPromotion = this._authTokenPromotion || new AuthTokenPromotionList(this);\n      return this._authTokenPromotion;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'credentials', {\n    get: function() {\n      this._credentials = this._credentials || new CredentialList(this);\n      return this._credentials;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'secondaryAuthToken', {\n    get: function() {\n      this._secondaryAuthToken = this._secondaryAuthToken || new SecondaryAuthTokenList(this);\n      return this._secondaryAuthToken;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./accounts/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize accounts domain\n *\n * @constructor Twilio.Accounts\n *\n * @property {Twilio.Accounts.V1} v1 - v1 version\n * @property {Twilio.Accounts.V1.AuthTokenPromotionList} authTokenPromotion -\n *          authTokenPromotion resource\n * @property {Twilio.Accounts.V1.CredentialList} credentials - credentials resource\n * @property {Twilio.Accounts.V1.SecondaryAuthTokenList} secondaryAuthToken -\n *          secondaryAuthToken resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Accounts(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://accounts.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Accounts.prototype, Domain.prototype);\nAccounts.prototype.constructor = Accounts;\n\nObject.defineProperty(Accounts.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Accounts.prototype,\n  'authTokenPromotion', {\n    get: function() {\n      return this.v1.authTokenPromotion;\n    }\n});\n\nObject.defineProperty(Accounts.prototype,\n  'credentials', {\n    get: function() {\n      return this.v1.credentials;\n    }\n});\n\nObject.defineProperty(Accounts.prototype,\n  'secondaryAuthToken', {\n    get: function() {\n      return this.v1.secondaryAuthToken;\n    }\n});\n\nmodule.exports = Accounts;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar DependentPhoneNumberList;\nvar DependentPhoneNumberPage;\nvar DependentPhoneNumberInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the DependentPhoneNumberList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} addressSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nDependentPhoneNumberList = function DependentPhoneNumberList(version,\n    accountSid, addressSid) {\n  /* jshint ignore:start */\n  /**\n   * @function dependentPhoneNumbers\n   * @memberof Twilio.Api.V2010.AccountContext.AddressContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  function DependentPhoneNumberListInstance(sid) {\n    return DependentPhoneNumberListInstance.get(sid);\n  }\n\n  DependentPhoneNumberListInstance._version = version;\n  // Path Solution\n  DependentPhoneNumberListInstance._solution = {accountSid: accountSid, addressSid: addressSid};\n  DependentPhoneNumberListInstance._uri = `/Accounts/${accountSid}/Addresses/${addressSid}/DependentPhoneNumbers.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams DependentPhoneNumberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DependentPhoneNumberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DependentPhoneNumberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DependentPhoneNumberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DependentPhoneNumberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DependentPhoneNumberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DependentPhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DependentPhoneNumberInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DependentPhoneNumberListInstance.getPage = function getPage(targetUrl, callback)\n                                                               {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DependentPhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DependentPhoneNumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DependentPhoneNumberListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DependentPhoneNumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DependentPhoneNumberPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DependentPhoneNumberSolution} solution - Path solution\n *\n * @returns DependentPhoneNumberPage\n */\n/* jshint ignore:end */\nDependentPhoneNumberPage = function DependentPhoneNumberPage(version, response,\n    solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DependentPhoneNumberPage.prototype, Page.prototype);\nDependentPhoneNumberPage.prototype.constructor = DependentPhoneNumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DependentPhoneNumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberPage#\n *\n * @param {DependentPhoneNumberPayload} payload - Payload response from the API\n *\n * @returns DependentPhoneNumberInstance\n */\n/* jshint ignore:end */\nDependentPhoneNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new DependentPhoneNumberInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.addressSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDependentPhoneNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDependentPhoneNumberPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DependentPhoneNumberContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} voiceUrl -\n *          The URL we call when the phone number receives a call\n * @property {string} voiceMethod - The HTTP method used with the voice_url\n * @property {string} voiceFallbackMethod -\n *          The HTTP method used with voice_fallback_url\n * @property {string} voiceFallbackUrl -\n *          The URL we call when an error occurs in TwiML\n * @property {boolean} voiceCallerIdLookup - Whether to lookup the caller's name\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} smsFallbackMethod -\n *          The HTTP method used with sms_fallback_url\n * @property {string} smsFallbackUrl -\n *          The URL that we call when an error occurs while retrieving or executing the TwiML\n * @property {string} smsMethod - The HTTP method to use with sms_url\n * @property {string} smsUrl -\n *          The URL we call when the phone number receives an incoming SMS message\n * @property {dependent_phone_number.address_requirement} addressRequirements -\n *          Whether the phone number requires an Address registered with Twilio\n * @property {object} capabilities -\n *          Indicate if a phone can receive calls or messages\n * @property {string} statusCallback -\n *          The URL to send status information to your application\n * @property {string} statusCallbackMethod -\n *          The HTTP method we use to call status_callback\n * @property {string} apiVersion -\n *          The API version used to start a new TwiML session\n * @property {string} smsApplicationSid -\n *          The SID of the application that handles SMS messages sent to the phone number\n * @property {string} voiceApplicationSid -\n *          The SID of the application that handles calls to the phone number\n * @property {string} trunkSid -\n *          The SID of the Trunk that handles calls to the phone number\n * @property {dependent_phone_number.emergency_status} emergencyStatus -\n *          Whether the phone number is enabled for emergency calling\n * @property {string} emergencyAddressSid -\n *          The emergency address configuration to use for emergency calling\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {DependentPhoneNumberPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} addressSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nDependentPhoneNumberInstance = function DependentPhoneNumberInstance(version,\n    payload, accountSid, addressSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceCallerIdLookup = payload.voice_caller_id_lookup; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.smsApplicationSid = payload.sms_application_sid; // jshint ignore:line\n  this.voiceApplicationSid = payload.voice_application_sid; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.emergencyStatus = payload.emergency_status; // jshint ignore:line\n  this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, addressSid: addressSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDependentPhoneNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDependentPhoneNumberInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DependentPhoneNumberList: DependentPhoneNumberList,\n  DependentPhoneNumberPage: DependentPhoneNumberPage,\n  DependentPhoneNumberInstance: DependentPhoneNumberInstance\n};\n", "'use strict';\n\nvar _ = require('lodash');\nvar dayjs = require('dayjs');\nvar utc = require('dayjs/plugin/utc');\n\ndayjs.extend(utc);\n\nmodule.exports = {};\n\n/**\n * @namespace serialize\n */\n\n/**\n * @function iso8601Date\n * @memberOf serialize\n * @description turns a Date object into a string if parameter is a Date\n * otherwise returns the parameter\n *\n * @param  {Date} d date object to format\n * @return {string|object} date formatted in YYYY-MM-DD form\n */\nmodule.exports.iso8601Date = function(d) {\n  if (_.isUndefined(d) || _.isString(d) || !(_.isDate(d))) {\n    return d;\n  } else {\n    return dayjs.utc(d).format('YYYY-MM-DD');\n  }\n};\n\n/**\n * @function iso8601DateTime\n * @memberOf serialize\n * @description turns a Date object into a string if parameter is a Date\n * otherwise returns the parameter\n *\n * @param  {Date} d date object to format\n * @return {string|object} date formatted in YYYY-MM-DD[T]HH:mm:ss[Z] form\n */\nmodule.exports.iso8601DateTime = function(d) {\n  if (_.isUndefined(d) || _.isString(d) || !(d instanceof Date)) {\n    return d;\n  } else {\n    return dayjs.utc(d).format('YYYY-MM-DD[T]HH:mm:ss[Z]');\n  }\n};\n\n/**\n * @function prefixedCollapsibleMap\n * @memberOf serialize\n * @description turns a map of params int oa flattened map separated by dots\n * if the parameter is an object, otherwise returns an empty map\n *\n * @param {object} m map to transform\n * @param {string|undefined} prefix to append to each flattened value\n * @return {object} flattened map\n */\nmodule.exports.prefixedCollapsibleMap = function(m, prefix) {\n  if (_.isUndefined(m) || !_.isPlainObject(m)) {\n    return {};\n  }\n\n  function flatten(m, result, previous) {\n    result = result || {};\n    previous = previous || [];\n\n    _.each(_.keys(m), function(key) {\n      if (_.isPlainObject(m[key])) {\n        flatten(m[key], result, _.union(previous, [key]));\n      } else {\n        result[_.join(_.union(previous, [key]), '.')] = m[key];\n      }\n    });\n\n    return result;\n  }\n\n  var flattened = flatten(m);\n  var result = flattened;\n  if (prefix) {\n    result = {};\n    _.each(_.keys(flattened), function(key) {\n      result[prefix + '.' + key] = flattened[key];\n    });\n  }\n\n  return result;\n};\n\n/**\n * @function object\n * @memberOf serialize\n * @description turns an object into a JSON string if the parameter\n * is an object, otherwise returns the passed in object\n *\n * @param {object|array} o json object or array\n * @returns {string|object} stringified object\n */\nmodule.exports.object = function(o) {\n  if (_.isObject(o) || _.isArray(o)) {\n    return JSON.stringify(o);\n  }\n\n  return o;\n};\n\n/**\n * @function bool\n * @memberOf serialize\n * @description coerces a boolean literal into a string\n *\n * @param {boolean|string} input boolean or string to be coerced\n * @returns {string} a string \"true\" or \"false\"\n */\nmodule.exports.bool = function(input) {\n  if (_.isString(input)) {\n    return input;\n  }\n  if (_.isBoolean(input)) {\n    return input.toString();\n  }\n\n  return input;\n};\n\n\n/**\n * @function map\n * @memberOf serialize\n * @description maps transform over each element in input if input is an array\n *\n * @param {array} input array to map transform over, if not an array then it is\n * returned as is.\n * @returns {array} new array with transform applied to each element.\n */\nmodule.exports.map = function(input, transform) {\n  if (_.isArray(input)) {\n    return _.map(input, transform);\n  }\n  return input;\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DependentPhoneNumberList = require(\n    './address/dependentPhoneNumber').DependentPhoneNumberList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AddressList;\nvar AddressPage;\nvar AddressInstance;\nvar AddressContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AddressList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AddressList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          The SID of the Account that is responsible for the resource\n */\n/* jshint ignore:end */\nAddressList = function AddressList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function addresses\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AddressContext}\n   */\n  /* jshint ignore:end */\n  function AddressListInstance(sid) {\n    return AddressListInstance.get(sid);\n  }\n\n  AddressListInstance._version = version;\n  // Path Solution\n  AddressListInstance._solution = {accountSid: accountSid};\n  AddressListInstance._uri = `/Accounts/${accountSid}/Addresses.json`;\n  /* jshint ignore:start */\n  /**\n   * create a AddressInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.AddressList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.customerName - The name to associate with the new address\n   * @param {string} opts.street - The number and street address of the new address\n   * @param {string} opts.city - The city of the new address\n   * @param {string} opts.region - The state or region of the new address\n   * @param {string} opts.postalCode - The postal code of the new address\n   * @param {string} opts.isoCountry - The ISO country code of the new address\n   * @param {string} [opts.friendlyName] - A string to describe the new resource\n   * @param {boolean} [opts.emergencyEnabled] -\n   *          Whether to enable emergency calling on the new address\n   * @param {boolean} [opts.autoCorrectAddress] -\n   *          Whether we should automatically correct the address\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AddressInstance\n   */\n  /* jshint ignore:end */\n  AddressListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['customerName'])) {\n      throw new Error('Required parameter \"opts[\\'customerName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['street'])) {\n      throw new Error('Required parameter \"opts[\\'street\\']\" missing.');\n    }\n    if (_.isUndefined(opts['city'])) {\n      throw new Error('Required parameter \"opts[\\'city\\']\" missing.');\n    }\n    if (_.isUndefined(opts['region'])) {\n      throw new Error('Required parameter \"opts[\\'region\\']\" missing.');\n    }\n    if (_.isUndefined(opts['postalCode'])) {\n      throw new Error('Required parameter \"opts[\\'postalCode\\']\" missing.');\n    }\n    if (_.isUndefined(opts['isoCountry'])) {\n      throw new Error('Required parameter \"opts[\\'isoCountry\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'CustomerName': _.get(opts, 'customerName'),\n      'Street': _.get(opts, 'street'),\n      'City': _.get(opts, 'city'),\n      'Region': _.get(opts, 'region'),\n      'PostalCode': _.get(opts, 'postalCode'),\n      'IsoCountry': _.get(opts, 'isoCountry'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')),\n      'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AddressInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams AddressInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AddressList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.customerName] -\n   *          The `customer_name` of the Address resources to read\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Address resources to read\n   * @param {string} [opts.isoCountry] -\n   *          The ISO country code of the Address resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AddressListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AddressInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AddressList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.customerName] -\n   *          The `customer_name` of the Address resources to read\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Address resources to read\n   * @param {string} [opts.isoCountry] -\n   *          The ISO country code of the Address resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AddressListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AddressInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AddressList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.customerName] -\n   *          The `customer_name` of the Address resources to read\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Address resources to read\n   * @param {string} [opts.isoCountry] -\n   *          The ISO country code of the Address resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AddressListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'CustomerName': _.get(opts, 'customerName'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'IsoCountry': _.get(opts, 'isoCountry'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AddressPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AddressInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AddressList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AddressListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AddressPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a address\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.AddressList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AddressContext}\n   */\n  /* jshint ignore:end */\n  AddressListInstance.get = function get(sid) {\n    return new AddressContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AddressList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AddressListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AddressListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AddressListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AddressPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AddressPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AddressSolution} solution - Path solution\n *\n * @returns AddressPage\n */\n/* jshint ignore:end */\nAddressPage = function AddressPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AddressPage.prototype, Page.prototype);\nAddressPage.prototype.constructor = AddressPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AddressInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AddressPage#\n *\n * @param {AddressPayload} payload - Payload response from the API\n *\n * @returns AddressInstance\n */\n/* jshint ignore:end */\nAddressPage.prototype.getInstance = function getInstance(payload) {\n  return new AddressInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AddressPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAddressPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAddressPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AddressContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AddressInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that is responsible for the resource\n * @property {string} city - The city in which the address is located\n * @property {string} customerName - The name associated with the address\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} isoCountry - The ISO country code of the address\n * @property {string} postalCode - The postal code of the address\n * @property {string} region - The state or region of the address\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} street - The number and street address of the address\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {boolean} emergencyEnabled -\n *          Whether emergency calling has been enabled on this number\n * @property {boolean} validated -\n *          Whether the address has been validated to comply with local regulation\n * @property {boolean} verified -\n *          Whether the address has been verified to comply with regulation\n *\n * @param {V2010} version - Version of the resource\n * @param {AddressPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          The SID of the Account that is responsible for the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAddressInstance = function AddressInstance(version, payload, accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.city = payload.city; // jshint ignore:line\n  this.customerName = payload.customer_name; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.postalCode = payload.postal_code; // jshint ignore:line\n  this.region = payload.region; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.street = payload.street; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.emergencyEnabled = payload.emergency_enabled; // jshint ignore:line\n  this.validated = payload.validated; // jshint ignore:line\n  this.verified = payload.verified; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AddressInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AddressContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a AddressInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.AddressInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressInstance\n */\n/* jshint ignore:end */\nAddressInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AddressInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.AddressInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressInstance\n */\n/* jshint ignore:end */\nAddressInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AddressInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.AddressInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.customerName] - The name to associate with the address\n * @param {string} [opts.street] - The number and street address of the address\n * @param {string} [opts.city] - The city of the address\n * @param {string} [opts.region] - The state or region of the address\n * @param {string} [opts.postalCode] - The postal code of the address\n * @param {boolean} [opts.emergencyEnabled] -\n *          Whether to enable emergency calling on the address\n * @param {boolean} [opts.autoCorrectAddress] -\n *          Whether we should automatically correct the address\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressInstance\n */\n/* jshint ignore:end */\nAddressInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the dependentPhoneNumbers\n *\n * @function dependentPhoneNumbers\n * @memberof Twilio.Api.V2010.AccountContext.AddressInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberList}\n */\n/* jshint ignore:end */\nAddressInstance.prototype.dependentPhoneNumbers = function\n    dependentPhoneNumbers() {\n  return this._proxy.dependentPhoneNumbers;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AddressInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAddressInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAddressInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AddressContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AddressContext\n *\n * @property {Twilio.Api.V2010.AccountContext.AddressContext.DependentPhoneNumberList} dependentPhoneNumbers -\n *          dependentPhoneNumbers resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that is responsible for this address\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAddressContext = function AddressContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Addresses/${sid}.json`;\n\n  // Dependents\n  this._dependentPhoneNumbers = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AddressInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.AddressContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressInstance\n */\n/* jshint ignore:end */\nAddressContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AddressInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.AddressContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressInstance\n */\n/* jshint ignore:end */\nAddressContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AddressInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AddressInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.AddressContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.customerName] - The name to associate with the address\n * @param {string} [opts.street] - The number and street address of the address\n * @param {string} [opts.city] - The city of the address\n * @param {string} [opts.region] - The state or region of the address\n * @param {string} [opts.postalCode] - The postal code of the address\n * @param {boolean} [opts.emergencyEnabled] -\n *          Whether to enable emergency calling on the address\n * @param {boolean} [opts.autoCorrectAddress] -\n *          Whether we should automatically correct the address\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressInstance\n */\n/* jshint ignore:end */\nAddressContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'CustomerName': _.get(opts, 'customerName'),\n    'Street': _.get(opts, 'street'),\n    'City': _.get(opts, 'city'),\n    'Region': _.get(opts, 'region'),\n    'PostalCode': _.get(opts, 'postalCode'),\n    'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')),\n    'AutoCorrectAddress': serialize.bool(_.get(opts, 'autoCorrectAddress'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AddressInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AddressContext.prototype,\n  'dependentPhoneNumbers', {\n    get: function() {\n      if (!this._dependentPhoneNumbers) {\n        this._dependentPhoneNumbers = new DependentPhoneNumberList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n      return this._dependentPhoneNumbers;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AddressContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAddressContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAddressContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AddressList: AddressList,\n  AddressPage: AddressPage,\n  AddressInstance: AddressInstance,\n  AddressContext: AddressContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ApplicationList;\nvar ApplicationPage;\nvar ApplicationInstance;\nvar ApplicationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ApplicationList\n *\n * @constructor Twilio.Api.V2010.AccountContext.ApplicationList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nApplicationList = function ApplicationList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function applications\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ApplicationContext}\n   */\n  /* jshint ignore:end */\n  function ApplicationListInstance(sid) {\n    return ApplicationListInstance.get(sid);\n  }\n\n  ApplicationListInstance._version = version;\n  // Path Solution\n  ApplicationListInstance._solution = {accountSid: accountSid};\n  ApplicationListInstance._uri = `/Accounts/${accountSid}/Applications.json`;\n  /* jshint ignore:start */\n  /**\n   * create a ApplicationInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.ApplicationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.apiVersion] -\n   *          The API version to use to start a new TwiML session\n   * @param {string} [opts.voiceUrl] -\n   *          The URL to call when the phone number receives a call\n   * @param {string} [opts.voiceMethod] - The HTTP method to use with the voice_url\n   * @param {string} [opts.voiceFallbackUrl] -\n   *          The URL to call when a TwiML error occurs\n   * @param {string} [opts.voiceFallbackMethod] -\n   *          The HTTP method to use with voice_fallback_url\n   * @param {string} [opts.statusCallback] -\n   *          The URL to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method to use to call status_callback\n   * @param {boolean} [opts.voiceCallerIdLookup] -\n   *          Whether to lookup the caller's name\n   * @param {string} [opts.smsUrl] -\n   *          The URL to call when the phone number receives an incoming SMS message\n   * @param {string} [opts.smsMethod] - The HTTP method to use with sms_url\n   * @param {string} [opts.smsFallbackUrl] -\n   *          The URL to call when an error occurs while retrieving or executing the TwiML\n   * @param {string} [opts.smsFallbackMethod] -\n   *          The HTTP method to use with sms_fallback_url\n   * @param {string} [opts.smsStatusCallback] -\n   *          The URL to send status information to your application\n   * @param {string} [opts.messageStatusCallback] -\n   *          The URL to send message status information to your application\n   * @param {string} [opts.friendlyName] - A string to describe the new resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ApplicationInstance\n   */\n  /* jshint ignore:end */\n  ApplicationListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ApiVersion': _.get(opts, 'apiVersion'),\n      'VoiceUrl': _.get(opts, 'voiceUrl'),\n      'VoiceMethod': _.get(opts, 'voiceMethod'),\n      'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n      'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')),\n      'SmsUrl': _.get(opts, 'smsUrl'),\n      'SmsMethod': _.get(opts, 'smsMethod'),\n      'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n      'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n      'SmsStatusCallback': _.get(opts, 'smsStatusCallback'),\n      'MessageStatusCallback': _.get(opts, 'messageStatusCallback'),\n      'FriendlyName': _.get(opts, 'friendlyName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ApplicationInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ApplicationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.ApplicationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Application resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ApplicationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ApplicationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.ApplicationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Application resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ApplicationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ApplicationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.ApplicationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Application resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ApplicationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ApplicationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ApplicationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.ApplicationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ApplicationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ApplicationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a application\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.ApplicationList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ApplicationContext}\n   */\n  /* jshint ignore:end */\n  ApplicationListInstance.get = function get(sid) {\n    return new ApplicationContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.ApplicationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ApplicationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ApplicationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ApplicationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ApplicationPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.ApplicationPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ApplicationSolution} solution - Path solution\n *\n * @returns ApplicationPage\n */\n/* jshint ignore:end */\nApplicationPage = function ApplicationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ApplicationPage.prototype, Page.prototype);\nApplicationPage.prototype.constructor = ApplicationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ApplicationInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationPage#\n *\n * @param {ApplicationPayload} payload - Payload response from the API\n *\n * @returns ApplicationInstance\n */\n/* jshint ignore:end */\nApplicationPage.prototype.getInstance = function getInstance(payload) {\n  return new ApplicationInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nApplicationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nApplicationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ApplicationContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ApplicationInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} apiVersion -\n *          The API version used to start a new TwiML session\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} messageStatusCallback -\n *          The URL to send message status information to your application\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} smsFallbackMethod -\n *          The HTTP method used with sms_fallback_url\n * @property {string} smsFallbackUrl -\n *          The URL that we call when an error occurs while retrieving or executing the TwiML\n * @property {string} smsMethod - The HTTP method to use with sms_url\n * @property {string} smsStatusCallback -\n *          The URL to send status information to your application\n * @property {string} smsUrl -\n *          The URL we call when the phone number receives an incoming SMS message\n * @property {string} statusCallback -\n *          The URL to send status information to your application\n * @property {string} statusCallbackMethod -\n *          The HTTP method we use to call status_callback\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {boolean} voiceCallerIdLookup - Whether to lookup the caller's name\n * @property {string} voiceFallbackMethod -\n *          The HTTP method used with voice_fallback_url\n * @property {string} voiceFallbackUrl - The URL we call when a TwiML error occurs\n * @property {string} voiceMethod - The HTTP method used with the voice_url\n * @property {string} voiceUrl -\n *          The URL we call when the phone number receives a call\n *\n * @param {V2010} version - Version of the resource\n * @param {ApplicationPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nApplicationInstance = function ApplicationInstance(version, payload, accountSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.messageStatusCallback = payload.message_status_callback; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsStatusCallback = payload.sms_status_callback; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.voiceCallerIdLookup = payload.voice_caller_id_lookup; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ApplicationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ApplicationContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a ApplicationInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ApplicationInstance\n */\n/* jshint ignore:end */\nApplicationInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ApplicationInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ApplicationInstance\n */\n/* jshint ignore:end */\nApplicationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ApplicationInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.apiVersion] -\n *          The API version to use to start a new TwiML session\n * @param {string} [opts.voiceUrl] -\n *          The URL to call when the phone number receives a call\n * @param {string} [opts.voiceMethod] - The HTTP method to use with the voice_url\n * @param {string} [opts.voiceFallbackUrl] -\n *          The URL to call when a TwiML error occurs\n * @param {string} [opts.voiceFallbackMethod] -\n *          The HTTP method to use with voice_fallback_url\n * @param {string} [opts.statusCallback] -\n *          The URL to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method to use to call status_callback\n * @param {boolean} [opts.voiceCallerIdLookup] -\n *          Whether to lookup the caller's name\n * @param {string} [opts.smsUrl] -\n *          The URL to call when the phone number receives an incoming SMS message\n * @param {string} [opts.smsMethod] - The HTTP method to use with sms_url\n * @param {string} [opts.smsFallbackUrl] -\n *          The URL to call when an error occurs while retrieving or executing the TwiML\n * @param {string} [opts.smsFallbackMethod] -\n *          The HTTP method to use with sms_fallback_url\n * @param {string} [opts.smsStatusCallback] -\n *          Same as message_status_callback. Deprecated, included for backwards compatibility.\n * @param {string} [opts.messageStatusCallback] -\n *          The URL to send message status information to your application\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ApplicationInstance\n */\n/* jshint ignore:end */\nApplicationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nApplicationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nApplicationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ApplicationContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ApplicationContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nApplicationContext = function ApplicationContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Applications/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ApplicationInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ApplicationInstance\n */\n/* jshint ignore:end */\nApplicationContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ApplicationInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ApplicationInstance\n */\n/* jshint ignore:end */\nApplicationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ApplicationInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ApplicationInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.apiVersion] -\n *          The API version to use to start a new TwiML session\n * @param {string} [opts.voiceUrl] -\n *          The URL to call when the phone number receives a call\n * @param {string} [opts.voiceMethod] - The HTTP method to use with the voice_url\n * @param {string} [opts.voiceFallbackUrl] -\n *          The URL to call when a TwiML error occurs\n * @param {string} [opts.voiceFallbackMethod] -\n *          The HTTP method to use with voice_fallback_url\n * @param {string} [opts.statusCallback] -\n *          The URL to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method to use to call status_callback\n * @param {boolean} [opts.voiceCallerIdLookup] -\n *          Whether to lookup the caller's name\n * @param {string} [opts.smsUrl] -\n *          The URL to call when the phone number receives an incoming SMS message\n * @param {string} [opts.smsMethod] - The HTTP method to use with sms_url\n * @param {string} [opts.smsFallbackUrl] -\n *          The URL to call when an error occurs while retrieving or executing the TwiML\n * @param {string} [opts.smsFallbackMethod] -\n *          The HTTP method to use with sms_fallback_url\n * @param {string} [opts.smsStatusCallback] -\n *          Same as message_status_callback. Deprecated, included for backwards compatibility.\n * @param {string} [opts.messageStatusCallback] -\n *          The URL to send message status information to your application\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ApplicationInstance\n */\n/* jshint ignore:end */\nApplicationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'ApiVersion': _.get(opts, 'apiVersion'),\n    'VoiceUrl': _.get(opts, 'voiceUrl'),\n    'VoiceMethod': _.get(opts, 'voiceMethod'),\n    'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n    'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n    'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')),\n    'SmsUrl': _.get(opts, 'smsUrl'),\n    'SmsMethod': _.get(opts, 'smsMethod'),\n    'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n    'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n    'SmsStatusCallback': _.get(opts, 'smsStatusCallback'),\n    'MessageStatusCallback': _.get(opts, 'messageStatusCallback')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ApplicationInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ApplicationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nApplicationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nApplicationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ApplicationList: ApplicationList,\n  ApplicationPage: ApplicationPage,\n  ApplicationInstance: ApplicationInstance,\n  ApplicationContext: ApplicationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AuthorizedConnectAppList;\nvar AuthorizedConnectAppPage;\nvar AuthorizedConnectAppInstance;\nvar AuthorizedConnectAppContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthorizedConnectAppList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nAuthorizedConnectAppList = function AuthorizedConnectAppList(version,\n    accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function authorizedConnectApps\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AuthorizedConnectAppContext}\n   */\n  /* jshint ignore:end */\n  function AuthorizedConnectAppListInstance(sid) {\n    return AuthorizedConnectAppListInstance.get(sid);\n  }\n\n  AuthorizedConnectAppListInstance._version = version;\n  // Path Solution\n  AuthorizedConnectAppListInstance._solution = {accountSid: accountSid};\n  AuthorizedConnectAppListInstance._uri = `/Accounts/${accountSid}/AuthorizedConnectApps.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams AuthorizedConnectAppInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AuthorizedConnectAppListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AuthorizedConnectAppInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthorizedConnectAppListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AuthorizedConnectAppInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthorizedConnectAppListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthorizedConnectAppPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AuthorizedConnectAppInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthorizedConnectAppListInstance.getPage = function getPage(targetUrl, callback)\n                                                               {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthorizedConnectAppPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a authorized_connect_app\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList#\n   *\n   * @param {string} connectAppSid - The SID of the Connect App to fetch\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AuthorizedConnectAppContext}\n   */\n  /* jshint ignore:end */\n  AuthorizedConnectAppListInstance.get = function get(connectAppSid) {\n    return new AuthorizedConnectAppContext(this._version, this._solution.accountSid, connectAppSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AuthorizedConnectAppListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AuthorizedConnectAppListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AuthorizedConnectAppListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthorizedConnectAppPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AuthorizedConnectAppPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AuthorizedConnectAppSolution} solution - Path solution\n *\n * @returns AuthorizedConnectAppPage\n */\n/* jshint ignore:end */\nAuthorizedConnectAppPage = function AuthorizedConnectAppPage(version, response,\n    solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AuthorizedConnectAppPage.prototype, Page.prototype);\nAuthorizedConnectAppPage.prototype.constructor = AuthorizedConnectAppPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AuthorizedConnectAppInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppPage#\n *\n * @param {AuthorizedConnectAppPayload} payload - Payload response from the API\n *\n * @returns AuthorizedConnectAppInstance\n */\n/* jshint ignore:end */\nAuthorizedConnectAppPage.prototype.getInstance = function getInstance(payload) {\n  return new AuthorizedConnectAppInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthorizedConnectAppPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthorizedConnectAppPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthorizedConnectAppContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AuthorizedConnectAppInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} connectAppCompanyName -\n *          The company name set for the Connect App\n * @property {string} connectAppDescription - A detailed description of the app\n * @property {string} connectAppFriendlyName - The name of the Connect App\n * @property {string} connectAppHomepageUrl - The public URL for the Connect App\n * @property {string} connectAppSid - The SID that we assigned to the Connect App\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {authorized_connect_app.permission} permissions -\n *          Permissions authorized to the app\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {AuthorizedConnectAppPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} connectAppSid - The SID of the Connect App to fetch\n */\n/* jshint ignore:end */\nAuthorizedConnectAppInstance = function AuthorizedConnectAppInstance(version,\n    payload, accountSid, connectAppSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.connectAppCompanyName = payload.connect_app_company_name; // jshint ignore:line\n  this.connectAppDescription = payload.connect_app_description; // jshint ignore:line\n  this.connectAppFriendlyName = payload.connect_app_friendly_name; // jshint ignore:line\n  this.connectAppHomepageUrl = payload.connect_app_homepage_url; // jshint ignore:line\n  this.connectAppSid = payload.connect_app_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.permissions = payload.permissions; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, connectAppSid: connectAppSid || this.connectAppSid, };\n};\n\nObject.defineProperty(AuthorizedConnectAppInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AuthorizedConnectAppContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.connectAppSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AuthorizedConnectAppInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthorizedConnectAppInstance\n */\n/* jshint ignore:end */\nAuthorizedConnectAppInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthorizedConnectAppInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthorizedConnectAppInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthorizedConnectAppContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AuthorizedConnectAppContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} connectAppSid - The SID of the Connect App to fetch\n */\n/* jshint ignore:end */\nAuthorizedConnectAppContext = function AuthorizedConnectAppContext(version,\n    accountSid, connectAppSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, connectAppSid: connectAppSid, };\n  this._uri = `/Accounts/${accountSid}/AuthorizedConnectApps/${connectAppSid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AuthorizedConnectAppInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthorizedConnectAppInstance\n */\n/* jshint ignore:end */\nAuthorizedConnectAppContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AuthorizedConnectAppInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.connectAppSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AuthorizedConnectAppContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthorizedConnectAppContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAuthorizedConnectAppContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AuthorizedConnectAppList: AuthorizedConnectAppList,\n  AuthorizedConnectAppPage: AuthorizedConnectAppPage,\n  AuthorizedConnectAppInstance: AuthorizedConnectAppInstance,\n  AuthorizedConnectAppContext: AuthorizedConnectAppContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar LocalList;\nvar LocalPage;\nvar LocalInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the LocalList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The account_sid\n * @param {string} countryCode - The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nLocalList = function LocalList(version, accountSid, countryCode) {\n  /* jshint ignore:start */\n  /**\n   * @function local\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalContext}\n   */\n  /* jshint ignore:end */\n  function LocalListInstance(sid) {\n    return LocalListInstance.get(sid);\n  }\n\n  LocalListInstance._version = version;\n  // Path Solution\n  LocalListInstance._solution = {accountSid: accountSid, countryCode: countryCode};\n  LocalListInstance._uri = `/Accounts/${accountSid}/AvailablePhoneNumbers/${countryCode}/Local.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams LocalInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  LocalListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists LocalInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LocalListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of LocalInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LocalListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'AreaCode': _.get(opts, 'areaCode'),\n      'Contains': _.get(opts, 'contains'),\n      'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')),\n      'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')),\n      'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')),\n      'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')),\n      'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')),\n      'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')),\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'NearNumber': _.get(opts, 'nearNumber'),\n      'NearLatLong': _.get(opts, 'nearLatLong'),\n      'Distance': _.get(opts, 'distance'),\n      'InPostalCode': _.get(opts, 'inPostalCode'),\n      'InRegion': _.get(opts, 'inRegion'),\n      'InRateCenter': _.get(opts, 'inRateCenter'),\n      'InLata': _.get(opts, 'inLata'),\n      'InLocality': _.get(opts, 'inLocality'),\n      'FaxEnabled': serialize.bool(_.get(opts, 'faxEnabled')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new LocalPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of LocalInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LocalListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new LocalPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  LocalListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  LocalListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return LocalListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the LocalPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {LocalSolution} solution - Path solution\n *\n * @returns LocalPage\n */\n/* jshint ignore:end */\nLocalPage = function LocalPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(LocalPage.prototype, Page.prototype);\nLocalPage.prototype.constructor = LocalPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of LocalInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalPage#\n *\n * @param {LocalPayload} payload - Payload response from the API\n *\n * @returns LocalInstance\n */\n/* jshint ignore:end */\nLocalPage.prototype.getInstance = function getInstance(payload) {\n  return new LocalInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.countryCode\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nLocalPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nLocalPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the LocalContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalInstance\n *\n * @property {string} friendlyName - A formatted version of the phone number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} lata - The LATA of this phone number\n * @property {string} locality -\n *          The locality or city of this phone number's location\n * @property {string} rateCenter - The rate center of this phone number\n * @property {number} latitude - The latitude of this phone number's location\n * @property {number} longitude - The longitude of this phone number's location\n * @property {string} region -\n *          The two-letter state or province abbreviation of this phone number's location\n * @property {string} postalCode -\n *          The postal or ZIP code of this phone number's location\n * @property {string} isoCountry - The ISO country code of this phone number\n * @property {string} addressRequirements -\n *          The type of Address resource the phone number requires\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Whether a phone number can receive calls or messages\n *\n * @param {V2010} version - Version of the resource\n * @param {LocalPayload} payload - The instance payload\n * @param {account_sid} accountSid - The account_sid\n * @param {iso_country_code} countryCode -\n *          The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nLocalInstance = function LocalInstance(version, payload, accountSid,\n                                        countryCode) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.lata = payload.lata; // jshint ignore:line\n  this.locality = payload.locality; // jshint ignore:line\n  this.rateCenter = payload.rate_center; // jshint ignore:line\n  this.latitude = deserialize.decimal(payload.latitude); // jshint ignore:line\n  this.longitude = deserialize.decimal(payload.longitude); // jshint ignore:line\n  this.region = payload.region; // jshint ignore:line\n  this.postalCode = payload.postal_code; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, countryCode: countryCode, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nLocalInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nLocalInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  LocalList: LocalList,\n  LocalPage: LocalPage,\n  LocalInstance: LocalInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MachineToMachineList;\nvar MachineToMachinePage;\nvar MachineToMachineInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the MachineToMachineList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The account_sid\n * @param {string} countryCode - The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nMachineToMachineList = function MachineToMachineList(version, accountSid,\n                                                      countryCode) {\n  /* jshint ignore:start */\n  /**\n   * @function machineToMachine\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineContext}\n   */\n  /* jshint ignore:end */\n  function MachineToMachineListInstance(sid) {\n    return MachineToMachineListInstance.get(sid);\n  }\n\n  MachineToMachineListInstance._version = version;\n  // Path Solution\n  MachineToMachineListInstance._solution = {accountSid: accountSid, countryCode: countryCode};\n  MachineToMachineListInstance._uri = `/Accounts/${accountSid}/AvailablePhoneNumbers/${countryCode}/MachineToMachine.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams MachineToMachineInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MachineToMachineListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MachineToMachineInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MachineToMachineListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MachineToMachineInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MachineToMachineListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'AreaCode': _.get(opts, 'areaCode'),\n      'Contains': _.get(opts, 'contains'),\n      'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')),\n      'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')),\n      'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')),\n      'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')),\n      'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')),\n      'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')),\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'NearNumber': _.get(opts, 'nearNumber'),\n      'NearLatLong': _.get(opts, 'nearLatLong'),\n      'Distance': _.get(opts, 'distance'),\n      'InPostalCode': _.get(opts, 'inPostalCode'),\n      'InRegion': _.get(opts, 'inRegion'),\n      'InRateCenter': _.get(opts, 'inRateCenter'),\n      'InLata': _.get(opts, 'inLata'),\n      'InLocality': _.get(opts, 'inLocality'),\n      'FaxEnabled': serialize.bool(_.get(opts, 'faxEnabled')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MachineToMachinePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MachineToMachineInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MachineToMachineListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MachineToMachinePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MachineToMachineListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MachineToMachineListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MachineToMachineListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MachineToMachinePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachinePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MachineToMachineSolution} solution - Path solution\n *\n * @returns MachineToMachinePage\n */\n/* jshint ignore:end */\nMachineToMachinePage = function MachineToMachinePage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MachineToMachinePage.prototype, Page.prototype);\nMachineToMachinePage.prototype.constructor = MachineToMachinePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MachineToMachineInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachinePage#\n *\n * @param {MachineToMachinePayload} payload - Payload response from the API\n *\n * @returns MachineToMachineInstance\n */\n/* jshint ignore:end */\nMachineToMachinePage.prototype.getInstance = function getInstance(payload) {\n  return new MachineToMachineInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.countryCode\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachinePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMachineToMachinePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMachineToMachinePage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MachineToMachineContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineInstance\n *\n * @property {string} friendlyName - A formatted version of the phone number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} lata - The LATA of this phone number\n * @property {string} locality -\n *          The locality or city of this phone number's location\n * @property {string} rateCenter - The rate center of this phone number\n * @property {number} latitude - The latitude of this phone number's location\n * @property {number} longitude - The longitude of this phone number's location\n * @property {string} region -\n *          The two-letter state or province abbreviation of this phone number's location\n * @property {string} postalCode -\n *          The postal or ZIP code of this phone number's location\n * @property {string} isoCountry - The ISO country code of this phone number\n * @property {string} addressRequirements -\n *          The type of Address resource the phone number requires\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Whether a phone number can receive calls or messages\n *\n * @param {V2010} version - Version of the resource\n * @param {MachineToMachinePayload} payload - The instance payload\n * @param {account_sid} accountSid - The account_sid\n * @param {iso_country_code} countryCode -\n *          The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nMachineToMachineInstance = function MachineToMachineInstance(version, payload,\n    accountSid, countryCode) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.lata = payload.lata; // jshint ignore:line\n  this.locality = payload.locality; // jshint ignore:line\n  this.rateCenter = payload.rate_center; // jshint ignore:line\n  this.latitude = deserialize.decimal(payload.latitude); // jshint ignore:line\n  this.longitude = deserialize.decimal(payload.longitude); // jshint ignore:line\n  this.region = payload.region; // jshint ignore:line\n  this.postalCode = payload.postal_code; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, countryCode: countryCode, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMachineToMachineInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMachineToMachineInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MachineToMachineList: MachineToMachineList,\n  MachineToMachinePage: MachineToMachinePage,\n  MachineToMachineInstance: MachineToMachineInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MobileList;\nvar MobilePage;\nvar MobileInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the MobileList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The account_sid\n * @param {string} countryCode - The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nMobileList = function MobileList(version, accountSid, countryCode) {\n  /* jshint ignore:start */\n  /**\n   * @function mobile\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileContext}\n   */\n  /* jshint ignore:end */\n  function MobileListInstance(sid) {\n    return MobileListInstance.get(sid);\n  }\n\n  MobileListInstance._version = version;\n  // Path Solution\n  MobileListInstance._solution = {accountSid: accountSid, countryCode: countryCode};\n  MobileListInstance._uri = `/Accounts/${accountSid}/AvailablePhoneNumbers/${countryCode}/Mobile.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams MobileInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MobileListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MobileInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MobileListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MobileInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MobileListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'AreaCode': _.get(opts, 'areaCode'),\n      'Contains': _.get(opts, 'contains'),\n      'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')),\n      'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')),\n      'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')),\n      'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')),\n      'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')),\n      'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')),\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'NearNumber': _.get(opts, 'nearNumber'),\n      'NearLatLong': _.get(opts, 'nearLatLong'),\n      'Distance': _.get(opts, 'distance'),\n      'InPostalCode': _.get(opts, 'inPostalCode'),\n      'InRegion': _.get(opts, 'inRegion'),\n      'InRateCenter': _.get(opts, 'inRateCenter'),\n      'InLata': _.get(opts, 'inLata'),\n      'InLocality': _.get(opts, 'inLocality'),\n      'FaxEnabled': serialize.bool(_.get(opts, 'faxEnabled')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MobilePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MobileInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MobileListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MobilePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MobileListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MobileListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MobileListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MobilePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobilePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MobileSolution} solution - Path solution\n *\n * @returns MobilePage\n */\n/* jshint ignore:end */\nMobilePage = function MobilePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MobilePage.prototype, Page.prototype);\nMobilePage.prototype.constructor = MobilePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MobileInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobilePage#\n *\n * @param {MobilePayload} payload - Payload response from the API\n *\n * @returns MobileInstance\n */\n/* jshint ignore:end */\nMobilePage.prototype.getInstance = function getInstance(payload) {\n  return new MobileInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.countryCode\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobilePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMobilePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMobilePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MobileContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileInstance\n *\n * @property {string} friendlyName - A formatted version of the phone number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} lata - The LATA of this phone number\n * @property {string} locality -\n *          The locality or city of this phone number's location\n * @property {string} rateCenter - The rate center of this phone number\n * @property {number} latitude - The latitude of this phone number's location\n * @property {number} longitude - The longitude of this phone number's location\n * @property {string} region -\n *          The two-letter state or province abbreviation of this phone number's location\n * @property {string} postalCode -\n *          The postal or ZIP code of this phone number's location\n * @property {string} isoCountry - The ISO country code of this phone number\n * @property {string} addressRequirements -\n *          The type of Address resource the phone number requires\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Whether a phone number can receive calls or messages\n *\n * @param {V2010} version - Version of the resource\n * @param {MobilePayload} payload - The instance payload\n * @param {account_sid} accountSid - The account_sid\n * @param {iso_country_code} countryCode -\n *          The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nMobileInstance = function MobileInstance(version, payload, accountSid,\n                                          countryCode) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.lata = payload.lata; // jshint ignore:line\n  this.locality = payload.locality; // jshint ignore:line\n  this.rateCenter = payload.rate_center; // jshint ignore:line\n  this.latitude = deserialize.decimal(payload.latitude); // jshint ignore:line\n  this.longitude = deserialize.decimal(payload.longitude); // jshint ignore:line\n  this.region = payload.region; // jshint ignore:line\n  this.postalCode = payload.postal_code; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, countryCode: countryCode, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMobileInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMobileInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MobileList: MobileList,\n  MobilePage: MobilePage,\n  MobileInstance: MobileInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar NationalList;\nvar NationalPage;\nvar NationalInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the NationalList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The account_sid\n * @param {string} countryCode - The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nNationalList = function NationalList(version, accountSid, countryCode) {\n  /* jshint ignore:start */\n  /**\n   * @function national\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalContext}\n   */\n  /* jshint ignore:end */\n  function NationalListInstance(sid) {\n    return NationalListInstance.get(sid);\n  }\n\n  NationalListInstance._version = version;\n  // Path Solution\n  NationalListInstance._solution = {accountSid: accountSid, countryCode: countryCode};\n  NationalListInstance._uri = `/Accounts/${accountSid}/AvailablePhoneNumbers/${countryCode}/National.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams NationalInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  NationalListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists NationalInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NationalListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of NationalInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NationalListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'AreaCode': _.get(opts, 'areaCode'),\n      'Contains': _.get(opts, 'contains'),\n      'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')),\n      'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')),\n      'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')),\n      'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')),\n      'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')),\n      'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')),\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'NearNumber': _.get(opts, 'nearNumber'),\n      'NearLatLong': _.get(opts, 'nearLatLong'),\n      'Distance': _.get(opts, 'distance'),\n      'InPostalCode': _.get(opts, 'inPostalCode'),\n      'InRegion': _.get(opts, 'inRegion'),\n      'InRateCenter': _.get(opts, 'inRateCenter'),\n      'InLata': _.get(opts, 'inLata'),\n      'InLocality': _.get(opts, 'inLocality'),\n      'FaxEnabled': serialize.bool(_.get(opts, 'faxEnabled')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NationalPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of NationalInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NationalListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NationalPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NationalListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NationalListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NationalListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NationalPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NationalSolution} solution - Path solution\n *\n * @returns NationalPage\n */\n/* jshint ignore:end */\nNationalPage = function NationalPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NationalPage.prototype, Page.prototype);\nNationalPage.prototype.constructor = NationalPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NationalInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalPage#\n *\n * @param {NationalPayload} payload - Payload response from the API\n *\n * @returns NationalInstance\n */\n/* jshint ignore:end */\nNationalPage.prototype.getInstance = function getInstance(payload) {\n  return new NationalInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.countryCode\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNationalPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNationalPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NationalContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalInstance\n *\n * @property {string} friendlyName - A formatted version of the phone number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} lata - The LATA of this phone number\n * @property {string} locality -\n *          The locality or city of this phone number's location\n * @property {string} rateCenter - The rate center of this phone number\n * @property {number} latitude - The latitude of this phone number's location\n * @property {number} longitude - The longitude of this phone number's location\n * @property {string} region -\n *          The two-letter state or province abbreviation of this phone number's location\n * @property {string} postalCode -\n *          The postal or ZIP code of this phone number's location\n * @property {string} isoCountry - The ISO country code of this phone number\n * @property {string} addressRequirements -\n *          The type of Address resource the phone number requires\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Whether a phone number can receive calls or messages\n *\n * @param {V2010} version - Version of the resource\n * @param {NationalPayload} payload - The instance payload\n * @param {account_sid} accountSid - The account_sid\n * @param {iso_country_code} countryCode -\n *          The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nNationalInstance = function NationalInstance(version, payload, accountSid,\n                                              countryCode) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.lata = payload.lata; // jshint ignore:line\n  this.locality = payload.locality; // jshint ignore:line\n  this.rateCenter = payload.rate_center; // jshint ignore:line\n  this.latitude = deserialize.decimal(payload.latitude); // jshint ignore:line\n  this.longitude = deserialize.decimal(payload.longitude); // jshint ignore:line\n  this.region = payload.region; // jshint ignore:line\n  this.postalCode = payload.postal_code; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, countryCode: countryCode, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNationalInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNationalInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NationalList: NationalList,\n  NationalPage: NationalPage,\n  NationalInstance: NationalInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SharedCostList;\nvar SharedCostPage;\nvar SharedCostInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the SharedCostList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The account_sid\n * @param {string} countryCode - The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nSharedCostList = function SharedCostList(version, accountSid, countryCode) {\n  /* jshint ignore:start */\n  /**\n   * @function sharedCost\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostContext}\n   */\n  /* jshint ignore:end */\n  function SharedCostListInstance(sid) {\n    return SharedCostListInstance.get(sid);\n  }\n\n  SharedCostListInstance._version = version;\n  // Path Solution\n  SharedCostListInstance._solution = {accountSid: accountSid, countryCode: countryCode};\n  SharedCostListInstance._uri = `/Accounts/${accountSid}/AvailablePhoneNumbers/${countryCode}/SharedCost.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams SharedCostInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SharedCostListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SharedCostInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SharedCostListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SharedCostInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SharedCostListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'AreaCode': _.get(opts, 'areaCode'),\n      'Contains': _.get(opts, 'contains'),\n      'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')),\n      'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')),\n      'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')),\n      'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')),\n      'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')),\n      'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')),\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'NearNumber': _.get(opts, 'nearNumber'),\n      'NearLatLong': _.get(opts, 'nearLatLong'),\n      'Distance': _.get(opts, 'distance'),\n      'InPostalCode': _.get(opts, 'inPostalCode'),\n      'InRegion': _.get(opts, 'inRegion'),\n      'InRateCenter': _.get(opts, 'inRateCenter'),\n      'InLata': _.get(opts, 'inLata'),\n      'InLocality': _.get(opts, 'inLocality'),\n      'FaxEnabled': serialize.bool(_.get(opts, 'faxEnabled')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SharedCostPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SharedCostInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SharedCostListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SharedCostPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SharedCostListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SharedCostListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SharedCostListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SharedCostPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SharedCostSolution} solution - Path solution\n *\n * @returns SharedCostPage\n */\n/* jshint ignore:end */\nSharedCostPage = function SharedCostPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SharedCostPage.prototype, Page.prototype);\nSharedCostPage.prototype.constructor = SharedCostPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SharedCostInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostPage#\n *\n * @param {SharedCostPayload} payload - Payload response from the API\n *\n * @returns SharedCostInstance\n */\n/* jshint ignore:end */\nSharedCostPage.prototype.getInstance = function getInstance(payload) {\n  return new SharedCostInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.countryCode\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSharedCostPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSharedCostPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SharedCostContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostInstance\n *\n * @property {string} friendlyName - A formatted version of the phone number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} lata - The LATA of this phone number\n * @property {string} locality -\n *          The locality or city of this phone number's location\n * @property {string} rateCenter - The rate center of this phone number\n * @property {number} latitude - The latitude of this phone number's location\n * @property {number} longitude - The longitude of this phone number's location\n * @property {string} region -\n *          The two-letter state or province abbreviation of this phone number's location\n * @property {string} postalCode -\n *          The postal or ZIP code of this phone number's location\n * @property {string} isoCountry - The ISO country code of this phone number\n * @property {string} addressRequirements -\n *          The type of Address resource the phone number requires\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Whether a phone number can receive calls or messages\n *\n * @param {V2010} version - Version of the resource\n * @param {SharedCostPayload} payload - The instance payload\n * @param {account_sid} accountSid - The account_sid\n * @param {iso_country_code} countryCode -\n *          The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nSharedCostInstance = function SharedCostInstance(version, payload, accountSid,\n                                                  countryCode) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.lata = payload.lata; // jshint ignore:line\n  this.locality = payload.locality; // jshint ignore:line\n  this.rateCenter = payload.rate_center; // jshint ignore:line\n  this.latitude = deserialize.decimal(payload.latitude); // jshint ignore:line\n  this.longitude = deserialize.decimal(payload.longitude); // jshint ignore:line\n  this.region = payload.region; // jshint ignore:line\n  this.postalCode = payload.postal_code; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, countryCode: countryCode, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSharedCostInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSharedCostInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SharedCostList: SharedCostList,\n  SharedCostPage: SharedCostPage,\n  SharedCostInstance: SharedCostInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TollFreeList;\nvar TollFreePage;\nvar TollFreeInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the TollFreeList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The account_sid\n * @param {string} countryCode - The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nTollFreeList = function TollFreeList(version, accountSid, countryCode) {\n  /* jshint ignore:start */\n  /**\n   * @function tollFree\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeContext}\n   */\n  /* jshint ignore:end */\n  function TollFreeListInstance(sid) {\n    return TollFreeListInstance.get(sid);\n  }\n\n  TollFreeListInstance._version = version;\n  // Path Solution\n  TollFreeListInstance._solution = {accountSid: accountSid, countryCode: countryCode};\n  TollFreeListInstance._uri = `/Accounts/${accountSid}/AvailablePhoneNumbers/${countryCode}/TollFree.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams TollFreeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TollFreeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TollFreeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'AreaCode': _.get(opts, 'areaCode'),\n      'Contains': _.get(opts, 'contains'),\n      'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')),\n      'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')),\n      'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')),\n      'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')),\n      'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')),\n      'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')),\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'NearNumber': _.get(opts, 'nearNumber'),\n      'NearLatLong': _.get(opts, 'nearLatLong'),\n      'Distance': _.get(opts, 'distance'),\n      'InPostalCode': _.get(opts, 'inPostalCode'),\n      'InRegion': _.get(opts, 'inRegion'),\n      'InRateCenter': _.get(opts, 'inRateCenter'),\n      'InLata': _.get(opts, 'inLata'),\n      'InLocality': _.get(opts, 'inLocality'),\n      'FaxEnabled': serialize.bool(_.get(opts, 'faxEnabled')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TollFreePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TollFreeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TollFreePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TollFreeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TollFreeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TollFreePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TollFreeSolution} solution - Path solution\n *\n * @returns TollFreePage\n */\n/* jshint ignore:end */\nTollFreePage = function TollFreePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TollFreePage.prototype, Page.prototype);\nTollFreePage.prototype.constructor = TollFreePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TollFreeInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreePage#\n *\n * @param {TollFreePayload} payload - Payload response from the API\n *\n * @returns TollFreeInstance\n */\n/* jshint ignore:end */\nTollFreePage.prototype.getInstance = function getInstance(payload) {\n  return new TollFreeInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.countryCode\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTollFreePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTollFreePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TollFreeContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeInstance\n *\n * @property {string} friendlyName - A formatted version of the phone number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} lata - The LATA of this phone number\n * @property {string} locality -\n *          The locality or city of this phone number's location\n * @property {string} rateCenter - The rate center of this phone number\n * @property {number} latitude - The latitude of this phone number's location\n * @property {number} longitude - The longitude of this phone number's location\n * @property {string} region -\n *          The two-letter state or province abbreviation of this phone number's location\n * @property {string} postalCode -\n *          The postal or ZIP code of this phone number's location\n * @property {string} isoCountry - The ISO country code of this phone number\n * @property {string} addressRequirements -\n *          The type of Address resource the phone number requires\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Whether a phone number can receive calls or messages\n *\n * @param {V2010} version - Version of the resource\n * @param {TollFreePayload} payload - The instance payload\n * @param {account_sid} accountSid - The account_sid\n * @param {iso_country_code} countryCode -\n *          The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nTollFreeInstance = function TollFreeInstance(version, payload, accountSid,\n                                              countryCode) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.lata = payload.lata; // jshint ignore:line\n  this.locality = payload.locality; // jshint ignore:line\n  this.rateCenter = payload.rate_center; // jshint ignore:line\n  this.latitude = deserialize.decimal(payload.latitude); // jshint ignore:line\n  this.longitude = deserialize.decimal(payload.longitude); // jshint ignore:line\n  this.region = payload.region; // jshint ignore:line\n  this.postalCode = payload.postal_code; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, countryCode: countryCode, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTollFreeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTollFreeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TollFreeList: TollFreeList,\n  TollFreePage: TollFreePage,\n  TollFreeInstance: TollFreeInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar VoipList;\nvar VoipPage;\nvar VoipInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the VoipList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The account_sid\n * @param {string} countryCode - The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nVoipList = function VoipList(version, accountSid, countryCode) {\n  /* jshint ignore:start */\n  /**\n   * @function voip\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipContext}\n   */\n  /* jshint ignore:end */\n  function VoipListInstance(sid) {\n    return VoipListInstance.get(sid);\n  }\n\n  VoipListInstance._version = version;\n  // Path Solution\n  VoipListInstance._solution = {accountSid: accountSid, countryCode: countryCode};\n  VoipListInstance._uri = `/Accounts/${accountSid}/AvailablePhoneNumbers/${countryCode}/Voip.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams VoipInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  VoipListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists VoipInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  VoipListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of VoipInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.areaCode] - The area code of the phone numbers to read\n   * @param {string} [opts.contains] - The pattern on which to match phone numbers\n   * @param {boolean} [opts.smsEnabled] -\n   *          Whether the phone numbers can receive text messages\n   * @param {boolean} [opts.mmsEnabled] -\n   *          Whether the phone numbers can receive MMS messages\n   * @param {boolean} [opts.voiceEnabled] -\n   *          Whether the phone numbers can receive calls.\n   * @param {boolean} [opts.excludeAllAddressRequired] -\n   *          Whether to exclude phone numbers that require an Address\n   * @param {boolean} [opts.excludeLocalAddressRequired] -\n   *          Whether to exclude phone numbers that require a local address\n   * @param {boolean} [opts.excludeForeignAddressRequired] -\n   *          Whether to exclude phone numbers that require a foreign address\n   * @param {boolean} [opts.beta] -\n   *          Whether to read phone numbers new to the Twilio platform\n   * @param {string} [opts.nearNumber] -\n   *          Given a phone number, find a geographically close number within distance miles. (US/Canada only)\n   * @param {string} [opts.nearLatLong] -\n   *          Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)\n   * @param {number} [opts.distance] -\n   *          The search radius, in miles, for a near_ query. (US/Canada only)\n   * @param {string} [opts.inPostalCode] -\n   *          Limit results to a particular postal code. (US/Canada only)\n   * @param {string} [opts.inRegion] -\n   *          Limit results to a particular region. (US/Canada only)\n   * @param {string} [opts.inRateCenter] -\n   *          Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)\n   * @param {string} [opts.inLata] -\n   *          Limit results to a specific local access and transport area. (US/Canada only)\n   * @param {string} [opts.inLocality] - Limit results to a particular locality\n   * @param {boolean} [opts.faxEnabled] - Whether the phone numbers can receive faxes\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  VoipListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'AreaCode': _.get(opts, 'areaCode'),\n      'Contains': _.get(opts, 'contains'),\n      'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')),\n      'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')),\n      'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')),\n      'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')),\n      'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')),\n      'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')),\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'NearNumber': _.get(opts, 'nearNumber'),\n      'NearLatLong': _.get(opts, 'nearLatLong'),\n      'Distance': _.get(opts, 'distance'),\n      'InPostalCode': _.get(opts, 'inPostalCode'),\n      'InRegion': _.get(opts, 'inRegion'),\n      'InRateCenter': _.get(opts, 'inRateCenter'),\n      'InLata': _.get(opts, 'inLata'),\n      'InLocality': _.get(opts, 'inLocality'),\n      'FaxEnabled': serialize.bool(_.get(opts, 'faxEnabled')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new VoipPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of VoipInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  VoipListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new VoipPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  VoipListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  VoipListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return VoipListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VoipPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {VoipSolution} solution - Path solution\n *\n * @returns VoipPage\n */\n/* jshint ignore:end */\nVoipPage = function VoipPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(VoipPage.prototype, Page.prototype);\nVoipPage.prototype.constructor = VoipPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of VoipInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipPage#\n *\n * @param {VoipPayload} payload - Payload response from the API\n *\n * @returns VoipInstance\n */\n/* jshint ignore:end */\nVoipPage.prototype.getInstance = function getInstance(payload) {\n  return new VoipInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.countryCode\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVoipPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVoipPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VoipContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipInstance\n *\n * @property {string} friendlyName - A formatted version of the phone number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} lata - The LATA of this phone number\n * @property {string} locality -\n *          The locality or city of this phone number's location\n * @property {string} rateCenter - The rate center of this phone number\n * @property {number} latitude - The latitude of this phone number's location\n * @property {number} longitude - The longitude of this phone number's location\n * @property {string} region -\n *          The two-letter state or province abbreviation of this phone number's location\n * @property {string} postalCode -\n *          The postal or ZIP code of this phone number's location\n * @property {string} isoCountry - The ISO country code of this phone number\n * @property {string} addressRequirements -\n *          The type of Address resource the phone number requires\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Whether a phone number can receive calls or messages\n *\n * @param {V2010} version - Version of the resource\n * @param {VoipPayload} payload - The instance payload\n * @param {account_sid} accountSid - The account_sid\n * @param {iso_country_code} countryCode -\n *          The ISO-3166-1 country code of the country.\n */\n/* jshint ignore:end */\nVoipInstance = function VoipInstance(version, payload, accountSid, countryCode)\n                                      {\n  this._version = version;\n\n  // Marshaled Properties\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.lata = payload.lata; // jshint ignore:line\n  this.locality = payload.locality; // jshint ignore:line\n  this.rateCenter = payload.rate_center; // jshint ignore:line\n  this.latitude = deserialize.decimal(payload.latitude); // jshint ignore:line\n  this.longitude = deserialize.decimal(payload.longitude); // jshint ignore:line\n  this.region = payload.region; // jshint ignore:line\n  this.postalCode = payload.postal_code; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, countryCode: countryCode, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVoipInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVoipInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  VoipList: VoipList,\n  VoipPage: VoipPage,\n  VoipInstance: VoipInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar LocalList = require('./availablePhoneNumber/local').LocalList;\nvar MachineToMachineList = require(\n    './availablePhoneNumber/machineToMachine').MachineToMachineList;\nvar MobileList = require('./availablePhoneNumber/mobile').MobileList;\nvar NationalList = require('./availablePhoneNumber/national').NationalList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar SharedCostList = require(\n    './availablePhoneNumber/sharedCost').SharedCostList;\nvar TollFreeList = require('./availablePhoneNumber/tollFree').TollFreeList;\nvar VoipList = require('./availablePhoneNumber/voip').VoipList;\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AvailablePhoneNumberCountryList;\nvar AvailablePhoneNumberCountryPage;\nvar AvailablePhoneNumberCountryInstance;\nvar AvailablePhoneNumberCountryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailablePhoneNumberCountryList\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryList = function\n    AvailablePhoneNumberCountryList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function availablePhoneNumbers\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext}\n   */\n  /* jshint ignore:end */\n  function AvailablePhoneNumberCountryListInstance(sid) {\n    return AvailablePhoneNumberCountryListInstance.get(sid);\n  }\n\n  AvailablePhoneNumberCountryListInstance._version = version;\n  // Path Solution\n  AvailablePhoneNumberCountryListInstance._solution = {accountSid: accountSid};\n  AvailablePhoneNumberCountryListInstance._uri = `/Accounts/${accountSid}/AvailablePhoneNumbers.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams AvailablePhoneNumberCountryInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AvailablePhoneNumberCountryListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AvailablePhoneNumberCountryInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AvailablePhoneNumberCountryListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AvailablePhoneNumberCountryInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AvailablePhoneNumberCountryListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AvailablePhoneNumberCountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AvailablePhoneNumberCountryInstance records\n   * from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AvailablePhoneNumberCountryListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AvailablePhoneNumberCountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a available_phone_number_country\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList#\n   *\n   * @param {string} countryCode -\n   *          The ISO country code of the country to fetch available phone number information about\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext}\n   */\n  /* jshint ignore:end */\n  AvailablePhoneNumberCountryListInstance.get = function get(countryCode) {\n    return new AvailablePhoneNumberCountryContext(\n      this._version,\n      this._solution.accountSid,\n      countryCode\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AvailablePhoneNumberCountryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AvailablePhoneNumberCountryListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AvailablePhoneNumberCountryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailablePhoneNumberCountryPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AvailablePhoneNumberCountrySolution} solution - Path solution\n *\n * @returns AvailablePhoneNumberCountryPage\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryPage = function\n    AvailablePhoneNumberCountryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AvailablePhoneNumberCountryPage.prototype, Page.prototype);\nAvailablePhoneNumberCountryPage.prototype.constructor = AvailablePhoneNumberCountryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AvailablePhoneNumberCountryInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryPage#\n *\n * @param {AvailablePhoneNumberCountryPayload} payload -\n *          Payload response from the API\n *\n * @returns AvailablePhoneNumberCountryInstance\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new AvailablePhoneNumberCountryInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAvailablePhoneNumberCountryPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailablePhoneNumberCountryContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance\n *\n * @property {string} countryCode - The ISO-3166-1 country code of the country.\n * @property {string} country - The name of the country\n * @property {string} uri -\n *          The URI of the Country resource, relative to `https://api.twilio.com`\n * @property {boolean} beta -\n *          Whether all phone numbers available in the country are new to the Twilio platform.\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n *\n * @param {V2010} version - Version of the resource\n * @param {AvailablePhoneNumberCountryPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n * @param {iso_country_code} countryCode -\n *          The ISO country code of the country to fetch available phone number information about\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance = function\n    AvailablePhoneNumberCountryInstance(version, payload, accountSid,\n    countryCode) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.countryCode = payload.country_code; // jshint ignore:line\n  this.country = payload.country; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, countryCode: countryCode || this.countryCode, };\n};\n\nObject.defineProperty(AvailablePhoneNumberCountryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AvailablePhoneNumberCountryContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.countryCode\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AvailablePhoneNumberCountryInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AvailablePhoneNumberCountryInstance\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the local\n *\n * @function local\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalList}\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance.prototype.local = function local() {\n  return this._proxy.local;\n};\n\n/* jshint ignore:start */\n/**\n * Access the tollFree\n *\n * @function tollFree\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeList}\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance.prototype.tollFree = function tollFree() {\n  return this._proxy.tollFree;\n};\n\n/* jshint ignore:start */\n/**\n * Access the mobile\n *\n * @function mobile\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileList}\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance.prototype.mobile = function mobile() {\n  return this._proxy.mobile;\n};\n\n/* jshint ignore:start */\n/**\n * Access the national\n *\n * @function national\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalList}\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance.prototype.national = function national() {\n  return this._proxy.national;\n};\n\n/* jshint ignore:start */\n/**\n * Access the voip\n *\n * @function voip\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipList}\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance.prototype.voip = function voip() {\n  return this._proxy.voip;\n};\n\n/* jshint ignore:start */\n/**\n * Access the sharedCost\n *\n * @function sharedCost\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostList}\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance.prototype.sharedCost = function sharedCost()\n    {\n  return this._proxy.sharedCost;\n};\n\n/* jshint ignore:start */\n/**\n * Access the machineToMachine\n *\n * @function machineToMachine\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineList}\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance.prototype.machineToMachine = function\n    machineToMachine() {\n  return this._proxy.machineToMachine;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAvailablePhoneNumberCountryInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailablePhoneNumberCountryContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext\n *\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.LocalList} local -\n *          local resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.TollFreeList} tollFree -\n *          tollFree resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileList} mobile -\n *          mobile resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.NationalList} national -\n *          national resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.VoipList} voip -\n *          voip resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.SharedCostList} sharedCost -\n *          sharedCost resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MachineToMachineList} machineToMachine -\n *          machineToMachine resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account requesting the available phone number Country resource\n * @param {iso_country_code} countryCode -\n *          The ISO country code of the country to fetch available phone number information about\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryContext = function\n    AvailablePhoneNumberCountryContext(version, accountSid, countryCode) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, countryCode: countryCode, };\n  this._uri = `/Accounts/${accountSid}/AvailablePhoneNumbers/${countryCode}.json`;\n\n  // Dependents\n  this._local = undefined;\n  this._tollFree = undefined;\n  this._mobile = undefined;\n  this._national = undefined;\n  this._voip = undefined;\n  this._sharedCost = undefined;\n  this._machineToMachine = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AvailablePhoneNumberCountryInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AvailablePhoneNumberCountryInstance\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AvailablePhoneNumberCountryInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.countryCode\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AvailablePhoneNumberCountryContext.prototype,\n  'local', {\n    get: function() {\n      if (!this._local) {\n        this._local = new LocalList(this._version, this._solution.accountSid, this._solution.countryCode);\n      }\n      return this._local;\n    }\n});\n\nObject.defineProperty(AvailablePhoneNumberCountryContext.prototype,\n  'tollFree', {\n    get: function() {\n      if (!this._tollFree) {\n        this._tollFree = new TollFreeList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.countryCode\n        );\n      }\n      return this._tollFree;\n    }\n});\n\nObject.defineProperty(AvailablePhoneNumberCountryContext.prototype,\n  'mobile', {\n    get: function() {\n      if (!this._mobile) {\n        this._mobile = new MobileList(this._version, this._solution.accountSid, this._solution.countryCode);\n      }\n      return this._mobile;\n    }\n});\n\nObject.defineProperty(AvailablePhoneNumberCountryContext.prototype,\n  'national', {\n    get: function() {\n      if (!this._national) {\n        this._national = new NationalList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.countryCode\n        );\n      }\n      return this._national;\n    }\n});\n\nObject.defineProperty(AvailablePhoneNumberCountryContext.prototype,\n  'voip', {\n    get: function() {\n      if (!this._voip) {\n        this._voip = new VoipList(this._version, this._solution.accountSid, this._solution.countryCode);\n      }\n      return this._voip;\n    }\n});\n\nObject.defineProperty(AvailablePhoneNumberCountryContext.prototype,\n  'sharedCost', {\n    get: function() {\n      if (!this._sharedCost) {\n        this._sharedCost = new SharedCostList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.countryCode\n        );\n      }\n      return this._sharedCost;\n    }\n});\n\nObject.defineProperty(AvailablePhoneNumberCountryContext.prototype,\n  'machineToMachine', {\n    get: function() {\n      if (!this._machineToMachine) {\n        this._machineToMachine = new MachineToMachineList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.countryCode\n        );\n      }\n      return this._machineToMachine;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAvailablePhoneNumberCountryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAvailablePhoneNumberCountryContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AvailablePhoneNumberCountryList: AvailablePhoneNumberCountryList,\n  AvailablePhoneNumberCountryPage: AvailablePhoneNumberCountryPage,\n  AvailablePhoneNumberCountryInstance: AvailablePhoneNumberCountryInstance,\n  AvailablePhoneNumberCountryContext: AvailablePhoneNumberCountryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BalanceList;\nvar BalancePage;\nvar BalanceInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the BalanceList\n *\n * @constructor Twilio.Api.V2010.AccountContext.BalanceList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - Account Sid.\n */\n/* jshint ignore:end */\nBalanceList = function BalanceList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function balance\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.BalanceContext}\n   */\n  /* jshint ignore:end */\n  function BalanceListInstance(sid) {\n    return BalanceListInstance.get(sid);\n  }\n\n  BalanceListInstance._version = version;\n  // Path Solution\n  BalanceListInstance._solution = {accountSid: accountSid};\n  BalanceListInstance._uri = `/Accounts/${accountSid}/Balance.json`;\n  /* jshint ignore:start */\n  /**\n   * fetch a BalanceInstance\n   *\n   * @function fetch\n   * @memberof Twilio.Api.V2010.AccountContext.BalanceList#\n   *\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed BalanceInstance\n   */\n  /* jshint ignore:end */\n  BalanceListInstance.fetch = function fetch(callback) {\n    var deferred = Q.defer();\n    var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BalanceInstance(this._version, payload, this._solution.accountSid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.BalanceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BalanceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BalanceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BalanceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BalancePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.BalancePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BalanceSolution} solution - Path solution\n *\n * @returns BalancePage\n */\n/* jshint ignore:end */\nBalancePage = function BalancePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BalancePage.prototype, Page.prototype);\nBalancePage.prototype.constructor = BalancePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BalanceInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.BalancePage#\n *\n * @param {BalancePayload} payload - Payload response from the API\n *\n * @returns BalanceInstance\n */\n/* jshint ignore:end */\nBalancePage.prototype.getInstance = function getInstance(payload) {\n  return new BalanceInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.BalancePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBalancePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBalancePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BalanceContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.BalanceInstance\n *\n * @property {string} accountSid - Account Sid.\n * @property {string} balance - Account balance\n * @property {string} currency - Currency units\n *\n * @param {V2010} version - Version of the resource\n * @param {BalancePayload} payload - The instance payload\n * @param {sid} accountSid - Account Sid.\n */\n/* jshint ignore:end */\nBalanceInstance = function BalanceInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.balance = payload.balance; // jshint ignore:line\n  this.currency = payload.currency; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.BalanceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBalanceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBalanceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BalanceList: BalanceList,\n  BalancePage: BalancePage,\n  BalanceInstance: BalanceInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar EventList;\nvar EventPage;\nvar EventInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the EventList\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.EventList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n * @param {string} callSid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nEventList = function EventList(version, accountSid, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function events\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.EventContext}\n   */\n  /* jshint ignore:end */\n  function EventListInstance(sid) {\n    return EventListInstance.get(sid);\n  }\n\n  EventListInstance._version = version;\n  // Path Solution\n  EventListInstance._solution = {accountSid: accountSid, callSid: callSid};\n  EventListInstance._uri = `/Accounts/${accountSid}/Calls/${callSid}/Events.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams EventInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EventListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EventInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.EventList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.EventList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EventListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EventListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EventListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.EventPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EventSolution} solution - Path solution\n *\n * @returns EventPage\n */\n/* jshint ignore:end */\nEventPage = function EventPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EventPage.prototype, Page.prototype);\nEventPage.prototype.constructor = EventPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EventInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.EventPage#\n *\n * @param {EventPayload} payload - Payload response from the API\n *\n * @returns EventInstance\n */\n/* jshint ignore:end */\nEventPage.prototype.getInstance = function getInstance(payload) {\n  return new EventInstance(this._version, payload, this._solution.accountSid, this._solution.callSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.EventPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.EventInstance\n *\n * @property {object} request - Call Request.\n * @property {object} response - Call Response with Events.\n *\n * @param {V2010} version - Version of the resource\n * @param {EventPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} callSid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nEventInstance = function EventInstance(version, payload, accountSid, callSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.request = payload.request; // jshint ignore:line\n  this.response = payload.response; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, callSid: callSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.EventInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EventList: EventList,\n  EventPage: EventPage,\n  EventInstance: EventInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar FeedbackList;\nvar FeedbackPage;\nvar FeedbackInstance;\nvar FeedbackContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackList\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.FeedbackList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The unique sid that identifies this account\n * @param {string} callSid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nFeedbackList = function FeedbackList(version, accountSid, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function feedback\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.FeedbackContext}\n   */\n  /* jshint ignore:end */\n  function FeedbackListInstance(sid) {\n    return FeedbackListInstance.get(sid);\n  }\n\n  FeedbackListInstance._version = version;\n  // Path Solution\n  FeedbackListInstance._solution = {accountSid: accountSid, callSid: callSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a feedback\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackList#\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.FeedbackContext}\n   */\n  /* jshint ignore:end */\n  FeedbackListInstance.get = function get() {\n    return new FeedbackContext(this._version, this._solution.accountSid, this._solution.callSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FeedbackListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FeedbackListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FeedbackListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.FeedbackPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FeedbackSolution} solution - Path solution\n *\n * @returns FeedbackPage\n */\n/* jshint ignore:end */\nFeedbackPage = function FeedbackPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FeedbackPage.prototype, Page.prototype);\nFeedbackPage.prototype.constructor = FeedbackPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FeedbackInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackPage#\n *\n * @param {FeedbackPayload} payload - Payload response from the API\n *\n * @returns FeedbackInstance\n */\n/* jshint ignore:end */\nFeedbackPage.prototype.getInstance = function getInstance(payload) {\n  return new FeedbackInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.callSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFeedbackPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFeedbackPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.FeedbackInstance\n *\n * @property {string} accountSid - The unique sid that identifies this account\n * @property {Date} dateCreated - The date this resource was created\n * @property {Date} dateUpdated - The date this resource was last updated\n * @property {feedback.issues} issues - Issues experienced during the call\n * @property {number} qualityScore - 1 to 5 quality score\n * @property {string} sid -\n *          A string that uniquely identifies this feedback resource\n *\n * @param {V2010} version - Version of the resource\n * @param {FeedbackPayload} payload - The instance payload\n * @param {sid} accountSid - The unique sid that identifies this account\n * @param {sid} callSid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nFeedbackInstance = function FeedbackInstance(version, payload, accountSid,\n                                              callSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.issues = payload.issues; // jshint ignore:line\n  this.qualityScore = deserialize.integer(payload.quality_score); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, callSid: callSid, };\n};\n\nObject.defineProperty(FeedbackInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FeedbackContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.callSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FeedbackInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackInstance\n */\n/* jshint ignore:end */\nFeedbackInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * create a FeedbackInstance\n *\n * @function create\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackInstance#\n *\n * @param {object} opts - Options for request\n * @param {number} opts.qualityScore -\n *          The call quality expressed as an integer from 1 to 5\n * @param {feedback.issues|list} [opts.issue] - Issues experienced during the call\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackInstance\n */\n/* jshint ignore:end */\nFeedbackInstance.prototype.create = function create(opts, callback) {\n  return this._proxy.create(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FeedbackInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.qualityScore] -\n *          The call quality expressed as an integer from 1 to 5\n * @param {feedback.issues|list} [opts.issue] - Issues experienced during the call\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackInstance\n */\n/* jshint ignore:end */\nFeedbackInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFeedbackInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFeedbackInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.FeedbackContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid - The unique sid that identifies this account\n * @param {sid} callSid - The call sid that uniquely identifies the call\n */\n/* jshint ignore:end */\nFeedbackContext = function FeedbackContext(version, accountSid, callSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, callSid: callSid, };\n  this._uri = `/Accounts/${accountSid}/Calls/${callSid}/Feedback.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FeedbackInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackInstance\n */\n/* jshint ignore:end */\nFeedbackContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FeedbackInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.callSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * create a FeedbackInstance\n *\n * @function create\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackContext#\n *\n * @param {object} opts - Options for request\n * @param {number} opts.qualityScore -\n *          The call quality expressed as an integer from 1 to 5\n * @param {feedback.issues|list} [opts.issue] - Issues experienced during the call\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackInstance\n */\n/* jshint ignore:end */\nFeedbackContext.prototype.create = function create(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['qualityScore'])) {\n    throw new Error('Required parameter \"opts[\\'qualityScore\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'QualityScore': _.get(opts, 'qualityScore'),\n    'Issue': serialize.map(_.get(opts, 'issue'), function(e) { return e; })\n  });\n\n  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FeedbackInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.callSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FeedbackInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.qualityScore] -\n *          The call quality expressed as an integer from 1 to 5\n * @param {feedback.issues|list} [opts.issue] - Issues experienced during the call\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackInstance\n */\n/* jshint ignore:end */\nFeedbackContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'QualityScore': _.get(opts, 'qualityScore'),\n    'Issue': serialize.map(_.get(opts, 'issue'), function(e) { return e; })\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FeedbackInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.callSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFeedbackContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFeedbackContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FeedbackList: FeedbackList,\n  FeedbackPage: FeedbackPage,\n  FeedbackInstance: FeedbackInstance,\n  FeedbackContext: FeedbackContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar FeedbackSummaryList;\nvar FeedbackSummaryPage;\nvar FeedbackSummaryInstance;\nvar FeedbackSummaryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackSummaryList\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n */\n/* jshint ignore:end */\nFeedbackSummaryList = function FeedbackSummaryList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function feedbackSummaries\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryContext}\n   */\n  /* jshint ignore:end */\n  function FeedbackSummaryListInstance(sid) {\n    return FeedbackSummaryListInstance.get(sid);\n  }\n\n  FeedbackSummaryListInstance._version = version;\n  // Path Solution\n  FeedbackSummaryListInstance._solution = {accountSid: accountSid};\n  FeedbackSummaryListInstance._uri = `/Accounts/${accountSid}/Calls/FeedbackSummary.json`;\n  /* jshint ignore:start */\n  /**\n   * create a FeedbackSummaryInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryList#\n   *\n   * @param {object} opts - Options for request\n   * @param {Date} opts.startDate - Only include feedback given on or after this date\n   * @param {Date} opts.endDate - Only include feedback given on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          `true` includes feedback from the specified account and its subaccounts\n   * @param {string} [opts.statusCallback] -\n   *          The URL that we will request when the feedback summary is complete\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method we use to make requests to the StatusCallback URL\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FeedbackSummaryInstance\n   */\n  /* jshint ignore:end */\n  FeedbackSummaryListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['startDate'])) {\n      throw new Error('Required parameter \"opts[\\'startDate\\']\" missing.');\n    }\n    if (_.isUndefined(opts['endDate'])) {\n      throw new Error('Required parameter \"opts[\\'endDate\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FeedbackSummaryInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a feedback_summary\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryList#\n   *\n   * @param {string} sid -\n   *          A string that uniquely identifies this feedback summary resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryContext}\n   */\n  /* jshint ignore:end */\n  FeedbackSummaryListInstance.get = function get(sid) {\n    return new FeedbackSummaryContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FeedbackSummaryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FeedbackSummaryListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FeedbackSummaryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackSummaryPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FeedbackSummarySolution} solution - Path solution\n *\n * @returns FeedbackSummaryPage\n */\n/* jshint ignore:end */\nFeedbackSummaryPage = function FeedbackSummaryPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FeedbackSummaryPage.prototype, Page.prototype);\nFeedbackSummaryPage.prototype.constructor = FeedbackSummaryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FeedbackSummaryInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryPage#\n *\n * @param {FeedbackSummaryPayload} payload - Payload response from the API\n *\n * @returns FeedbackSummaryInstance\n */\n/* jshint ignore:end */\nFeedbackSummaryPage.prototype.getInstance = function getInstance(payload) {\n  return new FeedbackSummaryInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFeedbackSummaryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFeedbackSummaryPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackSummaryContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryInstance\n *\n * @property {string} accountSid - The unique sid that identifies this account\n * @property {number} callCount - The total number of calls\n * @property {number} callFeedbackCount -\n *          The total number of calls with a feedback entry\n * @property {Date} dateCreated - The date this resource was created\n * @property {Date} dateUpdated - The date this resource was last updated\n * @property {Date} endDate - The latest feedback entry date in the summary\n * @property {boolean} includeSubaccounts -\n *          Whether the feedback summary includes subaccounts\n * @property {object} issues - Issues experienced during the call\n * @property {number} qualityScoreAverage -\n *          The average QualityScore of the feedback entries\n * @property {number} qualityScoreMedian -\n *          The median QualityScore of the feedback entries\n * @property {number} qualityScoreStandardDeviation -\n *          The standard deviation of the quality scores\n * @property {string} sid - A string that uniquely identifies this feedback entry\n * @property {Date} startDate - The earliest feedback entry date in the summary\n * @property {feedback_summary.status} status - The status of the feedback summary\n *\n * @param {V2010} version - Version of the resource\n * @param {FeedbackSummaryPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} sid -\n *          A string that uniquely identifies this feedback summary resource\n */\n/* jshint ignore:end */\nFeedbackSummaryInstance = function FeedbackSummaryInstance(version, payload,\n                                                            accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.callCount = deserialize.integer(payload.call_count); // jshint ignore:line\n  this.callFeedbackCount = deserialize.integer(payload.call_feedback_count); // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.includeSubaccounts = payload.include_subaccounts; // jshint ignore:line\n  this.issues = payload.issues; // jshint ignore:line\n  this.qualityScoreAverage = deserialize.decimal(payload.quality_score_average); // jshint ignore:line\n  this.qualityScoreMedian = deserialize.decimal(payload.quality_score_median); // jshint ignore:line\n  this.qualityScoreStandardDeviation = deserialize.decimal(payload.quality_score_standard_deviation); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FeedbackSummaryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FeedbackSummaryContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FeedbackSummaryInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackSummaryInstance\n */\n/* jshint ignore:end */\nFeedbackSummaryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FeedbackSummaryInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackSummaryInstance\n */\n/* jshint ignore:end */\nFeedbackSummaryInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFeedbackSummaryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFeedbackSummaryInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackSummaryContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid - The unique sid that identifies this account\n * @param {sid} sid -\n *          A string that uniquely identifies this feedback summary resource\n */\n/* jshint ignore:end */\nFeedbackSummaryContext = function FeedbackSummaryContext(version, accountSid,\n                                                          sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Calls/FeedbackSummary/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FeedbackSummaryInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackSummaryInstance\n */\n/* jshint ignore:end */\nFeedbackSummaryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FeedbackSummaryInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FeedbackSummaryInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FeedbackSummaryInstance\n */\n/* jshint ignore:end */\nFeedbackSummaryContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.FeedbackSummaryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFeedbackSummaryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFeedbackSummaryContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FeedbackSummaryList: FeedbackSummaryList,\n  FeedbackSummaryPage: FeedbackSummaryPage,\n  FeedbackSummaryInstance: FeedbackSummaryInstance,\n  FeedbackSummaryContext: FeedbackSummaryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar NotificationList;\nvar NotificationPage;\nvar NotificationInstance;\nvar NotificationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationList\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.NotificationList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} callSid - The SID of the Call the resource is associated with\n */\n/* jshint ignore:end */\nNotificationList = function NotificationList(version, accountSid, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function notifications\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.NotificationContext}\n   */\n  /* jshint ignore:end */\n  function NotificationListInstance(sid) {\n    return NotificationListInstance.get(sid);\n  }\n\n  NotificationListInstance._version = version;\n  // Path Solution\n  NotificationListInstance._solution = {accountSid: accountSid, callSid: callSid};\n  NotificationListInstance._uri = `/Accounts/${accountSid}/Calls/${callSid}/Notifications.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams NotificationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.log] - Filter by log level\n   * @param {Date} [opts.messageDateBefore] - Filter by date\n   * @param {Date} [opts.messageDate] - Filter by date\n   * @param {Date} [opts.messageDateAfter] - Filter by date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists NotificationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.log] - Filter by log level\n   * @param {Date} [opts.messageDateBefore] - Filter by date\n   * @param {Date} [opts.messageDate] - Filter by date\n   * @param {Date} [opts.messageDateAfter] - Filter by date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of NotificationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.log] - Filter by log level\n   * @param {Date} [opts.messageDateBefore] - Filter by date\n   * @param {Date} [opts.messageDate] - Filter by date\n   * @param {Date} [opts.messageDateAfter] - Filter by date\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Log': _.get(opts, 'log'),\n      'MessageDate<': serialize.iso8601Date(_.get(opts, 'messageDateBefore')),\n      'MessageDate': serialize.iso8601Date(_.get(opts, 'messageDate')),\n      'MessageDate>': serialize.iso8601Date(_.get(opts, 'messageDateAfter')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NotificationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of NotificationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NotificationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a notification\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.NotificationContext}\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.get = function get(sid) {\n    return new NotificationContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.callSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NotificationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NotificationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.NotificationPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NotificationSolution} solution - Path solution\n *\n * @returns NotificationPage\n */\n/* jshint ignore:end */\nNotificationPage = function NotificationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NotificationPage.prototype, Page.prototype);\nNotificationPage.prototype.constructor = NotificationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NotificationInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationPage#\n *\n * @param {NotificationPayload} payload - Payload response from the API\n *\n * @returns NotificationInstance\n */\n/* jshint ignore:end */\nNotificationPage.prototype.getInstance = function getInstance(payload) {\n  return new NotificationInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.callSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.NotificationInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} apiVersion -\n *          The API version used to create the Call Notification resource\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} errorCode -\n *          A unique error code corresponding to the notification\n * @property {string} log - An integer log level\n * @property {Date} messageDate - The date the notification was generated\n * @property {string} messageText - The text of the notification\n * @property {string} moreInfo - A URL for more information about the error code\n * @property {string} requestMethod - HTTP method used with the request url\n * @property {string} requestUrl -\n *          URL of the resource that generated the notification\n * @property {string} requestVariables -\n *          Twilio-generated HTTP variables sent to the server\n * @property {string} responseBody - The HTTP body returned by your server\n * @property {string} responseHeaders - The HTTP headers returned by your server\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {NotificationPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} callSid - The SID of the Call the resource is associated with\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nNotificationInstance = function NotificationInstance(version, payload,\n                                                      accountSid, callSid, sid)\n                                                      {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.errorCode = payload.error_code; // jshint ignore:line\n  this.log = payload.log; // jshint ignore:line\n  this.messageDate = deserialize.rfc2822DateTime(payload.message_date); // jshint ignore:line\n  this.messageText = payload.message_text; // jshint ignore:line\n  this.moreInfo = payload.more_info; // jshint ignore:line\n  this.requestMethod = payload.request_method; // jshint ignore:line\n  this.requestUrl = payload.request_url; // jshint ignore:line\n  this.requestVariables = payload.request_variables; // jshint ignore:line\n  this.responseBody = payload.response_body; // jshint ignore:line\n  this.responseHeaders = payload.response_headers; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(NotificationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new NotificationContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.callSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a NotificationInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NotificationInstance\n */\n/* jshint ignore:end */\nNotificationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.NotificationContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} callSid - The Call SID of the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nNotificationContext = function NotificationContext(version, accountSid, callSid,\n                                                    sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Calls/${callSid}/Notifications/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NotificationInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NotificationInstance\n */\n/* jshint ignore:end */\nNotificationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NotificationInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.callSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.NotificationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nNotificationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NotificationList: NotificationList,\n  NotificationPage: NotificationPage,\n  NotificationInstance: NotificationInstance,\n  NotificationContext: NotificationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar PaymentList;\nvar PaymentPage;\nvar PaymentInstance;\nvar PaymentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PaymentList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.PaymentList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          The SID of the Account that created the Payments resource.\n * @param {string} callSid - The SID of the Call the resource is associated with.\n */\n/* jshint ignore:end */\nPaymentList = function PaymentList(version, accountSid, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function payments\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.PaymentContext}\n   */\n  /* jshint ignore:end */\n  function PaymentListInstance(sid) {\n    return PaymentListInstance.get(sid);\n  }\n\n  PaymentListInstance._version = version;\n  // Path Solution\n  PaymentListInstance._solution = {accountSid: accountSid, callSid: callSid};\n  PaymentListInstance._uri = `/Accounts/${accountSid}/Calls/${callSid}/Payments.json`;\n  /* jshint ignore:start */\n  /**\n   * create a PaymentInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.PaymentList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.idempotencyKey -\n   *          A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions.\n   * @param {string} opts.statusCallback -\n   *          Provide an absolute or relative URL to receive status updates regarding your Pay session..\n   * @param {payment.bank_account_type} [opts.bankAccountType] -\n   *          Type of bank account if payment source is ACH.\n   * @param {number} [opts.chargeAmount] -\n   *          A positive decimal value less than 1,000,000 to charge against the credit card or bank account.\n   * @param {string} [opts.currency] - The currency of the `charge_amount`.\n   * @param {string} [opts.description] -\n   *          The description can be used to provide more details regarding the transaction.\n   * @param {string} [opts.input] -\n   *          A list of inputs that should be accepted. Currently only `dtmf` is supported.\n   * @param {number} [opts.minPostalCodeLength] -\n   *          A positive integer that is used to validate the length of the `PostalCode` inputted by the user.\n   * @param {object} [opts.parameter] -\n   *          A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments)\n   * @param {string} [opts.paymentConnector] -\n   *          This is the unique name corresponding to the Payment Gateway Connector installed in the Twilio Add-ons.\n   * @param {payment.payment_method} [opts.paymentMethod] -\n   *          Type of payment being captured.\n   * @param {boolean} [opts.postalCode] -\n   *          Indicates whether the credit card PostalCode (zip code) is a required piece of payment information that must be provided by the caller.\n   * @param {boolean} [opts.securityCode] -\n   *          Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller.\n   * @param {number} [opts.timeout] -\n   *          The number of seconds that <Pay> should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured.\n   * @param {payment.token_type} [opts.tokenType] -\n   *          Indicates whether the payment method should be tokenized as a `one-time` or `reusable` token.\n   * @param {string} [opts.validCardTypes] -\n   *          Credit card types separated by space that Pay should accept.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed PaymentInstance\n   */\n  /* jshint ignore:end */\n  PaymentListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['idempotencyKey'])) {\n      throw new Error('Required parameter \"opts[\\'idempotencyKey\\']\" missing.');\n    }\n    if (_.isUndefined(opts['statusCallback'])) {\n      throw new Error('Required parameter \"opts[\\'statusCallback\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'IdempotencyKey': _.get(opts, 'idempotencyKey'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'BankAccountType': _.get(opts, 'bankAccountType'),\n      'ChargeAmount': _.get(opts, 'chargeAmount'),\n      'Currency': _.get(opts, 'currency'),\n      'Description': _.get(opts, 'description'),\n      'Input': _.get(opts, 'input'),\n      'MinPostalCodeLength': _.get(opts, 'minPostalCodeLength'),\n      'Parameter': serialize.object(_.get(opts, 'parameter')),\n      'PaymentConnector': _.get(opts, 'paymentConnector'),\n      'PaymentMethod': _.get(opts, 'paymentMethod'),\n      'PostalCode': serialize.bool(_.get(opts, 'postalCode')),\n      'SecurityCode': serialize.bool(_.get(opts, 'securityCode')),\n      'Timeout': _.get(opts, 'timeout'),\n      'TokenType': _.get(opts, 'tokenType'),\n      'ValidCardTypes': _.get(opts, 'validCardTypes')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PaymentInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.callSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a payment\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.PaymentList#\n   *\n   * @param {string} sid - The SID of Payments session\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.PaymentContext}\n   */\n  /* jshint ignore:end */\n  PaymentListInstance.get = function get(sid) {\n    return new PaymentContext(this._version, this._solution.accountSid, this._solution.callSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.PaymentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PaymentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PaymentListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PaymentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PaymentPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.PaymentPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PaymentSolution} solution - Path solution\n *\n * @returns PaymentPage\n */\n/* jshint ignore:end */\nPaymentPage = function PaymentPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PaymentPage.prototype, Page.prototype);\nPaymentPage.prototype.constructor = PaymentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PaymentInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.PaymentPage#\n *\n * @param {PaymentPayload} payload - Payload response from the API\n *\n * @returns PaymentInstance\n */\n/* jshint ignore:end */\nPaymentPage.prototype.getInstance = function getInstance(payload) {\n  return new PaymentInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.callSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.PaymentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPaymentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPaymentPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PaymentContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.PaymentInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that created the Payments resource.\n * @property {string} callSid -\n *          The SID of the Call the resource is associated with.\n * @property {string} sid - The SID of the Payments resource.\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {PaymentPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          The SID of the Account that created the Payments resource.\n * @param {sid} callSid - The SID of the Call the resource is associated with.\n * @param {sid} sid - The SID of Payments session\n */\n/* jshint ignore:end */\nPaymentInstance = function PaymentInstance(version, payload, accountSid,\n                                            callSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(PaymentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PaymentContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.callSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a PaymentInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.PaymentInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.idempotencyKey -\n *          A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions.\n * @param {string} opts.statusCallback -\n *          Provide an absolute or relative URL to receive status updates regarding your Pay session.\n * @param {payment.capture} [opts.capture] -\n *          The piece of payment information that you wish the caller to enter.\n * @param {payment.status} [opts.status] -\n *          Indicates whether the current payment session should be cancelled or completed.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PaymentInstance\n */\n/* jshint ignore:end */\nPaymentInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.PaymentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPaymentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPaymentInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PaymentContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.PaymentContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid - The SID of the Account that will update the resource\n * @param {sid} callSid - The SID of the call that will create the resource.\n * @param {sid} sid - The SID of Payments session\n */\n/* jshint ignore:end */\nPaymentContext = function PaymentContext(version, accountSid, callSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Calls/${callSid}/Payments/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * update a PaymentInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.PaymentContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.idempotencyKey -\n *          A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions.\n * @param {string} opts.statusCallback -\n *          Provide an absolute or relative URL to receive status updates regarding your Pay session.\n * @param {payment.capture} [opts.capture] -\n *          The piece of payment information that you wish the caller to enter.\n * @param {payment.status} [opts.status] -\n *          Indicates whether the current payment session should be cancelled or completed.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PaymentInstance\n */\n/* jshint ignore:end */\nPaymentContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['idempotencyKey'])) {\n    throw new Error('Required parameter \"opts[\\'idempotencyKey\\']\" missing.');\n  }\n  if (_.isUndefined(opts['statusCallback'])) {\n    throw new Error('Required parameter \"opts[\\'statusCallback\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'IdempotencyKey': _.get(opts, 'idempotencyKey'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'Capture': _.get(opts, 'capture'),\n    'Status': _.get(opts, 'status')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PaymentInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.callSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.PaymentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPaymentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPaymentContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PaymentList: PaymentList,\n  PaymentPage: PaymentPage,\n  PaymentInstance: PaymentInstance,\n  PaymentContext: PaymentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar RecordingList;\nvar RecordingPage;\nvar RecordingInstance;\nvar RecordingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingList\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.RecordingList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} callSid - The SID of the Call the resource is associated with\n */\n/* jshint ignore:end */\nRecordingList = function RecordingList(version, accountSid, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function recordings\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.RecordingContext}\n   */\n  /* jshint ignore:end */\n  function RecordingListInstance(sid) {\n    return RecordingListInstance.get(sid);\n  }\n\n  RecordingListInstance._version = version;\n  // Path Solution\n  RecordingListInstance._solution = {accountSid: accountSid, callSid: callSid};\n  RecordingListInstance._uri = `/Accounts/${accountSid}/Calls/${callSid}/Recordings.json`;\n  /* jshint ignore:start */\n  /**\n   * create a RecordingInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.recordingStatusCallbackEvent] -\n   *          The recording status changes that should generate a callback\n   * @param {string} [opts.recordingStatusCallback] -\n   *          The callback URL on each selected recording event\n   * @param {string} [opts.recordingStatusCallbackMethod] -\n   *          The HTTP method we should use to call `recording_status_callback`\n   * @param {string} [opts.trim] - Whether to trim the silence in the recording\n   * @param {string} [opts.recordingChannels] -\n   *          The number of channels that the output recording will be configured with\n   * @param {string} [opts.recordingTrack] - Which track(s) to record\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RecordingInstance\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'RecordingStatusCallbackEvent': serialize.map(_.get(opts, 'recordingStatusCallbackEvent'), function(e) { return e; }),\n      'RecordingStatusCallback': _.get(opts, 'recordingStatusCallback'),\n      'RecordingStatusCallbackMethod': _.get(opts, 'recordingStatusCallbackMethod'),\n      'Trim': _.get(opts, 'trim'),\n      'RecordingChannels': _.get(opts, 'recordingChannels'),\n      'RecordingTrack': _.get(opts, 'recordingTrack')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.callSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams RecordingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RecordingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DateCreated<': serialize.iso8601Date(_.get(opts, 'dateCreatedBefore')),\n      'DateCreated': serialize.iso8601Date(_.get(opts, 'dateCreated')),\n      'DateCreated>': serialize.iso8601Date(_.get(opts, 'dateCreatedAfter')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a recording\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.RecordingContext}\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.get = function get(sid) {\n    return new RecordingContext(this._version, this._solution.accountSid, this._solution.callSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RecordingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RecordingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.RecordingPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RecordingSolution} solution - Path solution\n *\n * @returns RecordingPage\n */\n/* jshint ignore:end */\nRecordingPage = function RecordingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RecordingPage.prototype, Page.prototype);\nRecordingPage.prototype.constructor = RecordingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RecordingInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingPage#\n *\n * @param {RecordingPayload} payload - Payload response from the API\n *\n * @returns RecordingInstance\n */\n/* jshint ignore:end */\nRecordingPage.prototype.getInstance = function getInstance(payload) {\n  return new RecordingInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.callSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.RecordingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} apiVersion - The API version used to make the recording\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {string} conferenceSid -\n *          The Conference SID that identifies the conference associated with the recording\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {Date} startTime -\n *          The start time of the recording, given in RFC 2822 format\n * @property {string} duration - The length of the recording in seconds\n * @property {string} sid - The unique string that identifies the resource\n * @property {number} price - The one-time cost of creating the recording.\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {object} encryptionDetails - How to decrypt the recording.\n * @property {string} priceUnit - The currency used in the price property.\n * @property {recording.status} status - The status of the recording\n * @property {number} channels - The number of channels in the final recording file\n * @property {recording.source} source - How the recording was created\n * @property {number} errorCode -\n *          More information about why the recording is missing, if status is `absent`.\n * @property {string} track -\n *          The recorded track. Can be: `inbound`, `outbound`, or `both`.\n *\n * @param {V2010} version - Version of the resource\n * @param {RecordingPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} callSid - The SID of the Call the resource is associated with\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRecordingInstance = function RecordingInstance(version, payload, accountSid,\n                                                callSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.conferenceSid = payload.conference_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.startTime = deserialize.rfc2822DateTime(payload.start_time); // jshint ignore:line\n  this.duration = payload.duration; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.encryptionDetails = payload.encryption_details; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.channels = deserialize.integer(payload.channels); // jshint ignore:line\n  this.source = payload.source; // jshint ignore:line\n  this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line\n  this.track = payload.track; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RecordingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RecordingContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.callSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a RecordingInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingInstance#\n *\n * @param {object} opts - Options for request\n * @param {recording.status} opts.status - The new status of the recording\n * @param {string} [opts.pauseBehavior] -\n *          Whether to record or not during the pause period.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RecordingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.RecordingContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} callSid - The Call SID of the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRecordingContext = function RecordingContext(version, accountSid, callSid, sid)\n                                              {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Calls/${callSid}/Recordings/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * update a RecordingInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingContext#\n *\n * @param {object} opts - Options for request\n * @param {recording.status} opts.status - The new status of the recording\n * @param {string} [opts.pauseBehavior] -\n *          Whether to record or not during the pause period.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Status': _.get(opts, 'status'),\n    'PauseBehavior': _.get(opts, 'pauseBehavior')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.callSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.callSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RecordingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.RecordingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRecordingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RecordingList: RecordingList,\n  RecordingPage: RecordingPage,\n  RecordingInstance: RecordingInstance,\n  RecordingContext: RecordingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SiprecList;\nvar SiprecPage;\nvar SiprecInstance;\nvar SiprecContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SiprecList\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.SiprecList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n * @param {string} callSid - The SID of the Call the resource is associated with\n */\n/* jshint ignore:end */\nSiprecList = function SiprecList(version, accountSid, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function siprec\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.SiprecContext}\n   */\n  /* jshint ignore:end */\n  function SiprecListInstance(sid) {\n    return SiprecListInstance.get(sid);\n  }\n\n  SiprecListInstance._version = version;\n  // Path Solution\n  SiprecListInstance._solution = {accountSid: accountSid, callSid: callSid};\n  SiprecListInstance._uri = `/Accounts/${accountSid}/Calls/${callSid}/Siprec.json`;\n  /* jshint ignore:start */\n  /**\n   * create a SiprecInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.name] - The name of this resource\n   * @param {string} [opts.connectorName] -\n   *          Unique name used when configuring the connector via Marketplace Add-on.\n   * @param {siprec.track} [opts.track] -\n   *          One of `inbound_track`, `outbound_track`, `both_tracks`.\n   * @param {string} [opts.statusCallback] - Absolute URL of the status callback.\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The http method for the status_callback.\n   * @param {string} [opts.parameter1.name] - Parameter name\n   * @param {string} [opts.parameter1.value] - Parameter value\n   * @param {string} [opts.parameter2.name] - Parameter name\n   * @param {string} [opts.parameter2.value] - Parameter value\n   * @param {string} [opts.parameter3.name] - Parameter name\n   * @param {string} [opts.parameter3.value] - Parameter value\n   * @param {string} [opts.parameter4.name] - Parameter name\n   * @param {string} [opts.parameter4.value] - Parameter value\n   * @param {string} [opts.parameter5.name] - Parameter name\n   * @param {string} [opts.parameter5.value] - Parameter value\n   * @param {string} [opts.parameter6.name] - Parameter name\n   * @param {string} [opts.parameter6.value] - Parameter value\n   * @param {string} [opts.parameter7.name] - Parameter name\n   * @param {string} [opts.parameter7.value] - Parameter value\n   * @param {string} [opts.parameter8.name] - Parameter name\n   * @param {string} [opts.parameter8.value] - Parameter value\n   * @param {string} [opts.parameter9.name] - Parameter name\n   * @param {string} [opts.parameter9.value] - Parameter value\n   * @param {string} [opts.parameter10.name] - Parameter name\n   * @param {string} [opts.parameter10.value] - Parameter value\n   * @param {string} [opts.parameter11.name] - Parameter name\n   * @param {string} [opts.parameter11.value] - Parameter value\n   * @param {string} [opts.parameter12.name] - Parameter name\n   * @param {string} [opts.parameter12.value] - Parameter value\n   * @param {string} [opts.parameter13.name] - Parameter name\n   * @param {string} [opts.parameter13.value] - Parameter value\n   * @param {string} [opts.parameter14.name] - Parameter name\n   * @param {string} [opts.parameter14.value] - Parameter value\n   * @param {string} [opts.parameter15.name] - Parameter name\n   * @param {string} [opts.parameter15.value] - Parameter value\n   * @param {string} [opts.parameter16.name] - Parameter name\n   * @param {string} [opts.parameter16.value] - Parameter value\n   * @param {string} [opts.parameter17.name] - Parameter name\n   * @param {string} [opts.parameter17.value] - Parameter value\n   * @param {string} [opts.parameter18.name] - Parameter name\n   * @param {string} [opts.parameter18.value] - Parameter value\n   * @param {string} [opts.parameter19.name] - Parameter name\n   * @param {string} [opts.parameter19.value] - Parameter value\n   * @param {string} [opts.parameter20.name] - Parameter name\n   * @param {string} [opts.parameter20.value] - Parameter value\n   * @param {string} [opts.parameter21.name] - Parameter name\n   * @param {string} [opts.parameter21.value] - Parameter value\n   * @param {string} [opts.parameter22.name] - Parameter name\n   * @param {string} [opts.parameter22.value] - Parameter value\n   * @param {string} [opts.parameter23.name] - Parameter name\n   * @param {string} [opts.parameter23.value] - Parameter value\n   * @param {string} [opts.parameter24.name] - Parameter name\n   * @param {string} [opts.parameter24.value] - Parameter value\n   * @param {string} [opts.parameter25.name] - Parameter name\n   * @param {string} [opts.parameter25.value] - Parameter value\n   * @param {string} [opts.parameter26.name] - Parameter name\n   * @param {string} [opts.parameter26.value] - Parameter value\n   * @param {string} [opts.parameter27.name] - Parameter name\n   * @param {string} [opts.parameter27.value] - Parameter value\n   * @param {string} [opts.parameter28.name] - Parameter name\n   * @param {string} [opts.parameter28.value] - Parameter value\n   * @param {string} [opts.parameter29.name] - Parameter name\n   * @param {string} [opts.parameter29.value] - Parameter value\n   * @param {string} [opts.parameter30.name] - Parameter name\n   * @param {string} [opts.parameter30.value] - Parameter value\n   * @param {string} [opts.parameter31.name] - Parameter name\n   * @param {string} [opts.parameter31.value] - Parameter value\n   * @param {string} [opts.parameter32.name] - Parameter name\n   * @param {string} [opts.parameter32.value] - Parameter value\n   * @param {string} [opts.parameter33.name] - Parameter name\n   * @param {string} [opts.parameter33.value] - Parameter value\n   * @param {string} [opts.parameter34.name] - Parameter name\n   * @param {string} [opts.parameter34.value] - Parameter value\n   * @param {string} [opts.parameter35.name] - Parameter name\n   * @param {string} [opts.parameter35.value] - Parameter value\n   * @param {string} [opts.parameter36.name] - Parameter name\n   * @param {string} [opts.parameter36.value] - Parameter value\n   * @param {string} [opts.parameter37.name] - Parameter name\n   * @param {string} [opts.parameter37.value] - Parameter value\n   * @param {string} [opts.parameter38.name] - Parameter name\n   * @param {string} [opts.parameter38.value] - Parameter value\n   * @param {string} [opts.parameter39.name] - Parameter name\n   * @param {string} [opts.parameter39.value] - Parameter value\n   * @param {string} [opts.parameter40.name] - Parameter name\n   * @param {string} [opts.parameter40.value] - Parameter value\n   * @param {string} [opts.parameter41.name] - Parameter name\n   * @param {string} [opts.parameter41.value] - Parameter value\n   * @param {string} [opts.parameter42.name] - Parameter name\n   * @param {string} [opts.parameter42.value] - Parameter value\n   * @param {string} [opts.parameter43.name] - Parameter name\n   * @param {string} [opts.parameter43.value] - Parameter value\n   * @param {string} [opts.parameter44.name] - Parameter name\n   * @param {string} [opts.parameter44.value] - Parameter value\n   * @param {string} [opts.parameter45.name] - Parameter name\n   * @param {string} [opts.parameter45.value] - Parameter value\n   * @param {string} [opts.parameter46.name] - Parameter name\n   * @param {string} [opts.parameter46.value] - Parameter value\n   * @param {string} [opts.parameter47.name] - Parameter name\n   * @param {string} [opts.parameter47.value] - Parameter value\n   * @param {string} [opts.parameter48.name] - Parameter name\n   * @param {string} [opts.parameter48.value] - Parameter value\n   * @param {string} [opts.parameter49.name] - Parameter name\n   * @param {string} [opts.parameter49.value] - Parameter value\n   * @param {string} [opts.parameter50.name] - Parameter name\n   * @param {string} [opts.parameter50.value] - Parameter value\n   * @param {string} [opts.parameter51.name] - Parameter name\n   * @param {string} [opts.parameter51.value] - Parameter value\n   * @param {string} [opts.parameter52.name] - Parameter name\n   * @param {string} [opts.parameter52.value] - Parameter value\n   * @param {string} [opts.parameter53.name] - Parameter name\n   * @param {string} [opts.parameter53.value] - Parameter value\n   * @param {string} [opts.parameter54.name] - Parameter name\n   * @param {string} [opts.parameter54.value] - Parameter value\n   * @param {string} [opts.parameter55.name] - Parameter name\n   * @param {string} [opts.parameter55.value] - Parameter value\n   * @param {string} [opts.parameter56.name] - Parameter name\n   * @param {string} [opts.parameter56.value] - Parameter value\n   * @param {string} [opts.parameter57.name] - Parameter name\n   * @param {string} [opts.parameter57.value] - Parameter value\n   * @param {string} [opts.parameter58.name] - Parameter name\n   * @param {string} [opts.parameter58.value] - Parameter value\n   * @param {string} [opts.parameter59.name] - Parameter name\n   * @param {string} [opts.parameter59.value] - Parameter value\n   * @param {string} [opts.parameter60.name] - Parameter name\n   * @param {string} [opts.parameter60.value] - Parameter value\n   * @param {string} [opts.parameter61.name] - Parameter name\n   * @param {string} [opts.parameter61.value] - Parameter value\n   * @param {string} [opts.parameter62.name] - Parameter name\n   * @param {string} [opts.parameter62.value] - Parameter value\n   * @param {string} [opts.parameter63.name] - Parameter name\n   * @param {string} [opts.parameter63.value] - Parameter value\n   * @param {string} [opts.parameter64.name] - Parameter name\n   * @param {string} [opts.parameter64.value] - Parameter value\n   * @param {string} [opts.parameter65.name] - Parameter name\n   * @param {string} [opts.parameter65.value] - Parameter value\n   * @param {string} [opts.parameter66.name] - Parameter name\n   * @param {string} [opts.parameter66.value] - Parameter value\n   * @param {string} [opts.parameter67.name] - Parameter name\n   * @param {string} [opts.parameter67.value] - Parameter value\n   * @param {string} [opts.parameter68.name] - Parameter name\n   * @param {string} [opts.parameter68.value] - Parameter value\n   * @param {string} [opts.parameter69.name] - Parameter name\n   * @param {string} [opts.parameter69.value] - Parameter value\n   * @param {string} [opts.parameter70.name] - Parameter name\n   * @param {string} [opts.parameter70.value] - Parameter value\n   * @param {string} [opts.parameter71.name] - Parameter name\n   * @param {string} [opts.parameter71.value] - Parameter value\n   * @param {string} [opts.parameter72.name] - Parameter name\n   * @param {string} [opts.parameter72.value] - Parameter value\n   * @param {string} [opts.parameter73.name] - Parameter name\n   * @param {string} [opts.parameter73.value] - Parameter value\n   * @param {string} [opts.parameter74.name] - Parameter name\n   * @param {string} [opts.parameter74.value] - Parameter value\n   * @param {string} [opts.parameter75.name] - Parameter name\n   * @param {string} [opts.parameter75.value] - Parameter value\n   * @param {string} [opts.parameter76.name] - Parameter name\n   * @param {string} [opts.parameter76.value] - Parameter value\n   * @param {string} [opts.parameter77.name] - Parameter name\n   * @param {string} [opts.parameter77.value] - Parameter value\n   * @param {string} [opts.parameter78.name] - Parameter name\n   * @param {string} [opts.parameter78.value] - Parameter value\n   * @param {string} [opts.parameter79.name] - Parameter name\n   * @param {string} [opts.parameter79.value] - Parameter value\n   * @param {string} [opts.parameter80.name] - Parameter name\n   * @param {string} [opts.parameter80.value] - Parameter value\n   * @param {string} [opts.parameter81.name] - Parameter name\n   * @param {string} [opts.parameter81.value] - Parameter value\n   * @param {string} [opts.parameter82.name] - Parameter name\n   * @param {string} [opts.parameter82.value] - Parameter value\n   * @param {string} [opts.parameter83.name] - Parameter name\n   * @param {string} [opts.parameter83.value] - Parameter value\n   * @param {string} [opts.parameter84.name] - Parameter name\n   * @param {string} [opts.parameter84.value] - Parameter value\n   * @param {string} [opts.parameter85.name] - Parameter name\n   * @param {string} [opts.parameter85.value] - Parameter value\n   * @param {string} [opts.parameter86.name] - Parameter name\n   * @param {string} [opts.parameter86.value] - Parameter value\n   * @param {string} [opts.parameter87.name] - Parameter name\n   * @param {string} [opts.parameter87.value] - Parameter value\n   * @param {string} [opts.parameter88.name] - Parameter name\n   * @param {string} [opts.parameter88.value] - Parameter value\n   * @param {string} [opts.parameter89.name] - Parameter name\n   * @param {string} [opts.parameter89.value] - Parameter value\n   * @param {string} [opts.parameter90.name] - Parameter name\n   * @param {string} [opts.parameter90.value] - Parameter value\n   * @param {string} [opts.parameter91.name] - Parameter name\n   * @param {string} [opts.parameter91.value] - Parameter value\n   * @param {string} [opts.parameter92.name] - Parameter name\n   * @param {string} [opts.parameter92.value] - Parameter value\n   * @param {string} [opts.parameter93.name] - Parameter name\n   * @param {string} [opts.parameter93.value] - Parameter value\n   * @param {string} [opts.parameter94.name] - Parameter name\n   * @param {string} [opts.parameter94.value] - Parameter value\n   * @param {string} [opts.parameter95.name] - Parameter name\n   * @param {string} [opts.parameter95.value] - Parameter value\n   * @param {string} [opts.parameter96.name] - Parameter name\n   * @param {string} [opts.parameter96.value] - Parameter value\n   * @param {string} [opts.parameter97.name] - Parameter name\n   * @param {string} [opts.parameter97.value] - Parameter value\n   * @param {string} [opts.parameter98.name] - Parameter name\n   * @param {string} [opts.parameter98.value] - Parameter value\n   * @param {string} [opts.parameter99.name] - Parameter name\n   * @param {string} [opts.parameter99.value] - Parameter value\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SiprecInstance\n   */\n  /* jshint ignore:end */\n  SiprecListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Name': _.get(opts, 'name'),\n      'ConnectorName': _.get(opts, 'connectorName'),\n      'Track': _.get(opts, 'track'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'Parameter1.Name': _.get(opts, 'parameter1.name'),\n      'Parameter1.Value': _.get(opts, 'parameter1.value'),\n      'Parameter2.Name': _.get(opts, 'parameter2.name'),\n      'Parameter2.Value': _.get(opts, 'parameter2.value'),\n      'Parameter3.Name': _.get(opts, 'parameter3.name'),\n      'Parameter3.Value': _.get(opts, 'parameter3.value'),\n      'Parameter4.Name': _.get(opts, 'parameter4.name'),\n      'Parameter4.Value': _.get(opts, 'parameter4.value'),\n      'Parameter5.Name': _.get(opts, 'parameter5.name'),\n      'Parameter5.Value': _.get(opts, 'parameter5.value'),\n      'Parameter6.Name': _.get(opts, 'parameter6.name'),\n      'Parameter6.Value': _.get(opts, 'parameter6.value'),\n      'Parameter7.Name': _.get(opts, 'parameter7.name'),\n      'Parameter7.Value': _.get(opts, 'parameter7.value'),\n      'Parameter8.Name': _.get(opts, 'parameter8.name'),\n      'Parameter8.Value': _.get(opts, 'parameter8.value'),\n      'Parameter9.Name': _.get(opts, 'parameter9.name'),\n      'Parameter9.Value': _.get(opts, 'parameter9.value'),\n      'Parameter10.Name': _.get(opts, 'parameter10.name'),\n      'Parameter10.Value': _.get(opts, 'parameter10.value'),\n      'Parameter11.Name': _.get(opts, 'parameter11.name'),\n      'Parameter11.Value': _.get(opts, 'parameter11.value'),\n      'Parameter12.Name': _.get(opts, 'parameter12.name'),\n      'Parameter12.Value': _.get(opts, 'parameter12.value'),\n      'Parameter13.Name': _.get(opts, 'parameter13.name'),\n      'Parameter13.Value': _.get(opts, 'parameter13.value'),\n      'Parameter14.Name': _.get(opts, 'parameter14.name'),\n      'Parameter14.Value': _.get(opts, 'parameter14.value'),\n      'Parameter15.Name': _.get(opts, 'parameter15.name'),\n      'Parameter15.Value': _.get(opts, 'parameter15.value'),\n      'Parameter16.Name': _.get(opts, 'parameter16.name'),\n      'Parameter16.Value': _.get(opts, 'parameter16.value'),\n      'Parameter17.Name': _.get(opts, 'parameter17.name'),\n      'Parameter17.Value': _.get(opts, 'parameter17.value'),\n      'Parameter18.Name': _.get(opts, 'parameter18.name'),\n      'Parameter18.Value': _.get(opts, 'parameter18.value'),\n      'Parameter19.Name': _.get(opts, 'parameter19.name'),\n      'Parameter19.Value': _.get(opts, 'parameter19.value'),\n      'Parameter20.Name': _.get(opts, 'parameter20.name'),\n      'Parameter20.Value': _.get(opts, 'parameter20.value'),\n      'Parameter21.Name': _.get(opts, 'parameter21.name'),\n      'Parameter21.Value': _.get(opts, 'parameter21.value'),\n      'Parameter22.Name': _.get(opts, 'parameter22.name'),\n      'Parameter22.Value': _.get(opts, 'parameter22.value'),\n      'Parameter23.Name': _.get(opts, 'parameter23.name'),\n      'Parameter23.Value': _.get(opts, 'parameter23.value'),\n      'Parameter24.Name': _.get(opts, 'parameter24.name'),\n      'Parameter24.Value': _.get(opts, 'parameter24.value'),\n      'Parameter25.Name': _.get(opts, 'parameter25.name'),\n      'Parameter25.Value': _.get(opts, 'parameter25.value'),\n      'Parameter26.Name': _.get(opts, 'parameter26.name'),\n      'Parameter26.Value': _.get(opts, 'parameter26.value'),\n      'Parameter27.Name': _.get(opts, 'parameter27.name'),\n      'Parameter27.Value': _.get(opts, 'parameter27.value'),\n      'Parameter28.Name': _.get(opts, 'parameter28.name'),\n      'Parameter28.Value': _.get(opts, 'parameter28.value'),\n      'Parameter29.Name': _.get(opts, 'parameter29.name'),\n      'Parameter29.Value': _.get(opts, 'parameter29.value'),\n      'Parameter30.Name': _.get(opts, 'parameter30.name'),\n      'Parameter30.Value': _.get(opts, 'parameter30.value'),\n      'Parameter31.Name': _.get(opts, 'parameter31.name'),\n      'Parameter31.Value': _.get(opts, 'parameter31.value'),\n      'Parameter32.Name': _.get(opts, 'parameter32.name'),\n      'Parameter32.Value': _.get(opts, 'parameter32.value'),\n      'Parameter33.Name': _.get(opts, 'parameter33.name'),\n      'Parameter33.Value': _.get(opts, 'parameter33.value'),\n      'Parameter34.Name': _.get(opts, 'parameter34.name'),\n      'Parameter34.Value': _.get(opts, 'parameter34.value'),\n      'Parameter35.Name': _.get(opts, 'parameter35.name'),\n      'Parameter35.Value': _.get(opts, 'parameter35.value'),\n      'Parameter36.Name': _.get(opts, 'parameter36.name'),\n      'Parameter36.Value': _.get(opts, 'parameter36.value'),\n      'Parameter37.Name': _.get(opts, 'parameter37.name'),\n      'Parameter37.Value': _.get(opts, 'parameter37.value'),\n      'Parameter38.Name': _.get(opts, 'parameter38.name'),\n      'Parameter38.Value': _.get(opts, 'parameter38.value'),\n      'Parameter39.Name': _.get(opts, 'parameter39.name'),\n      'Parameter39.Value': _.get(opts, 'parameter39.value'),\n      'Parameter40.Name': _.get(opts, 'parameter40.name'),\n      'Parameter40.Value': _.get(opts, 'parameter40.value'),\n      'Parameter41.Name': _.get(opts, 'parameter41.name'),\n      'Parameter41.Value': _.get(opts, 'parameter41.value'),\n      'Parameter42.Name': _.get(opts, 'parameter42.name'),\n      'Parameter42.Value': _.get(opts, 'parameter42.value'),\n      'Parameter43.Name': _.get(opts, 'parameter43.name'),\n      'Parameter43.Value': _.get(opts, 'parameter43.value'),\n      'Parameter44.Name': _.get(opts, 'parameter44.name'),\n      'Parameter44.Value': _.get(opts, 'parameter44.value'),\n      'Parameter45.Name': _.get(opts, 'parameter45.name'),\n      'Parameter45.Value': _.get(opts, 'parameter45.value'),\n      'Parameter46.Name': _.get(opts, 'parameter46.name'),\n      'Parameter46.Value': _.get(opts, 'parameter46.value'),\n      'Parameter47.Name': _.get(opts, 'parameter47.name'),\n      'Parameter47.Value': _.get(opts, 'parameter47.value'),\n      'Parameter48.Name': _.get(opts, 'parameter48.name'),\n      'Parameter48.Value': _.get(opts, 'parameter48.value'),\n      'Parameter49.Name': _.get(opts, 'parameter49.name'),\n      'Parameter49.Value': _.get(opts, 'parameter49.value'),\n      'Parameter50.Name': _.get(opts, 'parameter50.name'),\n      'Parameter50.Value': _.get(opts, 'parameter50.value'),\n      'Parameter51.Name': _.get(opts, 'parameter51.name'),\n      'Parameter51.Value': _.get(opts, 'parameter51.value'),\n      'Parameter52.Name': _.get(opts, 'parameter52.name'),\n      'Parameter52.Value': _.get(opts, 'parameter52.value'),\n      'Parameter53.Name': _.get(opts, 'parameter53.name'),\n      'Parameter53.Value': _.get(opts, 'parameter53.value'),\n      'Parameter54.Name': _.get(opts, 'parameter54.name'),\n      'Parameter54.Value': _.get(opts, 'parameter54.value'),\n      'Parameter55.Name': _.get(opts, 'parameter55.name'),\n      'Parameter55.Value': _.get(opts, 'parameter55.value'),\n      'Parameter56.Name': _.get(opts, 'parameter56.name'),\n      'Parameter56.Value': _.get(opts, 'parameter56.value'),\n      'Parameter57.Name': _.get(opts, 'parameter57.name'),\n      'Parameter57.Value': _.get(opts, 'parameter57.value'),\n      'Parameter58.Name': _.get(opts, 'parameter58.name'),\n      'Parameter58.Value': _.get(opts, 'parameter58.value'),\n      'Parameter59.Name': _.get(opts, 'parameter59.name'),\n      'Parameter59.Value': _.get(opts, 'parameter59.value'),\n      'Parameter60.Name': _.get(opts, 'parameter60.name'),\n      'Parameter60.Value': _.get(opts, 'parameter60.value'),\n      'Parameter61.Name': _.get(opts, 'parameter61.name'),\n      'Parameter61.Value': _.get(opts, 'parameter61.value'),\n      'Parameter62.Name': _.get(opts, 'parameter62.name'),\n      'Parameter62.Value': _.get(opts, 'parameter62.value'),\n      'Parameter63.Name': _.get(opts, 'parameter63.name'),\n      'Parameter63.Value': _.get(opts, 'parameter63.value'),\n      'Parameter64.Name': _.get(opts, 'parameter64.name'),\n      'Parameter64.Value': _.get(opts, 'parameter64.value'),\n      'Parameter65.Name': _.get(opts, 'parameter65.name'),\n      'Parameter65.Value': _.get(opts, 'parameter65.value'),\n      'Parameter66.Name': _.get(opts, 'parameter66.name'),\n      'Parameter66.Value': _.get(opts, 'parameter66.value'),\n      'Parameter67.Name': _.get(opts, 'parameter67.name'),\n      'Parameter67.Value': _.get(opts, 'parameter67.value'),\n      'Parameter68.Name': _.get(opts, 'parameter68.name'),\n      'Parameter68.Value': _.get(opts, 'parameter68.value'),\n      'Parameter69.Name': _.get(opts, 'parameter69.name'),\n      'Parameter69.Value': _.get(opts, 'parameter69.value'),\n      'Parameter70.Name': _.get(opts, 'parameter70.name'),\n      'Parameter70.Value': _.get(opts, 'parameter70.value'),\n      'Parameter71.Name': _.get(opts, 'parameter71.name'),\n      'Parameter71.Value': _.get(opts, 'parameter71.value'),\n      'Parameter72.Name': _.get(opts, 'parameter72.name'),\n      'Parameter72.Value': _.get(opts, 'parameter72.value'),\n      'Parameter73.Name': _.get(opts, 'parameter73.name'),\n      'Parameter73.Value': _.get(opts, 'parameter73.value'),\n      'Parameter74.Name': _.get(opts, 'parameter74.name'),\n      'Parameter74.Value': _.get(opts, 'parameter74.value'),\n      'Parameter75.Name': _.get(opts, 'parameter75.name'),\n      'Parameter75.Value': _.get(opts, 'parameter75.value'),\n      'Parameter76.Name': _.get(opts, 'parameter76.name'),\n      'Parameter76.Value': _.get(opts, 'parameter76.value'),\n      'Parameter77.Name': _.get(opts, 'parameter77.name'),\n      'Parameter77.Value': _.get(opts, 'parameter77.value'),\n      'Parameter78.Name': _.get(opts, 'parameter78.name'),\n      'Parameter78.Value': _.get(opts, 'parameter78.value'),\n      'Parameter79.Name': _.get(opts, 'parameter79.name'),\n      'Parameter79.Value': _.get(opts, 'parameter79.value'),\n      'Parameter80.Name': _.get(opts, 'parameter80.name'),\n      'Parameter80.Value': _.get(opts, 'parameter80.value'),\n      'Parameter81.Name': _.get(opts, 'parameter81.name'),\n      'Parameter81.Value': _.get(opts, 'parameter81.value'),\n      'Parameter82.Name': _.get(opts, 'parameter82.name'),\n      'Parameter82.Value': _.get(opts, 'parameter82.value'),\n      'Parameter83.Name': _.get(opts, 'parameter83.name'),\n      'Parameter83.Value': _.get(opts, 'parameter83.value'),\n      'Parameter84.Name': _.get(opts, 'parameter84.name'),\n      'Parameter84.Value': _.get(opts, 'parameter84.value'),\n      'Parameter85.Name': _.get(opts, 'parameter85.name'),\n      'Parameter85.Value': _.get(opts, 'parameter85.value'),\n      'Parameter86.Name': _.get(opts, 'parameter86.name'),\n      'Parameter86.Value': _.get(opts, 'parameter86.value'),\n      'Parameter87.Name': _.get(opts, 'parameter87.name'),\n      'Parameter87.Value': _.get(opts, 'parameter87.value'),\n      'Parameter88.Name': _.get(opts, 'parameter88.name'),\n      'Parameter88.Value': _.get(opts, 'parameter88.value'),\n      'Parameter89.Name': _.get(opts, 'parameter89.name'),\n      'Parameter89.Value': _.get(opts, 'parameter89.value'),\n      'Parameter90.Name': _.get(opts, 'parameter90.name'),\n      'Parameter90.Value': _.get(opts, 'parameter90.value'),\n      'Parameter91.Name': _.get(opts, 'parameter91.name'),\n      'Parameter91.Value': _.get(opts, 'parameter91.value'),\n      'Parameter92.Name': _.get(opts, 'parameter92.name'),\n      'Parameter92.Value': _.get(opts, 'parameter92.value'),\n      'Parameter93.Name': _.get(opts, 'parameter93.name'),\n      'Parameter93.Value': _.get(opts, 'parameter93.value'),\n      'Parameter94.Name': _.get(opts, 'parameter94.name'),\n      'Parameter94.Value': _.get(opts, 'parameter94.value'),\n      'Parameter95.Name': _.get(opts, 'parameter95.name'),\n      'Parameter95.Value': _.get(opts, 'parameter95.value'),\n      'Parameter96.Name': _.get(opts, 'parameter96.name'),\n      'Parameter96.Value': _.get(opts, 'parameter96.value'),\n      'Parameter97.Name': _.get(opts, 'parameter97.name'),\n      'Parameter97.Value': _.get(opts, 'parameter97.value'),\n      'Parameter98.Name': _.get(opts, 'parameter98.name'),\n      'Parameter98.Value': _.get(opts, 'parameter98.value'),\n      'Parameter99.Name': _.get(opts, 'parameter99.name'),\n      'Parameter99.Value': _.get(opts, 'parameter99.value')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SiprecInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.callSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a siprec\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecList#\n   *\n   * @param {string} sid - The SID of the Siprec resource, or the `name`\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.SiprecContext}\n   */\n  /* jshint ignore:end */\n  SiprecListInstance.get = function get(sid) {\n    return new SiprecContext(this._version, this._solution.accountSid, this._solution.callSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SiprecListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SiprecListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SiprecListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SiprecPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.SiprecPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SiprecSolution} solution - Path solution\n *\n * @returns SiprecPage\n */\n/* jshint ignore:end */\nSiprecPage = function SiprecPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SiprecPage.prototype, Page.prototype);\nSiprecPage.prototype.constructor = SiprecPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SiprecInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecPage#\n *\n * @param {SiprecPayload} payload - Payload response from the API\n *\n * @returns SiprecInstance\n */\n/* jshint ignore:end */\nSiprecPage.prototype.getInstance = function getInstance(payload) {\n  return new SiprecInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.callSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSiprecPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSiprecPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SiprecContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.SiprecInstance\n *\n * @property {string} sid - The SID of the Siprec resource.\n * @property {string} accountSid -\n *          The SID of the Account that created this resource\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {string} name - The name of this resource\n * @property {siprec.status} status - The status - one of `stopped`, `in-progress`\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that this resource was last updated\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {SiprecPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} callSid - The SID of the Call the resource is associated with\n * @param {sid_like} sid - The SID of the Siprec resource, or the `name`\n */\n/* jshint ignore:end */\nSiprecInstance = function SiprecInstance(version, payload, accountSid, callSid,\n                                          sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.name = payload.name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SiprecInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SiprecContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.callSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a SiprecInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecInstance#\n *\n * @param {object} opts - Options for request\n * @param {siprec.update_status} opts.status -\n *          The status. Must have the value `stopped`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SiprecInstance\n */\n/* jshint ignore:end */\nSiprecInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSiprecInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSiprecInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SiprecContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.SiprecContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} callSid - The SID of the Call the resource is associated with\n * @param {sid_like} sid - The SID of the Siprec resource, or the `name`\n */\n/* jshint ignore:end */\nSiprecContext = function SiprecContext(version, accountSid, callSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Calls/${callSid}/Siprec/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * update a SiprecInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecContext#\n *\n * @param {object} opts - Options for request\n * @param {siprec.update_status} opts.status -\n *          The status. Must have the value `stopped`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SiprecInstance\n */\n/* jshint ignore:end */\nSiprecContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SiprecInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.callSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.SiprecContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSiprecContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSiprecContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SiprecList: SiprecList,\n  SiprecPage: SiprecPage,\n  SiprecInstance: SiprecInstance,\n  SiprecContext: SiprecContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar StreamList;\nvar StreamPage;\nvar StreamInstance;\nvar StreamContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the StreamList\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.StreamList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n * @param {string} callSid - The SID of the Call the resource is associated with\n */\n/* jshint ignore:end */\nStreamList = function StreamList(version, accountSid, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function streams\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.StreamContext}\n   */\n  /* jshint ignore:end */\n  function StreamListInstance(sid) {\n    return StreamListInstance.get(sid);\n  }\n\n  StreamListInstance._version = version;\n  // Path Solution\n  StreamListInstance._solution = {accountSid: accountSid, callSid: callSid};\n  StreamListInstance._uri = `/Accounts/${accountSid}/Calls/${callSid}/Streams.json`;\n  /* jshint ignore:start */\n  /**\n   * create a StreamInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.StreamList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.url - Url where WebSocket connection will be established.\n   * @param {string} [opts.name] - The name of this resource\n   * @param {stream.track} [opts.track] -\n   *          One of `inbound_track`, `outbound_track`, `both_tracks`.\n   * @param {string} [opts.statusCallback] - Absolute URL of the status callback.\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The http method for the status_callback.\n   * @param {string} [opts.parameter1.name] - Parameter name\n   * @param {string} [opts.parameter1.value] - Parameter value\n   * @param {string} [opts.parameter2.name] - Parameter name\n   * @param {string} [opts.parameter2.value] - Parameter value\n   * @param {string} [opts.parameter3.name] - Parameter name\n   * @param {string} [opts.parameter3.value] - Parameter value\n   * @param {string} [opts.parameter4.name] - Parameter name\n   * @param {string} [opts.parameter4.value] - Parameter value\n   * @param {string} [opts.parameter5.name] - Parameter name\n   * @param {string} [opts.parameter5.value] - Parameter value\n   * @param {string} [opts.parameter6.name] - Parameter name\n   * @param {string} [opts.parameter6.value] - Parameter value\n   * @param {string} [opts.parameter7.name] - Parameter name\n   * @param {string} [opts.parameter7.value] - Parameter value\n   * @param {string} [opts.parameter8.name] - Parameter name\n   * @param {string} [opts.parameter8.value] - Parameter value\n   * @param {string} [opts.parameter9.name] - Parameter name\n   * @param {string} [opts.parameter9.value] - Parameter value\n   * @param {string} [opts.parameter10.name] - Parameter name\n   * @param {string} [opts.parameter10.value] - Parameter value\n   * @param {string} [opts.parameter11.name] - Parameter name\n   * @param {string} [opts.parameter11.value] - Parameter value\n   * @param {string} [opts.parameter12.name] - Parameter name\n   * @param {string} [opts.parameter12.value] - Parameter value\n   * @param {string} [opts.parameter13.name] - Parameter name\n   * @param {string} [opts.parameter13.value] - Parameter value\n   * @param {string} [opts.parameter14.name] - Parameter name\n   * @param {string} [opts.parameter14.value] - Parameter value\n   * @param {string} [opts.parameter15.name] - Parameter name\n   * @param {string} [opts.parameter15.value] - Parameter value\n   * @param {string} [opts.parameter16.name] - Parameter name\n   * @param {string} [opts.parameter16.value] - Parameter value\n   * @param {string} [opts.parameter17.name] - Parameter name\n   * @param {string} [opts.parameter17.value] - Parameter value\n   * @param {string} [opts.parameter18.name] - Parameter name\n   * @param {string} [opts.parameter18.value] - Parameter value\n   * @param {string} [opts.parameter19.name] - Parameter name\n   * @param {string} [opts.parameter19.value] - Parameter value\n   * @param {string} [opts.parameter20.name] - Parameter name\n   * @param {string} [opts.parameter20.value] - Parameter value\n   * @param {string} [opts.parameter21.name] - Parameter name\n   * @param {string} [opts.parameter21.value] - Parameter value\n   * @param {string} [opts.parameter22.name] - Parameter name\n   * @param {string} [opts.parameter22.value] - Parameter value\n   * @param {string} [opts.parameter23.name] - Parameter name\n   * @param {string} [opts.parameter23.value] - Parameter value\n   * @param {string} [opts.parameter24.name] - Parameter name\n   * @param {string} [opts.parameter24.value] - Parameter value\n   * @param {string} [opts.parameter25.name] - Parameter name\n   * @param {string} [opts.parameter25.value] - Parameter value\n   * @param {string} [opts.parameter26.name] - Parameter name\n   * @param {string} [opts.parameter26.value] - Parameter value\n   * @param {string} [opts.parameter27.name] - Parameter name\n   * @param {string} [opts.parameter27.value] - Parameter value\n   * @param {string} [opts.parameter28.name] - Parameter name\n   * @param {string} [opts.parameter28.value] - Parameter value\n   * @param {string} [opts.parameter29.name] - Parameter name\n   * @param {string} [opts.parameter29.value] - Parameter value\n   * @param {string} [opts.parameter30.name] - Parameter name\n   * @param {string} [opts.parameter30.value] - Parameter value\n   * @param {string} [opts.parameter31.name] - Parameter name\n   * @param {string} [opts.parameter31.value] - Parameter value\n   * @param {string} [opts.parameter32.name] - Parameter name\n   * @param {string} [opts.parameter32.value] - Parameter value\n   * @param {string} [opts.parameter33.name] - Parameter name\n   * @param {string} [opts.parameter33.value] - Parameter value\n   * @param {string} [opts.parameter34.name] - Parameter name\n   * @param {string} [opts.parameter34.value] - Parameter value\n   * @param {string} [opts.parameter35.name] - Parameter name\n   * @param {string} [opts.parameter35.value] - Parameter value\n   * @param {string} [opts.parameter36.name] - Parameter name\n   * @param {string} [opts.parameter36.value] - Parameter value\n   * @param {string} [opts.parameter37.name] - Parameter name\n   * @param {string} [opts.parameter37.value] - Parameter value\n   * @param {string} [opts.parameter38.name] - Parameter name\n   * @param {string} [opts.parameter38.value] - Parameter value\n   * @param {string} [opts.parameter39.name] - Parameter name\n   * @param {string} [opts.parameter39.value] - Parameter value\n   * @param {string} [opts.parameter40.name] - Parameter name\n   * @param {string} [opts.parameter40.value] - Parameter value\n   * @param {string} [opts.parameter41.name] - Parameter name\n   * @param {string} [opts.parameter41.value] - Parameter value\n   * @param {string} [opts.parameter42.name] - Parameter name\n   * @param {string} [opts.parameter42.value] - Parameter value\n   * @param {string} [opts.parameter43.name] - Parameter name\n   * @param {string} [opts.parameter43.value] - Parameter value\n   * @param {string} [opts.parameter44.name] - Parameter name\n   * @param {string} [opts.parameter44.value] - Parameter value\n   * @param {string} [opts.parameter45.name] - Parameter name\n   * @param {string} [opts.parameter45.value] - Parameter value\n   * @param {string} [opts.parameter46.name] - Parameter name\n   * @param {string} [opts.parameter46.value] - Parameter value\n   * @param {string} [opts.parameter47.name] - Parameter name\n   * @param {string} [opts.parameter47.value] - Parameter value\n   * @param {string} [opts.parameter48.name] - Parameter name\n   * @param {string} [opts.parameter48.value] - Parameter value\n   * @param {string} [opts.parameter49.name] - Parameter name\n   * @param {string} [opts.parameter49.value] - Parameter value\n   * @param {string} [opts.parameter50.name] - Parameter name\n   * @param {string} [opts.parameter50.value] - Parameter value\n   * @param {string} [opts.parameter51.name] - Parameter name\n   * @param {string} [opts.parameter51.value] - Parameter value\n   * @param {string} [opts.parameter52.name] - Parameter name\n   * @param {string} [opts.parameter52.value] - Parameter value\n   * @param {string} [opts.parameter53.name] - Parameter name\n   * @param {string} [opts.parameter53.value] - Parameter value\n   * @param {string} [opts.parameter54.name] - Parameter name\n   * @param {string} [opts.parameter54.value] - Parameter value\n   * @param {string} [opts.parameter55.name] - Parameter name\n   * @param {string} [opts.parameter55.value] - Parameter value\n   * @param {string} [opts.parameter56.name] - Parameter name\n   * @param {string} [opts.parameter56.value] - Parameter value\n   * @param {string} [opts.parameter57.name] - Parameter name\n   * @param {string} [opts.parameter57.value] - Parameter value\n   * @param {string} [opts.parameter58.name] - Parameter name\n   * @param {string} [opts.parameter58.value] - Parameter value\n   * @param {string} [opts.parameter59.name] - Parameter name\n   * @param {string} [opts.parameter59.value] - Parameter value\n   * @param {string} [opts.parameter60.name] - Parameter name\n   * @param {string} [opts.parameter60.value] - Parameter value\n   * @param {string} [opts.parameter61.name] - Parameter name\n   * @param {string} [opts.parameter61.value] - Parameter value\n   * @param {string} [opts.parameter62.name] - Parameter name\n   * @param {string} [opts.parameter62.value] - Parameter value\n   * @param {string} [opts.parameter63.name] - Parameter name\n   * @param {string} [opts.parameter63.value] - Parameter value\n   * @param {string} [opts.parameter64.name] - Parameter name\n   * @param {string} [opts.parameter64.value] - Parameter value\n   * @param {string} [opts.parameter65.name] - Parameter name\n   * @param {string} [opts.parameter65.value] - Parameter value\n   * @param {string} [opts.parameter66.name] - Parameter name\n   * @param {string} [opts.parameter66.value] - Parameter value\n   * @param {string} [opts.parameter67.name] - Parameter name\n   * @param {string} [opts.parameter67.value] - Parameter value\n   * @param {string} [opts.parameter68.name] - Parameter name\n   * @param {string} [opts.parameter68.value] - Parameter value\n   * @param {string} [opts.parameter69.name] - Parameter name\n   * @param {string} [opts.parameter69.value] - Parameter value\n   * @param {string} [opts.parameter70.name] - Parameter name\n   * @param {string} [opts.parameter70.value] - Parameter value\n   * @param {string} [opts.parameter71.name] - Parameter name\n   * @param {string} [opts.parameter71.value] - Parameter value\n   * @param {string} [opts.parameter72.name] - Parameter name\n   * @param {string} [opts.parameter72.value] - Parameter value\n   * @param {string} [opts.parameter73.name] - Parameter name\n   * @param {string} [opts.parameter73.value] - Parameter value\n   * @param {string} [opts.parameter74.name] - Parameter name\n   * @param {string} [opts.parameter74.value] - Parameter value\n   * @param {string} [opts.parameter75.name] - Parameter name\n   * @param {string} [opts.parameter75.value] - Parameter value\n   * @param {string} [opts.parameter76.name] - Parameter name\n   * @param {string} [opts.parameter76.value] - Parameter value\n   * @param {string} [opts.parameter77.name] - Parameter name\n   * @param {string} [opts.parameter77.value] - Parameter value\n   * @param {string} [opts.parameter78.name] - Parameter name\n   * @param {string} [opts.parameter78.value] - Parameter value\n   * @param {string} [opts.parameter79.name] - Parameter name\n   * @param {string} [opts.parameter79.value] - Parameter value\n   * @param {string} [opts.parameter80.name] - Parameter name\n   * @param {string} [opts.parameter80.value] - Parameter value\n   * @param {string} [opts.parameter81.name] - Parameter name\n   * @param {string} [opts.parameter81.value] - Parameter value\n   * @param {string} [opts.parameter82.name] - Parameter name\n   * @param {string} [opts.parameter82.value] - Parameter value\n   * @param {string} [opts.parameter83.name] - Parameter name\n   * @param {string} [opts.parameter83.value] - Parameter value\n   * @param {string} [opts.parameter84.name] - Parameter name\n   * @param {string} [opts.parameter84.value] - Parameter value\n   * @param {string} [opts.parameter85.name] - Parameter name\n   * @param {string} [opts.parameter85.value] - Parameter value\n   * @param {string} [opts.parameter86.name] - Parameter name\n   * @param {string} [opts.parameter86.value] - Parameter value\n   * @param {string} [opts.parameter87.name] - Parameter name\n   * @param {string} [opts.parameter87.value] - Parameter value\n   * @param {string} [opts.parameter88.name] - Parameter name\n   * @param {string} [opts.parameter88.value] - Parameter value\n   * @param {string} [opts.parameter89.name] - Parameter name\n   * @param {string} [opts.parameter89.value] - Parameter value\n   * @param {string} [opts.parameter90.name] - Parameter name\n   * @param {string} [opts.parameter90.value] - Parameter value\n   * @param {string} [opts.parameter91.name] - Parameter name\n   * @param {string} [opts.parameter91.value] - Parameter value\n   * @param {string} [opts.parameter92.name] - Parameter name\n   * @param {string} [opts.parameter92.value] - Parameter value\n   * @param {string} [opts.parameter93.name] - Parameter name\n   * @param {string} [opts.parameter93.value] - Parameter value\n   * @param {string} [opts.parameter94.name] - Parameter name\n   * @param {string} [opts.parameter94.value] - Parameter value\n   * @param {string} [opts.parameter95.name] - Parameter name\n   * @param {string} [opts.parameter95.value] - Parameter value\n   * @param {string} [opts.parameter96.name] - Parameter name\n   * @param {string} [opts.parameter96.value] - Parameter value\n   * @param {string} [opts.parameter97.name] - Parameter name\n   * @param {string} [opts.parameter97.value] - Parameter value\n   * @param {string} [opts.parameter98.name] - Parameter name\n   * @param {string} [opts.parameter98.value] - Parameter value\n   * @param {string} [opts.parameter99.name] - Parameter name\n   * @param {string} [opts.parameter99.value] - Parameter value\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed StreamInstance\n   */\n  /* jshint ignore:end */\n  StreamListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['url'])) {\n      throw new Error('Required parameter \"opts[\\'url\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Url': _.get(opts, 'url'),\n      'Name': _.get(opts, 'name'),\n      'Track': _.get(opts, 'track'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'Parameter1.Name': _.get(opts, 'parameter1.name'),\n      'Parameter1.Value': _.get(opts, 'parameter1.value'),\n      'Parameter2.Name': _.get(opts, 'parameter2.name'),\n      'Parameter2.Value': _.get(opts, 'parameter2.value'),\n      'Parameter3.Name': _.get(opts, 'parameter3.name'),\n      'Parameter3.Value': _.get(opts, 'parameter3.value'),\n      'Parameter4.Name': _.get(opts, 'parameter4.name'),\n      'Parameter4.Value': _.get(opts, 'parameter4.value'),\n      'Parameter5.Name': _.get(opts, 'parameter5.name'),\n      'Parameter5.Value': _.get(opts, 'parameter5.value'),\n      'Parameter6.Name': _.get(opts, 'parameter6.name'),\n      'Parameter6.Value': _.get(opts, 'parameter6.value'),\n      'Parameter7.Name': _.get(opts, 'parameter7.name'),\n      'Parameter7.Value': _.get(opts, 'parameter7.value'),\n      'Parameter8.Name': _.get(opts, 'parameter8.name'),\n      'Parameter8.Value': _.get(opts, 'parameter8.value'),\n      'Parameter9.Name': _.get(opts, 'parameter9.name'),\n      'Parameter9.Value': _.get(opts, 'parameter9.value'),\n      'Parameter10.Name': _.get(opts, 'parameter10.name'),\n      'Parameter10.Value': _.get(opts, 'parameter10.value'),\n      'Parameter11.Name': _.get(opts, 'parameter11.name'),\n      'Parameter11.Value': _.get(opts, 'parameter11.value'),\n      'Parameter12.Name': _.get(opts, 'parameter12.name'),\n      'Parameter12.Value': _.get(opts, 'parameter12.value'),\n      'Parameter13.Name': _.get(opts, 'parameter13.name'),\n      'Parameter13.Value': _.get(opts, 'parameter13.value'),\n      'Parameter14.Name': _.get(opts, 'parameter14.name'),\n      'Parameter14.Value': _.get(opts, 'parameter14.value'),\n      'Parameter15.Name': _.get(opts, 'parameter15.name'),\n      'Parameter15.Value': _.get(opts, 'parameter15.value'),\n      'Parameter16.Name': _.get(opts, 'parameter16.name'),\n      'Parameter16.Value': _.get(opts, 'parameter16.value'),\n      'Parameter17.Name': _.get(opts, 'parameter17.name'),\n      'Parameter17.Value': _.get(opts, 'parameter17.value'),\n      'Parameter18.Name': _.get(opts, 'parameter18.name'),\n      'Parameter18.Value': _.get(opts, 'parameter18.value'),\n      'Parameter19.Name': _.get(opts, 'parameter19.name'),\n      'Parameter19.Value': _.get(opts, 'parameter19.value'),\n      'Parameter20.Name': _.get(opts, 'parameter20.name'),\n      'Parameter20.Value': _.get(opts, 'parameter20.value'),\n      'Parameter21.Name': _.get(opts, 'parameter21.name'),\n      'Parameter21.Value': _.get(opts, 'parameter21.value'),\n      'Parameter22.Name': _.get(opts, 'parameter22.name'),\n      'Parameter22.Value': _.get(opts, 'parameter22.value'),\n      'Parameter23.Name': _.get(opts, 'parameter23.name'),\n      'Parameter23.Value': _.get(opts, 'parameter23.value'),\n      'Parameter24.Name': _.get(opts, 'parameter24.name'),\n      'Parameter24.Value': _.get(opts, 'parameter24.value'),\n      'Parameter25.Name': _.get(opts, 'parameter25.name'),\n      'Parameter25.Value': _.get(opts, 'parameter25.value'),\n      'Parameter26.Name': _.get(opts, 'parameter26.name'),\n      'Parameter26.Value': _.get(opts, 'parameter26.value'),\n      'Parameter27.Name': _.get(opts, 'parameter27.name'),\n      'Parameter27.Value': _.get(opts, 'parameter27.value'),\n      'Parameter28.Name': _.get(opts, 'parameter28.name'),\n      'Parameter28.Value': _.get(opts, 'parameter28.value'),\n      'Parameter29.Name': _.get(opts, 'parameter29.name'),\n      'Parameter29.Value': _.get(opts, 'parameter29.value'),\n      'Parameter30.Name': _.get(opts, 'parameter30.name'),\n      'Parameter30.Value': _.get(opts, 'parameter30.value'),\n      'Parameter31.Name': _.get(opts, 'parameter31.name'),\n      'Parameter31.Value': _.get(opts, 'parameter31.value'),\n      'Parameter32.Name': _.get(opts, 'parameter32.name'),\n      'Parameter32.Value': _.get(opts, 'parameter32.value'),\n      'Parameter33.Name': _.get(opts, 'parameter33.name'),\n      'Parameter33.Value': _.get(opts, 'parameter33.value'),\n      'Parameter34.Name': _.get(opts, 'parameter34.name'),\n      'Parameter34.Value': _.get(opts, 'parameter34.value'),\n      'Parameter35.Name': _.get(opts, 'parameter35.name'),\n      'Parameter35.Value': _.get(opts, 'parameter35.value'),\n      'Parameter36.Name': _.get(opts, 'parameter36.name'),\n      'Parameter36.Value': _.get(opts, 'parameter36.value'),\n      'Parameter37.Name': _.get(opts, 'parameter37.name'),\n      'Parameter37.Value': _.get(opts, 'parameter37.value'),\n      'Parameter38.Name': _.get(opts, 'parameter38.name'),\n      'Parameter38.Value': _.get(opts, 'parameter38.value'),\n      'Parameter39.Name': _.get(opts, 'parameter39.name'),\n      'Parameter39.Value': _.get(opts, 'parameter39.value'),\n      'Parameter40.Name': _.get(opts, 'parameter40.name'),\n      'Parameter40.Value': _.get(opts, 'parameter40.value'),\n      'Parameter41.Name': _.get(opts, 'parameter41.name'),\n      'Parameter41.Value': _.get(opts, 'parameter41.value'),\n      'Parameter42.Name': _.get(opts, 'parameter42.name'),\n      'Parameter42.Value': _.get(opts, 'parameter42.value'),\n      'Parameter43.Name': _.get(opts, 'parameter43.name'),\n      'Parameter43.Value': _.get(opts, 'parameter43.value'),\n      'Parameter44.Name': _.get(opts, 'parameter44.name'),\n      'Parameter44.Value': _.get(opts, 'parameter44.value'),\n      'Parameter45.Name': _.get(opts, 'parameter45.name'),\n      'Parameter45.Value': _.get(opts, 'parameter45.value'),\n      'Parameter46.Name': _.get(opts, 'parameter46.name'),\n      'Parameter46.Value': _.get(opts, 'parameter46.value'),\n      'Parameter47.Name': _.get(opts, 'parameter47.name'),\n      'Parameter47.Value': _.get(opts, 'parameter47.value'),\n      'Parameter48.Name': _.get(opts, 'parameter48.name'),\n      'Parameter48.Value': _.get(opts, 'parameter48.value'),\n      'Parameter49.Name': _.get(opts, 'parameter49.name'),\n      'Parameter49.Value': _.get(opts, 'parameter49.value'),\n      'Parameter50.Name': _.get(opts, 'parameter50.name'),\n      'Parameter50.Value': _.get(opts, 'parameter50.value'),\n      'Parameter51.Name': _.get(opts, 'parameter51.name'),\n      'Parameter51.Value': _.get(opts, 'parameter51.value'),\n      'Parameter52.Name': _.get(opts, 'parameter52.name'),\n      'Parameter52.Value': _.get(opts, 'parameter52.value'),\n      'Parameter53.Name': _.get(opts, 'parameter53.name'),\n      'Parameter53.Value': _.get(opts, 'parameter53.value'),\n      'Parameter54.Name': _.get(opts, 'parameter54.name'),\n      'Parameter54.Value': _.get(opts, 'parameter54.value'),\n      'Parameter55.Name': _.get(opts, 'parameter55.name'),\n      'Parameter55.Value': _.get(opts, 'parameter55.value'),\n      'Parameter56.Name': _.get(opts, 'parameter56.name'),\n      'Parameter56.Value': _.get(opts, 'parameter56.value'),\n      'Parameter57.Name': _.get(opts, 'parameter57.name'),\n      'Parameter57.Value': _.get(opts, 'parameter57.value'),\n      'Parameter58.Name': _.get(opts, 'parameter58.name'),\n      'Parameter58.Value': _.get(opts, 'parameter58.value'),\n      'Parameter59.Name': _.get(opts, 'parameter59.name'),\n      'Parameter59.Value': _.get(opts, 'parameter59.value'),\n      'Parameter60.Name': _.get(opts, 'parameter60.name'),\n      'Parameter60.Value': _.get(opts, 'parameter60.value'),\n      'Parameter61.Name': _.get(opts, 'parameter61.name'),\n      'Parameter61.Value': _.get(opts, 'parameter61.value'),\n      'Parameter62.Name': _.get(opts, 'parameter62.name'),\n      'Parameter62.Value': _.get(opts, 'parameter62.value'),\n      'Parameter63.Name': _.get(opts, 'parameter63.name'),\n      'Parameter63.Value': _.get(opts, 'parameter63.value'),\n      'Parameter64.Name': _.get(opts, 'parameter64.name'),\n      'Parameter64.Value': _.get(opts, 'parameter64.value'),\n      'Parameter65.Name': _.get(opts, 'parameter65.name'),\n      'Parameter65.Value': _.get(opts, 'parameter65.value'),\n      'Parameter66.Name': _.get(opts, 'parameter66.name'),\n      'Parameter66.Value': _.get(opts, 'parameter66.value'),\n      'Parameter67.Name': _.get(opts, 'parameter67.name'),\n      'Parameter67.Value': _.get(opts, 'parameter67.value'),\n      'Parameter68.Name': _.get(opts, 'parameter68.name'),\n      'Parameter68.Value': _.get(opts, 'parameter68.value'),\n      'Parameter69.Name': _.get(opts, 'parameter69.name'),\n      'Parameter69.Value': _.get(opts, 'parameter69.value'),\n      'Parameter70.Name': _.get(opts, 'parameter70.name'),\n      'Parameter70.Value': _.get(opts, 'parameter70.value'),\n      'Parameter71.Name': _.get(opts, 'parameter71.name'),\n      'Parameter71.Value': _.get(opts, 'parameter71.value'),\n      'Parameter72.Name': _.get(opts, 'parameter72.name'),\n      'Parameter72.Value': _.get(opts, 'parameter72.value'),\n      'Parameter73.Name': _.get(opts, 'parameter73.name'),\n      'Parameter73.Value': _.get(opts, 'parameter73.value'),\n      'Parameter74.Name': _.get(opts, 'parameter74.name'),\n      'Parameter74.Value': _.get(opts, 'parameter74.value'),\n      'Parameter75.Name': _.get(opts, 'parameter75.name'),\n      'Parameter75.Value': _.get(opts, 'parameter75.value'),\n      'Parameter76.Name': _.get(opts, 'parameter76.name'),\n      'Parameter76.Value': _.get(opts, 'parameter76.value'),\n      'Parameter77.Name': _.get(opts, 'parameter77.name'),\n      'Parameter77.Value': _.get(opts, 'parameter77.value'),\n      'Parameter78.Name': _.get(opts, 'parameter78.name'),\n      'Parameter78.Value': _.get(opts, 'parameter78.value'),\n      'Parameter79.Name': _.get(opts, 'parameter79.name'),\n      'Parameter79.Value': _.get(opts, 'parameter79.value'),\n      'Parameter80.Name': _.get(opts, 'parameter80.name'),\n      'Parameter80.Value': _.get(opts, 'parameter80.value'),\n      'Parameter81.Name': _.get(opts, 'parameter81.name'),\n      'Parameter81.Value': _.get(opts, 'parameter81.value'),\n      'Parameter82.Name': _.get(opts, 'parameter82.name'),\n      'Parameter82.Value': _.get(opts, 'parameter82.value'),\n      'Parameter83.Name': _.get(opts, 'parameter83.name'),\n      'Parameter83.Value': _.get(opts, 'parameter83.value'),\n      'Parameter84.Name': _.get(opts, 'parameter84.name'),\n      'Parameter84.Value': _.get(opts, 'parameter84.value'),\n      'Parameter85.Name': _.get(opts, 'parameter85.name'),\n      'Parameter85.Value': _.get(opts, 'parameter85.value'),\n      'Parameter86.Name': _.get(opts, 'parameter86.name'),\n      'Parameter86.Value': _.get(opts, 'parameter86.value'),\n      'Parameter87.Name': _.get(opts, 'parameter87.name'),\n      'Parameter87.Value': _.get(opts, 'parameter87.value'),\n      'Parameter88.Name': _.get(opts, 'parameter88.name'),\n      'Parameter88.Value': _.get(opts, 'parameter88.value'),\n      'Parameter89.Name': _.get(opts, 'parameter89.name'),\n      'Parameter89.Value': _.get(opts, 'parameter89.value'),\n      'Parameter90.Name': _.get(opts, 'parameter90.name'),\n      'Parameter90.Value': _.get(opts, 'parameter90.value'),\n      'Parameter91.Name': _.get(opts, 'parameter91.name'),\n      'Parameter91.Value': _.get(opts, 'parameter91.value'),\n      'Parameter92.Name': _.get(opts, 'parameter92.name'),\n      'Parameter92.Value': _.get(opts, 'parameter92.value'),\n      'Parameter93.Name': _.get(opts, 'parameter93.name'),\n      'Parameter93.Value': _.get(opts, 'parameter93.value'),\n      'Parameter94.Name': _.get(opts, 'parameter94.name'),\n      'Parameter94.Value': _.get(opts, 'parameter94.value'),\n      'Parameter95.Name': _.get(opts, 'parameter95.name'),\n      'Parameter95.Value': _.get(opts, 'parameter95.value'),\n      'Parameter96.Name': _.get(opts, 'parameter96.name'),\n      'Parameter96.Value': _.get(opts, 'parameter96.value'),\n      'Parameter97.Name': _.get(opts, 'parameter97.name'),\n      'Parameter97.Value': _.get(opts, 'parameter97.value'),\n      'Parameter98.Name': _.get(opts, 'parameter98.name'),\n      'Parameter98.Value': _.get(opts, 'parameter98.value'),\n      'Parameter99.Name': _.get(opts, 'parameter99.name'),\n      'Parameter99.Value': _.get(opts, 'parameter99.value')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new StreamInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.callSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a stream\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.StreamList#\n   *\n   * @param {string} sid - The SID of the Stream resource, or the `name`\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext.StreamContext}\n   */\n  /* jshint ignore:end */\n  StreamListInstance.get = function get(sid) {\n    return new StreamContext(this._version, this._solution.accountSid, this._solution.callSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.CallContext.StreamList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  StreamListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  StreamListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return StreamListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StreamPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.StreamPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {StreamSolution} solution - Path solution\n *\n * @returns StreamPage\n */\n/* jshint ignore:end */\nStreamPage = function StreamPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(StreamPage.prototype, Page.prototype);\nStreamPage.prototype.constructor = StreamPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of StreamInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.StreamPage#\n *\n * @param {StreamPayload} payload - Payload response from the API\n *\n * @returns StreamInstance\n */\n/* jshint ignore:end */\nStreamPage.prototype.getInstance = function getInstance(payload) {\n  return new StreamInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.callSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.StreamPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStreamPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStreamPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StreamContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.StreamInstance\n *\n * @property {string} sid - The SID of the Stream resource.\n * @property {string} accountSid -\n *          The SID of the Account that created this resource\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {string} name - The name of this resource\n * @property {stream.status} status - The status - one of `stopped`, `in-progress`\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that this resource was last updated\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {StreamPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} callSid - The SID of the Call the resource is associated with\n * @param {sid_like} sid - The SID of the Stream resource, or the `name`\n */\n/* jshint ignore:end */\nStreamInstance = function StreamInstance(version, payload, accountSid, callSid,\n                                          sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.name = payload.name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(StreamInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new StreamContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.callSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a StreamInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.StreamInstance#\n *\n * @param {object} opts - Options for request\n * @param {stream.update_status} opts.status -\n *          The status. Must have the value `stopped`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StreamInstance\n */\n/* jshint ignore:end */\nStreamInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.StreamInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStreamInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStreamInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StreamContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext.StreamContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} callSid - The SID of the Call the resource is associated with\n * @param {sid_like} sid - The SID of the Stream resource, or the `name`\n */\n/* jshint ignore:end */\nStreamContext = function StreamContext(version, accountSid, callSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, callSid: callSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Calls/${callSid}/Streams/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * update a StreamInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.StreamContext#\n *\n * @param {object} opts - Options for request\n * @param {stream.update_status} opts.status -\n *          The status. Must have the value `stopped`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StreamInstance\n */\n/* jshint ignore:end */\nStreamContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new StreamInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.callSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext.StreamContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStreamContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nStreamContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  StreamList: StreamList,\n  StreamPage: StreamPage,\n  StreamInstance: StreamInstance,\n  StreamContext: StreamContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar EventList = require('./call/event').EventList;\nvar FeedbackList = require('./call/feedback').FeedbackList;\nvar FeedbackSummaryList = require('./call/feedbackSummary').FeedbackSummaryList;\nvar NotificationList = require('./call/notification').NotificationList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar PaymentList = require('./call/payment').PaymentList;\nvar RecordingList = require('./call/recording').RecordingList;\nvar SiprecList = require('./call/siprec').SiprecList;\nvar StreamList = require('./call/stream').StreamList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CallList;\nvar CallPage;\nvar CallInstance;\nvar CallContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CallList\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n */\n/* jshint ignore:end */\nCallList = function CallList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function calls\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext}\n   */\n  /* jshint ignore:end */\n  function CallListInstance(sid) {\n    return CallListInstance.get(sid);\n  }\n\n  CallListInstance._version = version;\n  // Path Solution\n  CallListInstance._solution = {accountSid: accountSid};\n  CallListInstance._uri = `/Accounts/${accountSid}/Calls.json`;\n\n  // Components\n  CallListInstance._feedbackSummaries = undefined;\n\n  /* jshint ignore:start */\n  /**\n   * create a CallInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.CallList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.to -\n   *          Phone number, SIP address, or client identifier to call\n   * @param {string} opts.from - Twilio number from which to originate the call\n   * @param {string} [opts.method] - HTTP method to use to fetch TwiML\n   * @param {string} [opts.fallbackUrl] - Fallback URL in case of error\n   * @param {string} [opts.fallbackMethod] - HTTP Method to use with fallback_url\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string|list} [opts.statusCallbackEvent] -\n   *          The call progress events that we send to the `status_callback` URL.\n   * @param {string} [opts.statusCallbackMethod] -\n   *          HTTP Method to use with status_callback\n   * @param {string} [opts.sendDigits] -\n   *          The digits to dial after connecting to the number\n   * @param {number} [opts.timeout] - Number of seconds to wait for an answer\n   * @param {boolean} [opts.record] - Whether to record the call\n   * @param {string} [opts.recordingChannels] -\n   *          The number of channels in the final recording\n   * @param {string} [opts.recordingStatusCallback] -\n   *          The URL that we call when the recording is available to be accessed\n   * @param {string} [opts.recordingStatusCallbackMethod] -\n   *          The HTTP method we should use when calling the `recording_status_callback` URL\n   * @param {string} [opts.sipAuthUsername] -\n   *          The username used to authenticate the caller making a SIP call\n   * @param {string} [opts.sipAuthPassword] -\n   *          The password required to authenticate the user account specified in `sip_auth_username`.\n   * @param {string} [opts.machineDetection] -\n   *          Enable machine detection or end of greeting detection\n   * @param {number} [opts.machineDetectionTimeout] -\n   *          Number of seconds to wait for machine detection\n   * @param {string|list} [opts.recordingStatusCallbackEvent] -\n   *          The recording status events that will trigger calls to the URL specified in `recording_status_callback`\n   * @param {string} [opts.trim] -\n   *          Set this parameter to control trimming of silence on the recording.\n   * @param {string} [opts.callerId] -\n   *          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`.\n   * @param {number} [opts.machineDetectionSpeechThreshold] -\n   *          Number of milliseconds for measuring stick for the length of the speech activity\n   * @param {number} [opts.machineDetectionSpeechEndThreshold] -\n   *          Number of milliseconds of silence after speech activity\n   * @param {number} [opts.machineDetectionSilenceTimeout] -\n   *          Number of milliseconds of initial silence\n   * @param {string} [opts.asyncAmd] - Enable asynchronous AMD\n   * @param {string} [opts.asyncAmdStatusCallback] -\n   *          The URL we should call to send amd status information to your application\n   * @param {string} [opts.asyncAmdStatusCallbackMethod] -\n   *          HTTP Method to use with async_amd_status_callback\n   * @param {string} [opts.byoc] - BYOC trunk SID (Beta)\n   * @param {string} [opts.callReason] - Reason for the call (Branded Calls Beta)\n   * @param {string} [opts.callToken] -\n   *          A token string needed to invoke a forwarded call with a CallerId recieved on a previous incoming call\n   * @param {string} [opts.recordingTrack] - Which track(s) to record\n   * @param {number} [opts.timeLimit] - The maximum duration of the call in seconds.\n   * @param {string} [opts.url] - The absolute URL that returns TwiML for this call\n   * @param {string} [opts.twiml] - TwiML instructions for the call\n   * @param {string} [opts.applicationSid] -\n   *          The SID of the Application resource that will handle the call\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CallInstance\n   */\n  /* jshint ignore:end */\n  CallListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['to'])) {\n      throw new Error('Required parameter \"opts[\\'to\\']\" missing.');\n    }\n    if (_.isUndefined(opts['from'])) {\n      throw new Error('Required parameter \"opts[\\'from\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'To': _.get(opts, 'to'),\n      'From': _.get(opts, 'from'),\n      'Url': _.get(opts, 'url'),\n      'Twiml': _.get(opts, 'twiml'),\n      'ApplicationSid': _.get(opts, 'applicationSid'),\n      'Method': _.get(opts, 'method'),\n      'FallbackUrl': _.get(opts, 'fallbackUrl'),\n      'FallbackMethod': _.get(opts, 'fallbackMethod'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackEvent': serialize.map(_.get(opts, 'statusCallbackEvent'), function(e) { return e; }),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'SendDigits': _.get(opts, 'sendDigits'),\n      'Timeout': _.get(opts, 'timeout'),\n      'Record': serialize.bool(_.get(opts, 'record')),\n      'RecordingChannels': _.get(opts, 'recordingChannels'),\n      'RecordingStatusCallback': _.get(opts, 'recordingStatusCallback'),\n      'RecordingStatusCallbackMethod': _.get(opts, 'recordingStatusCallbackMethod'),\n      'SipAuthUsername': _.get(opts, 'sipAuthUsername'),\n      'SipAuthPassword': _.get(opts, 'sipAuthPassword'),\n      'MachineDetection': _.get(opts, 'machineDetection'),\n      'MachineDetectionTimeout': _.get(opts, 'machineDetectionTimeout'),\n      'RecordingStatusCallbackEvent': serialize.map(_.get(opts, 'recordingStatusCallbackEvent'), function(e) { return e; }),\n      'Trim': _.get(opts, 'trim'),\n      'CallerId': _.get(opts, 'callerId'),\n      'MachineDetectionSpeechThreshold': _.get(opts, 'machineDetectionSpeechThreshold'),\n      'MachineDetectionSpeechEndThreshold': _.get(opts, 'machineDetectionSpeechEndThreshold'),\n      'MachineDetectionSilenceTimeout': _.get(opts, 'machineDetectionSilenceTimeout'),\n      'AsyncAmd': _.get(opts, 'asyncAmd'),\n      'AsyncAmdStatusCallback': _.get(opts, 'asyncAmdStatusCallback'),\n      'AsyncAmdStatusCallbackMethod': _.get(opts, 'asyncAmdStatusCallbackMethod'),\n      'Byoc': _.get(opts, 'byoc'),\n      'CallReason': _.get(opts, 'callReason'),\n      'CallToken': _.get(opts, 'callToken'),\n      'RecordingTrack': _.get(opts, 'recordingTrack'),\n      'TimeLimit': _.get(opts, 'timeLimit')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CallInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams CallInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.CallList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.to] -\n   *          Phone number or Client identifier of calls to include\n   * @param {string} [opts.from] -\n   *          Phone number or Client identifier to filter `from` on\n   * @param {string} [opts.parentCallSid] - Parent call SID to filter on\n   * @param {call.status} [opts.status] - The status of the resources to read\n   * @param {Date} [opts.startTimeBefore] -\n   *          Only include calls that started on this date\n   * @param {Date} [opts.startTime] - Only include calls that started on this date\n   * @param {Date} [opts.startTimeAfter] -\n   *          Only include calls that started on this date\n   * @param {Date} [opts.endTimeBefore] - Only include calls that ended on this date\n   * @param {Date} [opts.endTime] - Only include calls that ended on this date\n   * @param {Date} [opts.endTimeAfter] - Only include calls that ended on this date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CallListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CallInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.CallList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.to] -\n   *          Phone number or Client identifier of calls to include\n   * @param {string} [opts.from] -\n   *          Phone number or Client identifier to filter `from` on\n   * @param {string} [opts.parentCallSid] - Parent call SID to filter on\n   * @param {call.status} [opts.status] - The status of the resources to read\n   * @param {Date} [opts.startTimeBefore] -\n   *          Only include calls that started on this date\n   * @param {Date} [opts.startTime] - Only include calls that started on this date\n   * @param {Date} [opts.startTimeAfter] -\n   *          Only include calls that started on this date\n   * @param {Date} [opts.endTimeBefore] - Only include calls that ended on this date\n   * @param {Date} [opts.endTime] - Only include calls that ended on this date\n   * @param {Date} [opts.endTimeAfter] - Only include calls that ended on this date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CallListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CallInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.CallList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.to] -\n   *          Phone number or Client identifier of calls to include\n   * @param {string} [opts.from] -\n   *          Phone number or Client identifier to filter `from` on\n   * @param {string} [opts.parentCallSid] - Parent call SID to filter on\n   * @param {call.status} [opts.status] - The status of the resources to read\n   * @param {Date} [opts.startTimeBefore] -\n   *          Only include calls that started on this date\n   * @param {Date} [opts.startTime] - Only include calls that started on this date\n   * @param {Date} [opts.startTimeAfter] -\n   *          Only include calls that started on this date\n   * @param {Date} [opts.endTimeBefore] - Only include calls that ended on this date\n   * @param {Date} [opts.endTime] - Only include calls that ended on this date\n   * @param {Date} [opts.endTimeAfter] - Only include calls that ended on this date\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CallListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'To': _.get(opts, 'to'),\n      'From': _.get(opts, 'from'),\n      'ParentCallSid': _.get(opts, 'parentCallSid'),\n      'Status': _.get(opts, 'status'),\n      'StartTime<': serialize.iso8601DateTime(_.get(opts, 'startTimeBefore')),\n      'StartTime': serialize.iso8601DateTime(_.get(opts, 'startTime')),\n      'StartTime>': serialize.iso8601DateTime(_.get(opts, 'startTimeAfter')),\n      'EndTime<': serialize.iso8601DateTime(_.get(opts, 'endTimeBefore')),\n      'EndTime': serialize.iso8601DateTime(_.get(opts, 'endTime')),\n      'EndTime>': serialize.iso8601DateTime(_.get(opts, 'endTimeAfter')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CallPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CallInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.CallList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CallListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CallPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a call\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.CallList#\n   *\n   * @param {string} sid - The SID of the Call resource to fetch\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.CallContext}\n   */\n  /* jshint ignore:end */\n  CallListInstance.get = function get(sid) {\n    return new CallContext(this._version, this._solution.accountSid, sid);\n  };\n\n  Object.defineProperty(CallListInstance,\n    'feedbackSummaries', {\n      get: function feedbackSummaries() {\n        if (!this._feedbackSummaries) {\n          this._feedbackSummaries = new FeedbackSummaryList(this._version, this._solution.accountSid);\n        }\n\n        return this._feedbackSummaries;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.CallList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CallListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CallListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CallListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CallSolution} solution - Path solution\n *\n * @returns CallPage\n */\n/* jshint ignore:end */\nCallPage = function CallPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CallPage.prototype, Page.prototype);\nCallPage.prototype.constructor = CallPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CallInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.CallPage#\n *\n * @param {CallPayload} payload - Payload response from the API\n *\n * @returns CallInstance\n */\n/* jshint ignore:end */\nCallPage.prototype.getInstance = function getInstance(payload) {\n  return new CallInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCallPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallInstance\n *\n * @property {string} sid - The unique string that identifies this resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that this resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that this resource was last updated\n * @property {string} parentCallSid -\n *          The SID that identifies the call that created this leg.\n * @property {string} accountSid -\n *          The SID of the Account that created this resource\n * @property {string} to -\n *          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`.\n * @property {string} toFormatted -\n *          The phone number, SIP address or Client identifier that received this call. Formatted for display.\n * @property {string} from -\n *          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`.\n * @property {string} fromFormatted -\n *          The calling phone number, SIP address, or Client identifier formatted for display.\n * @property {string} phoneNumberSid -\n *          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.\n * @property {call.status} status - The status of this call.\n * @property {Date} startTime -\n *          The start time of the call. Null if the call has not yet been dialed.\n * @property {Date} endTime -\n *          The end time of the call. Null if the call did not complete successfully.\n * @property {string} duration - The length of the call in seconds.\n * @property {string} price -\n *          The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.\n * @property {string} priceUnit - The currency in which `Price` is measured.\n * @property {string} direction -\n *          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.\n * @property {string} answeredBy -\n *          Either `human` or `machine` if this call was initiated with answering machine detection. Empty otherwise.\n * @property {string} apiVersion - The API Version used to create the call\n * @property {string} forwardedFrom -\n *          The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.\n * @property {string} groupSid -\n *          The Group SID associated with this call. If no Group is associated with the call, the field is empty.\n * @property {string} callerName -\n *          The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.\n * @property {string} queueTime -\n *          The wait time in milliseconds before the call is placed.\n * @property {string} trunkSid -\n *          The (optional) unique identifier of the trunk resource that was used for this call.\n * @property {string} uri -\n *          The URI of this resource, relative to `https://api.twilio.com`\n * @property {string} subresourceUris -\n *          A list of related subresources identified by their relative URIs\n *\n * @param {V2010} version - Version of the resource\n * @param {CallPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} sid - The SID of the Call resource to fetch\n */\n/* jshint ignore:end */\nCallInstance = function CallInstance(version, payload, accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.parentCallSid = payload.parent_call_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.toFormatted = payload.to_formatted; // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.fromFormatted = payload.from_formatted; // jshint ignore:line\n  this.phoneNumberSid = payload.phone_number_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.startTime = deserialize.rfc2822DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.rfc2822DateTime(payload.end_time); // jshint ignore:line\n  this.duration = payload.duration; // jshint ignore:line\n  this.price = payload.price; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.direction = payload.direction; // jshint ignore:line\n  this.answeredBy = payload.answered_by; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.forwardedFrom = payload.forwarded_from; // jshint ignore:line\n  this.groupSid = payload.group_sid; // jshint ignore:line\n  this.callerName = payload.caller_name; // jshint ignore:line\n  this.queueTime = payload.queue_time; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(CallInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CallContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a CallInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallInstance\n */\n/* jshint ignore:end */\nCallInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CallInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallInstance\n */\n/* jshint ignore:end */\nCallInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CallInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.url] - The absolute URL that returns TwiML for this call\n * @param {string} [opts.method] - HTTP method to use to fetch TwiML\n * @param {call.update_status} [opts.status] -\n *          The new status to update the call with.\n * @param {string} [opts.fallbackUrl] - Fallback URL in case of error\n * @param {string} [opts.fallbackMethod] - HTTP Method to use with fallback_url\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          HTTP Method to use to call status_callback\n * @param {string} [opts.twiml] - TwiML instructions for the call\n * @param {number} [opts.timeLimit] - The maximum duration of the call in seconds.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallInstance\n */\n/* jshint ignore:end */\nCallInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the recordings\n *\n * @function recordings\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.CallContext.RecordingList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.recordings = function recordings() {\n  return this._proxy.recordings;\n};\n\n/* jshint ignore:start */\n/**\n * Access the notifications\n *\n * @function notifications\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.CallContext.NotificationList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.notifications = function notifications() {\n  return this._proxy.notifications;\n};\n\n/* jshint ignore:start */\n/**\n * Access the feedback\n *\n * @function feedback\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.CallContext.FeedbackList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.feedback = function feedback() {\n  return this._proxy.feedback;\n};\n\n/* jshint ignore:start */\n/**\n * Access the events\n *\n * @function events\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.CallContext.EventList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.events = function events() {\n  return this._proxy.events;\n};\n\n/* jshint ignore:start */\n/**\n * Access the payments\n *\n * @function payments\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.CallContext.PaymentList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.payments = function payments() {\n  return this._proxy.payments;\n};\n\n/* jshint ignore:start */\n/**\n * Access the siprec\n *\n * @function siprec\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.CallContext.SiprecList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.siprec = function siprec() {\n  return this._proxy.siprec;\n};\n\n/* jshint ignore:start */\n/**\n * Access the streams\n *\n * @function streams\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.CallContext.StreamList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.streams = function streams() {\n  return this._proxy.streams;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCallInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.CallContext\n *\n * @property {Twilio.Api.V2010.AccountContext.CallContext.RecordingList} recordings -\n *          recordings resource\n * @property {Twilio.Api.V2010.AccountContext.CallContext.NotificationList} notifications -\n *          notifications resource\n * @property {Twilio.Api.V2010.AccountContext.CallContext.FeedbackList} feedback -\n *          feedback resource\n * @property {Twilio.Api.V2010.AccountContext.CallContext.EventList} events -\n *          events resource\n * @property {Twilio.Api.V2010.AccountContext.CallContext.PaymentList} payments -\n *          payments resource\n * @property {Twilio.Api.V2010.AccountContext.CallContext.SiprecList} siprec -\n *          siprec resource\n * @property {Twilio.Api.V2010.AccountContext.CallContext.StreamList} streams -\n *          streams resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource(s) to fetch\n * @param {sid} sid - The SID of the Call resource to fetch\n */\n/* jshint ignore:end */\nCallContext = function CallContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Calls/${sid}.json`;\n\n  // Dependents\n  this._recordings = undefined;\n  this._notifications = undefined;\n  this._feedback = undefined;\n  this._events = undefined;\n  this._payments = undefined;\n  this._siprec = undefined;\n  this._streams = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CallInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallInstance\n */\n/* jshint ignore:end */\nCallContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CallInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallInstance\n */\n/* jshint ignore:end */\nCallContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CallInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CallInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.url] - The absolute URL that returns TwiML for this call\n * @param {string} [opts.method] - HTTP method to use to fetch TwiML\n * @param {call.update_status} [opts.status] -\n *          The new status to update the call with.\n * @param {string} [opts.fallbackUrl] - Fallback URL in case of error\n * @param {string} [opts.fallbackMethod] - HTTP Method to use with fallback_url\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          HTTP Method to use to call status_callback\n * @param {string} [opts.twiml] - TwiML instructions for the call\n * @param {number} [opts.timeLimit] - The maximum duration of the call in seconds.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallInstance\n */\n/* jshint ignore:end */\nCallContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Url': _.get(opts, 'url'),\n    'Method': _.get(opts, 'method'),\n    'Status': _.get(opts, 'status'),\n    'FallbackUrl': _.get(opts, 'fallbackUrl'),\n    'FallbackMethod': _.get(opts, 'fallbackMethod'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n    'Twiml': _.get(opts, 'twiml'),\n    'TimeLimit': _.get(opts, 'timeLimit')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CallInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(CallContext.prototype,\n  'recordings', {\n    get: function() {\n      if (!this._recordings) {\n        this._recordings = new RecordingList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._recordings;\n    }\n});\n\nObject.defineProperty(CallContext.prototype,\n  'notifications', {\n    get: function() {\n      if (!this._notifications) {\n        this._notifications = new NotificationList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n      return this._notifications;\n    }\n});\n\nObject.defineProperty(CallContext.prototype,\n  'feedback', {\n    get: function() {\n      if (!this._feedback) {\n        this._feedback = new FeedbackList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._feedback;\n    }\n});\n\nObject.defineProperty(CallContext.prototype,\n  'events', {\n    get: function() {\n      if (!this._events) {\n        this._events = new EventList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._events;\n    }\n});\n\nObject.defineProperty(CallContext.prototype,\n  'payments', {\n    get: function() {\n      if (!this._payments) {\n        this._payments = new PaymentList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._payments;\n    }\n});\n\nObject.defineProperty(CallContext.prototype,\n  'siprec', {\n    get: function() {\n      if (!this._siprec) {\n        this._siprec = new SiprecList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._siprec;\n    }\n});\n\nObject.defineProperty(CallContext.prototype,\n  'streams', {\n    get: function() {\n      if (!this._streams) {\n        this._streams = new StreamList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._streams;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.CallContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCallContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CallList: CallList,\n  CallPage: CallPage,\n  CallInstance: CallInstance,\n  CallContext: CallContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ParticipantList;\nvar ParticipantPage;\nvar ParticipantInstance;\nvar ParticipantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantList\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} conferenceSid - The SID of the conference the participant is in\n */\n/* jshint ignore:end */\nParticipantList = function ParticipantList(version, accountSid, conferenceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function participants\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  function ParticipantListInstance(sid) {\n    return ParticipantListInstance.get(sid);\n  }\n\n  ParticipantListInstance._version = version;\n  // Path Solution\n  ParticipantListInstance._solution = {accountSid: accountSid, conferenceSid: conferenceSid};\n  ParticipantListInstance._uri = `/Accounts/${accountSid}/Conferences/${conferenceSid}/Participants.json`;\n  /* jshint ignore:start */\n  /**\n   * create a ParticipantInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.from -\n   *          The phone number, Client identifier, or username portion of SIP address that made this call.\n   * @param {string} opts.to -\n   *          The phone number, SIP address or Client identifier that received this call.\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method we should use to call `status_callback`\n   * @param {string|list} [opts.statusCallbackEvent] -\n   *          Set state change events that will trigger a callback\n   * @param {string} [opts.label] - The label of this participant\n   * @param {number} [opts.timeout] -\n   *          he number of seconds that we should wait for an answer\n   * @param {boolean} [opts.record] -\n   *          Whether to record the participant and their conferences\n   * @param {boolean} [opts.muted] - Whether to mute the agent\n   * @param {string} [opts.beep] -\n   *          Whether to play a notification beep to the conference when the participant joins\n   * @param {boolean} [opts.startConferenceOnEnter] -\n   *          Whether the conference starts when the participant joins the conference\n   * @param {boolean} [opts.endConferenceOnExit] -\n   *          Whether to end the conference when the participant leaves\n   * @param {string} [opts.waitUrl] - URL that hosts pre-conference hold music\n   * @param {string} [opts.waitMethod] -\n   *          The HTTP method we should use to call `wait_url`\n   * @param {boolean} [opts.earlyMedia] -\n   *          Whether agents can hear the state of the outbound call\n   * @param {number} [opts.maxParticipants] -\n   *          The maximum number of agent conference participants\n   * @param {string} [opts.conferenceRecord] -\n   *          Whether to record the conference the participant is joining\n   * @param {string} [opts.conferenceTrim] -\n   *          Whether to trim leading and trailing silence from your recorded conference audio files\n   * @param {string} [opts.conferenceStatusCallback] -\n   *          The callback URL for conference events\n   * @param {string} [opts.conferenceStatusCallbackMethod] -\n   *          HTTP method for requesting `conference_status_callback` URL\n   * @param {string|list} [opts.conferenceStatusCallbackEvent] -\n   *          The conference state changes that should generate a call to `conference_status_callback`\n   * @param {string} [opts.recordingChannels] -\n   *          Specify `mono` or `dual` recording channels\n   * @param {string} [opts.recordingStatusCallback] -\n   *          The URL that we should call using the `recording_status_callback_method` when the recording status changes\n   * @param {string} [opts.recordingStatusCallbackMethod] -\n   *          The HTTP method we should use when we call `recording_status_callback`\n   * @param {string} [opts.sipAuthUsername] -\n   *          The SIP username used for authentication\n   * @param {string} [opts.sipAuthPassword] - The SIP password for authentication\n   * @param {string} [opts.region] -\n   *          The region where we should mix the conference audio\n   * @param {string} [opts.conferenceRecordingStatusCallback] -\n   *          The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available\n   * @param {string} [opts.conferenceRecordingStatusCallbackMethod] -\n   *          The HTTP method we should use to call `conference_recording_status_callback`\n   * @param {string|list} [opts.recordingStatusCallbackEvent] -\n   *          The recording state changes that should generate a call to `recording_status_callback`\n   * @param {string|list} [opts.conferenceRecordingStatusCallbackEvent] -\n   *          The conference recording state changes that should generate a call to `conference_recording_status_callback`\n   * @param {boolean} [opts.coaching] - Indicates if the participant changed to coach\n   * @param {string} [opts.callSidToCoach] -\n   *          The SID of the participant who is being `coached`\n   * @param {string} [opts.jitterBufferSize] -\n   *          Jitter Buffer size for the connecting participant\n   * @param {string} [opts.byoc] - BYOC trunk SID (Beta)\n   * @param {string} [opts.callerId] -\n   *          The phone number, Client identifier, or username portion of SIP address that made this call.\n   * @param {string} [opts.callReason] - Reason for the call (Branded Calls Beta)\n   * @param {string} [opts.recordingTrack] - The track(s) to record\n   * @param {number} [opts.timeLimit] - The maximum duration of the call in seconds.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ParticipantInstance\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['from'])) {\n      throw new Error('Required parameter \"opts[\\'from\\']\" missing.');\n    }\n    if (_.isUndefined(opts['to'])) {\n      throw new Error('Required parameter \"opts[\\'to\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'From': _.get(opts, 'from'),\n      'To': _.get(opts, 'to'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'StatusCallbackEvent': serialize.map(_.get(opts, 'statusCallbackEvent'), function(e) { return e; }),\n      'Label': _.get(opts, 'label'),\n      'Timeout': _.get(opts, 'timeout'),\n      'Record': serialize.bool(_.get(opts, 'record')),\n      'Muted': serialize.bool(_.get(opts, 'muted')),\n      'Beep': _.get(opts, 'beep'),\n      'StartConferenceOnEnter': serialize.bool(_.get(opts, 'startConferenceOnEnter')),\n      'EndConferenceOnExit': serialize.bool(_.get(opts, 'endConferenceOnExit')),\n      'WaitUrl': _.get(opts, 'waitUrl'),\n      'WaitMethod': _.get(opts, 'waitMethod'),\n      'EarlyMedia': serialize.bool(_.get(opts, 'earlyMedia')),\n      'MaxParticipants': _.get(opts, 'maxParticipants'),\n      'ConferenceRecord': _.get(opts, 'conferenceRecord'),\n      'ConferenceTrim': _.get(opts, 'conferenceTrim'),\n      'ConferenceStatusCallback': _.get(opts, 'conferenceStatusCallback'),\n      'ConferenceStatusCallbackMethod': _.get(opts, 'conferenceStatusCallbackMethod'),\n      'ConferenceStatusCallbackEvent': serialize.map(_.get(opts, 'conferenceStatusCallbackEvent'), function(e) { return e; }),\n      'RecordingChannels': _.get(opts, 'recordingChannels'),\n      'RecordingStatusCallback': _.get(opts, 'recordingStatusCallback'),\n      'RecordingStatusCallbackMethod': _.get(opts, 'recordingStatusCallbackMethod'),\n      'SipAuthUsername': _.get(opts, 'sipAuthUsername'),\n      'SipAuthPassword': _.get(opts, 'sipAuthPassword'),\n      'Region': _.get(opts, 'region'),\n      'ConferenceRecordingStatusCallback': _.get(opts, 'conferenceRecordingStatusCallback'),\n      'ConferenceRecordingStatusCallbackMethod': _.get(opts, 'conferenceRecordingStatusCallbackMethod'),\n      'RecordingStatusCallbackEvent': serialize.map(_.get(opts, 'recordingStatusCallbackEvent'), function(e) { return e; }),\n      'ConferenceRecordingStatusCallbackEvent': serialize.map(_.get(opts, 'conferenceRecordingStatusCallbackEvent'), function(e) { return e; }),\n      'Coaching': serialize.bool(_.get(opts, 'coaching')),\n      'CallSidToCoach': _.get(opts, 'callSidToCoach'),\n      'JitterBufferSize': _.get(opts, 'jitterBufferSize'),\n      'Byoc': _.get(opts, 'byoc'),\n      'CallerId': _.get(opts, 'callerId'),\n      'CallReason': _.get(opts, 'callReason'),\n      'RecordingTrack': _.get(opts, 'recordingTrack'),\n      'TimeLimit': _.get(opts, 'timeLimit')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.conferenceSid,\n        this._solution.callSid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ParticipantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.muted] -\n   *          Whether to return only participants that are muted\n   * @param {boolean} [opts.hold] -\n   *          Whether to return only participants that are on hold\n   * @param {boolean} [opts.coaching] -\n   *          Whether to return only participants who are coaching another call\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ParticipantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.muted] -\n   *          Whether to return only participants that are muted\n   * @param {boolean} [opts.hold] -\n   *          Whether to return only participants that are on hold\n   * @param {boolean} [opts.coaching] -\n   *          Whether to return only participants who are coaching another call\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.muted] -\n   *          Whether to return only participants that are muted\n   * @param {boolean} [opts.hold] -\n   *          Whether to return only participants that are on hold\n   * @param {boolean} [opts.coaching] -\n   *          Whether to return only participants who are coaching another call\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Muted': serialize.bool(_.get(opts, 'muted')),\n      'Hold': serialize.bool(_.get(opts, 'hold')),\n      'Coaching': serialize.bool(_.get(opts, 'coaching')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a participant\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList#\n   *\n   * @param {string} callSid -\n   *          The Call SID or URL encoded label of the participant to fetch\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.get = function get(callSid) {\n    return new ParticipantContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.conferenceSid,\n      callSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ParticipantListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ParticipantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ParticipantSolution} solution - Path solution\n *\n * @returns ParticipantPage\n */\n/* jshint ignore:end */\nParticipantPage = function ParticipantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ParticipantPage.prototype, Page.prototype);\nParticipantPage.prototype.constructor = ParticipantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ParticipantInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantPage#\n *\n * @param {ParticipantPayload} payload - Payload response from the API\n *\n * @returns ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantPage.prototype.getInstance = function getInstance(payload) {\n  return new ParticipantInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.conferenceSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {string} label - The label of this participant\n * @property {string} callSidToCoach -\n *          The SID of the participant who is being `coached`\n * @property {boolean} coaching - Indicates if the participant changed to coach\n * @property {string} conferenceSid -\n *          The SID of the conference the participant is in\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {boolean} endConferenceOnExit -\n *          Whether the conference ends when the participant leaves\n * @property {boolean} muted - Whether the participant is muted\n * @property {boolean} hold - Whether the participant is on hold\n * @property {boolean} startConferenceOnEnter -\n *          Whether the conference starts when the participant joins the conference\n * @property {participant.status} status -\n *          The status of the participant's call in a session\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {ParticipantPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} conferenceSid - The SID of the conference the participant is in\n * @param {sid_like} callSid -\n *          The Call SID or URL encoded label of the participant to fetch\n */\n/* jshint ignore:end */\nParticipantInstance = function ParticipantInstance(version, payload, accountSid,\n                                                    conferenceSid, callSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.label = payload.label; // jshint ignore:line\n  this.callSidToCoach = payload.call_sid_to_coach; // jshint ignore:line\n  this.coaching = payload.coaching; // jshint ignore:line\n  this.conferenceSid = payload.conference_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.endConferenceOnExit = payload.end_conference_on_exit; // jshint ignore:line\n  this.muted = payload.muted; // jshint ignore:line\n  this.hold = payload.hold; // jshint ignore:line\n  this.startConferenceOnEnter = payload.start_conference_on_enter; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    accountSid: accountSid,\n    conferenceSid: conferenceSid,\n    callSid: callSid || this.callSid,\n  };\n};\n\nObject.defineProperty(ParticipantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ParticipantContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.conferenceSid,\n          this._solution.callSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ParticipantInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.muted] - Whether the participant should be muted\n * @param {boolean} [opts.hold] - Whether the participant should be on hold\n * @param {string} [opts.holdUrl] -\n *          The URL we call using the `hold_method` for  music that plays when the participant is on hold\n * @param {string} [opts.holdMethod] -\n *          The HTTP method we should use to call hold_url\n * @param {string} [opts.announceUrl] -\n *          The URL we call using the `announce_method` for an announcement to the participant\n * @param {string} [opts.announceMethod] -\n *          The HTTP method we should use to call announce_url\n * @param {string} [opts.waitUrl] - URL that hosts pre-conference hold music\n * @param {string} [opts.waitMethod] -\n *          The HTTP method we should use to call `wait_url`\n * @param {boolean} [opts.beepOnExit] -\n *          Whether to play a notification beep to the conference when the participant exit\n * @param {boolean} [opts.endConferenceOnExit] -\n *          Whether to end the conference when the participant leaves\n * @param {boolean} [opts.coaching] - Indicates if the participant changed to coach\n * @param {string} [opts.callSidToCoach] -\n *          The SID of the participant who is being `coached`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ParticipantInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} conferenceSid -\n *          The SID of the conference with the participant to fetch\n * @param {sid_like} callSid -\n *          The Call SID or URL encoded label of the participant to fetch\n */\n/* jshint ignore:end */\nParticipantContext = function ParticipantContext(version, accountSid,\n                                                  conferenceSid, callSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, conferenceSid: conferenceSid, callSid: callSid, };\n  this._uri = `/Accounts/${accountSid}/Conferences/${conferenceSid}/Participants/${callSid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.conferenceSid,\n      this._solution.callSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ParticipantInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.muted] - Whether the participant should be muted\n * @param {boolean} [opts.hold] - Whether the participant should be on hold\n * @param {string} [opts.holdUrl] -\n *          The URL we call using the `hold_method` for  music that plays when the participant is on hold\n * @param {string} [opts.holdMethod] -\n *          The HTTP method we should use to call hold_url\n * @param {string} [opts.announceUrl] -\n *          The URL we call using the `announce_method` for an announcement to the participant\n * @param {string} [opts.announceMethod] -\n *          The HTTP method we should use to call announce_url\n * @param {string} [opts.waitUrl] - URL that hosts pre-conference hold music\n * @param {string} [opts.waitMethod] -\n *          The HTTP method we should use to call `wait_url`\n * @param {boolean} [opts.beepOnExit] -\n *          Whether to play a notification beep to the conference when the participant exit\n * @param {boolean} [opts.endConferenceOnExit] -\n *          Whether to end the conference when the participant leaves\n * @param {boolean} [opts.coaching] - Indicates if the participant changed to coach\n * @param {string} [opts.callSidToCoach] -\n *          The SID of the participant who is being `coached`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Muted': serialize.bool(_.get(opts, 'muted')),\n    'Hold': serialize.bool(_.get(opts, 'hold')),\n    'HoldUrl': _.get(opts, 'holdUrl'),\n    'HoldMethod': _.get(opts, 'holdMethod'),\n    'AnnounceUrl': _.get(opts, 'announceUrl'),\n    'AnnounceMethod': _.get(opts, 'announceMethod'),\n    'WaitUrl': _.get(opts, 'waitUrl'),\n    'WaitMethod': _.get(opts, 'waitMethod'),\n    'BeepOnExit': serialize.bool(_.get(opts, 'beepOnExit')),\n    'EndConferenceOnExit': serialize.bool(_.get(opts, 'endConferenceOnExit')),\n    'Coaching': serialize.bool(_.get(opts, 'coaching')),\n    'CallSidToCoach': _.get(opts, 'callSidToCoach')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.conferenceSid,\n      this._solution.callSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ParticipantInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nParticipantContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ParticipantList: ParticipantList,\n  ParticipantPage: ParticipantPage,\n  ParticipantInstance: ParticipantInstance,\n  ParticipantContext: ParticipantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar RecordingList;\nvar RecordingPage;\nvar RecordingInstance;\nvar RecordingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingList\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} conferenceSid -\n *          The Conference SID that identifies the conference associated with the recording\n */\n/* jshint ignore:end */\nRecordingList = function RecordingList(version, accountSid, conferenceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function recordings\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingContext}\n   */\n  /* jshint ignore:end */\n  function RecordingListInstance(sid) {\n    return RecordingListInstance.get(sid);\n  }\n\n  RecordingListInstance._version = version;\n  // Path Solution\n  RecordingListInstance._solution = {accountSid: accountSid, conferenceSid: conferenceSid};\n  RecordingListInstance._uri = `/Accounts/${accountSid}/Conferences/${conferenceSid}/Recordings.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams RecordingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RecordingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DateCreated<': serialize.iso8601Date(_.get(opts, 'dateCreatedBefore')),\n      'DateCreated': serialize.iso8601Date(_.get(opts, 'dateCreated')),\n      'DateCreated>': serialize.iso8601Date(_.get(opts, 'dateCreatedAfter')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a recording\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingContext}\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.get = function get(sid) {\n    return new RecordingContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.conferenceSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RecordingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RecordingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RecordingSolution} solution - Path solution\n *\n * @returns RecordingPage\n */\n/* jshint ignore:end */\nRecordingPage = function RecordingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RecordingPage.prototype, Page.prototype);\nRecordingPage.prototype.constructor = RecordingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RecordingInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingPage#\n *\n * @param {RecordingPayload} payload - Payload response from the API\n *\n * @returns RecordingInstance\n */\n/* jshint ignore:end */\nRecordingPage.prototype.getInstance = function getInstance(payload) {\n  return new RecordingInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.conferenceSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} apiVersion - The API version used to create the recording\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {string} conferenceSid -\n *          The Conference SID that identifies the conference associated with the recording\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {Date} startTime -\n *          The start time of the recording, given in RFC 2822 format\n * @property {string} duration - The length of the recording in seconds\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} price - The one-time cost of creating the recording.\n * @property {string} priceUnit - The currency used in the price property.\n * @property {recording.status} status - The status of the recording\n * @property {number} channels -\n *          The number of channels in the final recording file as an integer\n * @property {recording.source} source - How the recording was created\n * @property {number} errorCode -\n *          More information about why the recording is missing, if status is `absent`.\n * @property {object} encryptionDetails - How to decrypt the recording.\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {RecordingPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} conferenceSid -\n *          The Conference SID that identifies the conference associated with the recording\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRecordingInstance = function RecordingInstance(version, payload, accountSid,\n                                                conferenceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.conferenceSid = payload.conference_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.startTime = deserialize.rfc2822DateTime(payload.start_time); // jshint ignore:line\n  this.duration = payload.duration; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.price = payload.price; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.channels = deserialize.integer(payload.channels); // jshint ignore:line\n  this.source = payload.source; // jshint ignore:line\n  this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line\n  this.encryptionDetails = payload.encryption_details; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, conferenceSid: conferenceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RecordingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RecordingContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.conferenceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a RecordingInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingInstance#\n *\n * @param {object} opts - Options for request\n * @param {recording.status} opts.status - The new status of the recording\n * @param {string} [opts.pauseBehavior] - Whether to record during a pause\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RecordingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} conferenceSid - Fetch by unique Conference SID for the recording\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRecordingContext = function RecordingContext(version, accountSid, conferenceSid,\n                                              sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, conferenceSid: conferenceSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Conferences/${conferenceSid}/Recordings/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * update a RecordingInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingContext#\n *\n * @param {object} opts - Options for request\n * @param {recording.status} opts.status - The new status of the recording\n * @param {string} [opts.pauseBehavior] - Whether to record during a pause\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Status': _.get(opts, 'status'),\n    'PauseBehavior': _.get(opts, 'pauseBehavior')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.conferenceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.conferenceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RecordingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRecordingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RecordingList: RecordingList,\n  RecordingPage: RecordingPage,\n  RecordingInstance: RecordingInstance,\n  RecordingContext: RecordingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar ParticipantList = require('./conference/participant').ParticipantList;\nvar RecordingList = require('./conference/recording').RecordingList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ConferenceList;\nvar ConferencePage;\nvar ConferenceInstance;\nvar ConferenceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceList\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n */\n/* jshint ignore:end */\nConferenceList = function ConferenceList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function conferences\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ConferenceContext}\n   */\n  /* jshint ignore:end */\n  function ConferenceListInstance(sid) {\n    return ConferenceListInstance.get(sid);\n  }\n\n  ConferenceListInstance._version = version;\n  // Path Solution\n  ConferenceListInstance._solution = {accountSid: accountSid};\n  ConferenceListInstance._uri = `/Accounts/${accountSid}/Conferences.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams ConferenceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateUpdatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateUpdated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateUpdatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Conference resources to read\n   * @param {conference.status} [opts.status] - The status of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ConferenceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateUpdatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateUpdated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateUpdatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Conference resources to read\n   * @param {conference.status} [opts.status] - The status of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ConferenceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateUpdatedBefore] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateUpdated] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {Date} [opts.dateUpdatedAfter] -\n   *          The `YYYY-MM-DD` value of the resources to read\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Conference resources to read\n   * @param {conference.status} [opts.status] - The status of the resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DateCreated<': serialize.iso8601Date(_.get(opts, 'dateCreatedBefore')),\n      'DateCreated': serialize.iso8601Date(_.get(opts, 'dateCreated')),\n      'DateCreated>': serialize.iso8601Date(_.get(opts, 'dateCreatedAfter')),\n      'DateUpdated<': serialize.iso8601Date(_.get(opts, 'dateUpdatedBefore')),\n      'DateUpdated': serialize.iso8601Date(_.get(opts, 'dateUpdated')),\n      'DateUpdated>': serialize.iso8601Date(_.get(opts, 'dateUpdatedAfter')),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Status': _.get(opts, 'status'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConferencePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ConferenceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConferencePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a conference\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceList#\n   *\n   * @param {string} sid - The unique string that identifies this resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ConferenceContext}\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.get = function get(sid) {\n    return new ConferenceContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.ConferenceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConferenceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConferenceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferencePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferencePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConferenceSolution} solution - Path solution\n *\n * @returns ConferencePage\n */\n/* jshint ignore:end */\nConferencePage = function ConferencePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConferencePage.prototype, Page.prototype);\nConferencePage.prototype.constructor = ConferencePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConferenceInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.ConferencePage#\n *\n * @param {ConferencePayload} payload - Payload response from the API\n *\n * @returns ConferenceInstance\n */\n/* jshint ignore:end */\nConferencePage.prototype.getInstance = function getInstance(payload) {\n  return new ConferenceInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConferencePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConferencePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConferencePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that created this resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that this resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that this resource was last updated\n * @property {string} apiVersion - The API version used to create this conference\n * @property {string} friendlyName -\n *          A string that you assigned to describe this conference room\n * @property {string} region -\n *          A string that represents the Twilio Region where the conference was mixed\n * @property {string} sid - The unique string that identifies this resource\n * @property {conference.status} status - The status of this conference\n * @property {string} uri -\n *          The URI of this resource, relative to `https://api.twilio.com`\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {conference.reason_conference_ended} reasonConferenceEnded -\n *          The reason why a conference ended.\n * @property {string} callSidEndingConference -\n *          The call SID that caused the conference to end\n *\n * @param {V2010} version - Version of the resource\n * @param {ConferencePayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nConferenceInstance = function ConferenceInstance(version, payload, accountSid,\n                                                  sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.region = payload.region; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.reasonConferenceEnded = payload.reason_conference_ended; // jshint ignore:line\n  this.callSidEndingConference = payload.call_sid_ending_conference; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ConferenceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConferenceContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ConferenceInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConferenceInstance\n */\n/* jshint ignore:end */\nConferenceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ConferenceInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {conference.update_status} [opts.status] - The new status of the resource\n * @param {string} [opts.announceUrl] -\n *          The URL we should call to announce something into the conference\n * @param {string} [opts.announceMethod] - he HTTP method used to call announce_url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConferenceInstance\n */\n/* jshint ignore:end */\nConferenceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the participants\n *\n * @function participants\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList}\n */\n/* jshint ignore:end */\nConferenceInstance.prototype.participants = function participants() {\n  return this._proxy.participants;\n};\n\n/* jshint ignore:start */\n/**\n * Access the recordings\n *\n * @function recordings\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingList}\n */\n/* jshint ignore:end */\nConferenceInstance.prototype.recordings = function recordings() {\n  return this._proxy.recordings;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConferenceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConferenceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConferenceContext\n *\n * @property {Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList} participants -\n *          participants resource\n * @property {Twilio.Api.V2010.AccountContext.ConferenceContext.RecordingList} recordings -\n *          recordings resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource(s) to fetch\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nConferenceContext = function ConferenceContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Conferences/${sid}.json`;\n\n  // Dependents\n  this._participants = undefined;\n  this._recordings = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConferenceInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConferenceInstance\n */\n/* jshint ignore:end */\nConferenceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConferenceInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ConferenceInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {conference.update_status} [opts.status] - The new status of the resource\n * @param {string} [opts.announceUrl] -\n *          The URL we should call to announce something into the conference\n * @param {string} [opts.announceMethod] - he HTTP method used to call announce_url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConferenceInstance\n */\n/* jshint ignore:end */\nConferenceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Status': _.get(opts, 'status'),\n    'AnnounceUrl': _.get(opts, 'announceUrl'),\n    'AnnounceMethod': _.get(opts, 'announceMethod')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConferenceInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ConferenceContext.prototype,\n  'participants', {\n    get: function() {\n      if (!this._participants) {\n        this._participants = new ParticipantList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n      return this._participants;\n    }\n});\n\nObject.defineProperty(ConferenceContext.prototype,\n  'recordings', {\n    get: function() {\n      if (!this._recordings) {\n        this._recordings = new RecordingList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._recordings;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConferenceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConferenceContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConferenceList: ConferenceList,\n  ConferencePage: ConferencePage,\n  ConferenceInstance: ConferenceInstance,\n  ConferenceContext: ConferenceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ConnectAppList;\nvar ConnectAppPage;\nvar ConnectAppInstance;\nvar ConnectAppContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectAppList\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConnectAppList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nConnectAppList = function ConnectAppList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function connectApps\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ConnectAppContext}\n   */\n  /* jshint ignore:end */\n  function ConnectAppListInstance(sid) {\n    return ConnectAppListInstance.get(sid);\n  }\n\n  ConnectAppListInstance._version = version;\n  // Path Solution\n  ConnectAppListInstance._solution = {accountSid: accountSid};\n  ConnectAppListInstance._uri = `/Accounts/${accountSid}/ConnectApps.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams ConnectAppInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.ConnectAppList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ConnectAppListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ConnectAppInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.ConnectAppList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConnectAppListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ConnectAppInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.ConnectAppList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConnectAppListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConnectAppPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ConnectAppInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.ConnectAppList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConnectAppListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConnectAppPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a connect_app\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.ConnectAppList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ConnectAppContext}\n   */\n  /* jshint ignore:end */\n  ConnectAppListInstance.get = function get(sid) {\n    return new ConnectAppContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.ConnectAppList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConnectAppListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConnectAppListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConnectAppListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectAppPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConnectAppPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConnectAppSolution} solution - Path solution\n *\n * @returns ConnectAppPage\n */\n/* jshint ignore:end */\nConnectAppPage = function ConnectAppPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConnectAppPage.prototype, Page.prototype);\nConnectAppPage.prototype.constructor = ConnectAppPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConnectAppInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppPage#\n *\n * @param {ConnectAppPayload} payload - Payload response from the API\n *\n * @returns ConnectAppInstance\n */\n/* jshint ignore:end */\nConnectAppPage.prototype.getInstance = function getInstance(payload) {\n  return new ConnectAppInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConnectAppPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConnectAppPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectAppContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConnectAppInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} authorizeRedirectUrl -\n *          The URL to redirect the user to after authorization\n * @property {string} companyName - The company name set for the Connect App\n * @property {string} deauthorizeCallbackMethod -\n *          The HTTP method we use to call deauthorize_callback_url\n * @property {string} deauthorizeCallbackUrl -\n *          The URL we call to de-authorize the Connect App\n * @property {string} description - The description of the Connect App\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} homepageUrl - The URL users can obtain more information\n * @property {connect_app.permission} permissions -\n *          The set of permissions that your ConnectApp requests\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {ConnectAppPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nConnectAppInstance = function ConnectAppInstance(version, payload, accountSid,\n                                                  sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.authorizeRedirectUrl = payload.authorize_redirect_url; // jshint ignore:line\n  this.companyName = payload.company_name; // jshint ignore:line\n  this.deauthorizeCallbackMethod = payload.deauthorize_callback_method; // jshint ignore:line\n  this.deauthorizeCallbackUrl = payload.deauthorize_callback_url; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.homepageUrl = payload.homepage_url; // jshint ignore:line\n  this.permissions = payload.permissions; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ConnectAppInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConnectAppContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ConnectAppInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectAppInstance\n */\n/* jshint ignore:end */\nConnectAppInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ConnectAppInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.authorizeRedirectUrl] -\n *          The URL to redirect the user to after authorization\n * @param {string} [opts.companyName] - The company name to set for the Connect App\n * @param {string} [opts.deauthorizeCallbackMethod] -\n *          The HTTP method to use when calling deauthorize_callback_url\n * @param {string} [opts.deauthorizeCallbackUrl] -\n *          The URL to call to de-authorize the Connect App\n * @param {string} [opts.description] - A description of the Connect App\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.homepageUrl] -\n *          A public URL where users can obtain more information\n * @param {connect_app.permission|list} [opts.permissions] -\n *          The set of permissions that your ConnectApp will request\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectAppInstance\n */\n/* jshint ignore:end */\nConnectAppInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConnectAppInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectAppInstance\n */\n/* jshint ignore:end */\nConnectAppInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConnectAppInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConnectAppInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectAppContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ConnectAppContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nConnectAppContext = function ConnectAppContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/ConnectApps/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConnectAppInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectAppInstance\n */\n/* jshint ignore:end */\nConnectAppContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConnectAppInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ConnectAppInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.authorizeRedirectUrl] -\n *          The URL to redirect the user to after authorization\n * @param {string} [opts.companyName] - The company name to set for the Connect App\n * @param {string} [opts.deauthorizeCallbackMethod] -\n *          The HTTP method to use when calling deauthorize_callback_url\n * @param {string} [opts.deauthorizeCallbackUrl] -\n *          The URL to call to de-authorize the Connect App\n * @param {string} [opts.description] - A description of the Connect App\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.homepageUrl] -\n *          A public URL where users can obtain more information\n * @param {connect_app.permission|list} [opts.permissions] -\n *          The set of permissions that your ConnectApp will request\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectAppInstance\n */\n/* jshint ignore:end */\nConnectAppContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'AuthorizeRedirectUrl': _.get(opts, 'authorizeRedirectUrl'),\n    'CompanyName': _.get(opts, 'companyName'),\n    'DeauthorizeCallbackMethod': _.get(opts, 'deauthorizeCallbackMethod'),\n    'DeauthorizeCallbackUrl': _.get(opts, 'deauthorizeCallbackUrl'),\n    'Description': _.get(opts, 'description'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'HomepageUrl': _.get(opts, 'homepageUrl'),\n    'Permissions': serialize.map(_.get(opts, 'permissions'), function(e) { return e; })\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConnectAppInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConnectAppInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectAppInstance\n */\n/* jshint ignore:end */\nConnectAppContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ConnectAppContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConnectAppContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConnectAppContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConnectAppList: ConnectAppList,\n  ConnectAppPage: ConnectAppPage,\n  ConnectAppInstance: ConnectAppInstance,\n  ConnectAppContext: ConnectAppContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar AssignedAddOnExtensionList;\nvar AssignedAddOnExtensionPage;\nvar AssignedAddOnExtensionInstance;\nvar AssignedAddOnExtensionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AssignedAddOnExtensionList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} resourceSid -\n *          The SID of the Phone Number to which the Add-on is assigned\n * @param {string} assignedAddOnSid -\n *          The SID that uniquely identifies the assigned Add-on installation\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionList = function AssignedAddOnExtensionList(version,\n    accountSid, resourceSid, assignedAddOnSid) {\n  /* jshint ignore:start */\n  /**\n   * @function extensions\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionContext}\n   */\n  /* jshint ignore:end */\n  function AssignedAddOnExtensionListInstance(sid) {\n    return AssignedAddOnExtensionListInstance.get(sid);\n  }\n\n  AssignedAddOnExtensionListInstance._version = version;\n  // Path Solution\n  AssignedAddOnExtensionListInstance._solution = {\n    accountSid: accountSid,\n    resourceSid: resourceSid,\n    assignedAddOnSid: assignedAddOnSid\n  };\n  AssignedAddOnExtensionListInstance._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers/${resourceSid}/AssignedAddOns/${assignedAddOnSid}/Extensions.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams AssignedAddOnExtensionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AssignedAddOnExtensionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AssignedAddOnExtensionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssignedAddOnExtensionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AssignedAddOnExtensionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssignedAddOnExtensionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssignedAddOnExtensionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AssignedAddOnExtensionInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssignedAddOnExtensionListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssignedAddOnExtensionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a assigned_add_on_extension\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionContext}\n   */\n  /* jshint ignore:end */\n  AssignedAddOnExtensionListInstance.get = function get(sid) {\n    return new AssignedAddOnExtensionContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.resourceSid,\n      this._solution.assignedAddOnSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AssignedAddOnExtensionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AssignedAddOnExtensionListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AssignedAddOnExtensionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssignedAddOnExtensionPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AssignedAddOnExtensionSolution} solution - Path solution\n *\n * @returns AssignedAddOnExtensionPage\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionPage = function AssignedAddOnExtensionPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AssignedAddOnExtensionPage.prototype, Page.prototype);\nAssignedAddOnExtensionPage.prototype.constructor = AssignedAddOnExtensionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AssignedAddOnExtensionInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionPage#\n *\n * @param {AssignedAddOnExtensionPayload} payload - Payload response from the API\n *\n * @returns AssignedAddOnExtensionInstance\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionPage.prototype.getInstance = function getInstance(payload)\n    {\n  return new AssignedAddOnExtensionInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.resourceSid,\n    this._solution.assignedAddOnSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssignedAddOnExtensionPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssignedAddOnExtensionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} resourceSid -\n *          The SID of the Phone Number to which the Add-on is assigned\n * @property {string} assignedAddOnSid -\n *          The SID that uniquely identifies the assigned Add-on installation\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} productName -\n *          A string that you assigned to describe the Product this Extension is used within\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {boolean} enabled - Whether the Extension will be invoked\n *\n * @param {V2010} version - Version of the resource\n * @param {AssignedAddOnExtensionPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} resourceSid -\n *          The SID of the Phone Number to which the Add-on is assigned\n * @param {sid} assignedAddOnSid -\n *          The SID that uniquely identifies the assigned Add-on installation\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionInstance = function\n    AssignedAddOnExtensionInstance(version, payload, accountSid, resourceSid,\n    assignedAddOnSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.resourceSid = payload.resource_sid; // jshint ignore:line\n  this.assignedAddOnSid = payload.assigned_add_on_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.productName = payload.product_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.enabled = payload.enabled; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    accountSid: accountSid,\n    resourceSid: resourceSid,\n    assignedAddOnSid: assignedAddOnSid,\n    sid: sid || this.sid,\n  };\n};\n\nObject.defineProperty(AssignedAddOnExtensionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AssignedAddOnExtensionContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.resourceSid,\n          this._solution.assignedAddOnSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AssignedAddOnExtensionInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssignedAddOnExtensionInstance\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssignedAddOnExtensionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssignedAddOnExtensionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} resourceSid -\n *          The SID of the Phone Number to which the Add-on is assigned\n * @param {sid} assignedAddOnSid -\n *          The SID that uniquely identifies the assigned Add-on installation\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionContext = function AssignedAddOnExtensionContext(version,\n    accountSid, resourceSid, assignedAddOnSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {\n    accountSid: accountSid,\n    resourceSid: resourceSid,\n    assignedAddOnSid: assignedAddOnSid,\n    sid: sid,\n  };\n  this._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers/${resourceSid}/AssignedAddOns/${assignedAddOnSid}/Extensions/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AssignedAddOnExtensionInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssignedAddOnExtensionInstance\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssignedAddOnExtensionInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.resourceSid,\n      this._solution.assignedAddOnSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssignedAddOnExtensionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAssignedAddOnExtensionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AssignedAddOnExtensionList: AssignedAddOnExtensionList,\n  AssignedAddOnExtensionPage: AssignedAddOnExtensionPage,\n  AssignedAddOnExtensionInstance: AssignedAddOnExtensionInstance,\n  AssignedAddOnExtensionContext: AssignedAddOnExtensionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AssignedAddOnExtensionList = require(\n    './assignedAddOn/assignedAddOnExtension').AssignedAddOnExtensionList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar AssignedAddOnList;\nvar AssignedAddOnPage;\nvar AssignedAddOnInstance;\nvar AssignedAddOnContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AssignedAddOnList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} resourceSid -\n *          The SID of the Phone Number that installed this Add-on\n */\n/* jshint ignore:end */\nAssignedAddOnList = function AssignedAddOnList(version, accountSid, resourceSid)\n                                                {\n  /* jshint ignore:start */\n  /**\n   * @function assignedAddOns\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext}\n   */\n  /* jshint ignore:end */\n  function AssignedAddOnListInstance(sid) {\n    return AssignedAddOnListInstance.get(sid);\n  }\n\n  AssignedAddOnListInstance._version = version;\n  // Path Solution\n  AssignedAddOnListInstance._solution = {accountSid: accountSid, resourceSid: resourceSid};\n  AssignedAddOnListInstance._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers/${resourceSid}/AssignedAddOns.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams AssignedAddOnInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AssignedAddOnListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AssignedAddOnInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssignedAddOnListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AssignedAddOnInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssignedAddOnListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssignedAddOnPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AssignedAddOnInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssignedAddOnListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssignedAddOnPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a AssignedAddOnInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.installedAddOnSid -\n   *          The SID that identifies the Add-on installation\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AssignedAddOnInstance\n   */\n  /* jshint ignore:end */\n  AssignedAddOnListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['installedAddOnSid'])) {\n      throw new Error('Required parameter \"opts[\\'installedAddOnSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'InstalledAddOnSid': _.get(opts, 'installedAddOnSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssignedAddOnInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.resourceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a assigned_add_on\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext}\n   */\n  /* jshint ignore:end */\n  AssignedAddOnListInstance.get = function get(sid) {\n    return new AssignedAddOnContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.resourceSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AssignedAddOnListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AssignedAddOnListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AssignedAddOnListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssignedAddOnPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AssignedAddOnSolution} solution - Path solution\n *\n * @returns AssignedAddOnPage\n */\n/* jshint ignore:end */\nAssignedAddOnPage = function AssignedAddOnPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AssignedAddOnPage.prototype, Page.prototype);\nAssignedAddOnPage.prototype.constructor = AssignedAddOnPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AssignedAddOnInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnPage#\n *\n * @param {AssignedAddOnPayload} payload - Payload response from the API\n *\n * @returns AssignedAddOnInstance\n */\n/* jshint ignore:end */\nAssignedAddOnPage.prototype.getInstance = function getInstance(payload) {\n  return new AssignedAddOnInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.resourceSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssignedAddOnPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssignedAddOnPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssignedAddOnContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} resourceSid -\n *          The SID of the Phone Number that installed this Add-on\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} description - A short description of the Add-on functionality\n * @property {object} configuration -\n *          A JSON string that represents the current configuration\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n *\n * @param {V2010} version - Version of the resource\n * @param {AssignedAddOnPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} resourceSid -\n *          The SID of the Phone Number that installed this Add-on\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAssignedAddOnInstance = function AssignedAddOnInstance(version, payload,\n                                                        accountSid, resourceSid,\n                                                        sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.resourceSid = payload.resource_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.configuration = payload.configuration; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, resourceSid: resourceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AssignedAddOnInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AssignedAddOnContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.resourceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AssignedAddOnInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssignedAddOnInstance\n */\n/* jshint ignore:end */\nAssignedAddOnInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AssignedAddOnInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssignedAddOnInstance\n */\n/* jshint ignore:end */\nAssignedAddOnInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the extensions\n *\n * @function extensions\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionList}\n */\n/* jshint ignore:end */\nAssignedAddOnInstance.prototype.extensions = function extensions() {\n  return this._proxy.extensions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssignedAddOnInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssignedAddOnInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssignedAddOnContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext\n *\n * @property {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext.AssignedAddOnExtensionList} extensions -\n *          extensions resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} resourceSid -\n *          The SID of the Phone Number that installed this Add-on\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAssignedAddOnContext = function AssignedAddOnContext(version, accountSid,\n                                                      resourceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, resourceSid: resourceSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers/${resourceSid}/AssignedAddOns/${sid}.json`;\n\n  // Dependents\n  this._extensions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AssignedAddOnInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssignedAddOnInstance\n */\n/* jshint ignore:end */\nAssignedAddOnContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssignedAddOnInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.resourceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AssignedAddOnInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssignedAddOnInstance\n */\n/* jshint ignore:end */\nAssignedAddOnContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AssignedAddOnContext.prototype,\n  'extensions', {\n    get: function() {\n      if (!this._extensions) {\n        this._extensions = new AssignedAddOnExtensionList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.resourceSid,\n          this._solution.sid\n        );\n      }\n      return this._extensions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssignedAddOnContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAssignedAddOnContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AssignedAddOnList: AssignedAddOnList,\n  AssignedAddOnPage: AssignedAddOnPage,\n  AssignedAddOnInstance: AssignedAddOnInstance,\n  AssignedAddOnContext: AssignedAddOnContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar LocalList;\nvar LocalPage;\nvar LocalInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the LocalList\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nLocalList = function LocalList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function local\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalContext}\n   */\n  /* jshint ignore:end */\n  function LocalListInstance(sid) {\n    return LocalListInstance.get(sid);\n  }\n\n  LocalListInstance._version = version;\n  // Path Solution\n  LocalListInstance._solution = {accountSid: accountSid};\n  LocalListInstance._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers/Local.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams LocalInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the resources to read\n   * @param {string} [opts.phoneNumber] - The phone numbers of the resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  LocalListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists LocalInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the resources to read\n   * @param {string} [opts.phoneNumber] - The phone numbers of the resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LocalListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of LocalInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the resources to read\n   * @param {string} [opts.phoneNumber] - The phone numbers of the resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LocalListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'Origin': _.get(opts, 'origin'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new LocalPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of LocalInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LocalListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new LocalPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a LocalInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.phoneNumber - The phone number to purchase in E.164 format\n   * @param {string} [opts.apiVersion] -\n   *          The API version to use for incoming calls made to the new phone number\n   * @param {string} [opts.friendlyName] - A string to describe the new phone number\n   * @param {string} [opts.smsApplicationSid] -\n   *          The SID of the application to handle SMS messages\n   * @param {string} [opts.smsFallbackMethod] -\n   *          The HTTP method we use to call status_callback\n   * @param {string} [opts.smsFallbackUrl] -\n   *          The URL we call when an error occurs while executing TwiML\n   * @param {string} [opts.smsMethod] - The HTTP method to use with sms url\n   * @param {string} [opts.smsUrl] -\n   *          The URL we should call when the new phone number receives an incoming SMS message\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          HTTP method we should use to call status_callback\n   * @param {string} [opts.voiceApplicationSid] -\n   *          The SID of the application to handle the new phone number\n   * @param {boolean} [opts.voiceCallerIdLookup] -\n   *          Whether to lookup the caller's name\n   * @param {string} [opts.voiceFallbackMethod] -\n   *          The HTTP method used with voice_fallback_url\n   * @param {string} [opts.voiceFallbackUrl] -\n   *          The URL we will call when an error occurs in TwiML\n   * @param {string} [opts.voiceMethod] - The HTTP method used with the voice_url\n   * @param {string} [opts.voiceUrl] -\n   *          The URL we should call when the phone number receives a call\n   * @param {string} [opts.identitySid] -\n   *          The SID of the Identity resource to associate with the new phone number\n   * @param {string} [opts.addressSid] -\n   *          The SID of the Address resource associated with the phone number\n   * @param {local.emergency_status} [opts.emergencyStatus] -\n   *          Displays if emergency calling is enabled for this number.\n   * @param {string} [opts.emergencyAddressSid] -\n   *          The emergency address configuration to use for emergency calling\n   * @param {string} [opts.trunkSid] -\n   *          SID of the trunk to handle calls to the new phone number\n   * @param {local.voice_receive_mode} [opts.voiceReceiveMode] -\n   *          Incoming call type: fax or voice\n   * @param {string} [opts.bundleSid] -\n   *          The SID of the Bundle resource associated with number\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed LocalInstance\n   */\n  /* jshint ignore:end */\n  LocalListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['phoneNumber'])) {\n      throw new Error('Required parameter \"opts[\\'phoneNumber\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'ApiVersion': _.get(opts, 'apiVersion'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'SmsApplicationSid': _.get(opts, 'smsApplicationSid'),\n      'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n      'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n      'SmsMethod': _.get(opts, 'smsMethod'),\n      'SmsUrl': _.get(opts, 'smsUrl'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'),\n      'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')),\n      'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n      'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n      'VoiceMethod': _.get(opts, 'voiceMethod'),\n      'VoiceUrl': _.get(opts, 'voiceUrl'),\n      'IdentitySid': _.get(opts, 'identitySid'),\n      'AddressSid': _.get(opts, 'addressSid'),\n      'EmergencyStatus': _.get(opts, 'emergencyStatus'),\n      'EmergencyAddressSid': _.get(opts, 'emergencyAddressSid'),\n      'TrunkSid': _.get(opts, 'trunkSid'),\n      'VoiceReceiveMode': _.get(opts, 'voiceReceiveMode'),\n      'BundleSid': _.get(opts, 'bundleSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new LocalInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  LocalListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  LocalListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return LocalListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the LocalPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {LocalSolution} solution - Path solution\n *\n * @returns LocalPage\n */\n/* jshint ignore:end */\nLocalPage = function LocalPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(LocalPage.prototype, Page.prototype);\nLocalPage.prototype.constructor = LocalPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of LocalInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalPage#\n *\n * @param {LocalPayload} payload - Payload response from the API\n *\n * @returns LocalInstance\n */\n/* jshint ignore:end */\nLocalPage.prototype.getInstance = function getInstance(payload) {\n  return new LocalInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nLocalPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nLocalPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the LocalContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} addressSid -\n *          The SID of the Address resource associated with the phone number\n * @property {local.address_requirement} addressRequirements -\n *          Whether the phone number requires an Address registered with Twilio.\n * @property {string} apiVersion -\n *          The API version used to start a new TwiML session\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Indicate if a phone can receive calls or messages\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} identitySid -\n *          The SID of the Identity resource associated with number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} origin - The phone number's origin. Can be twilio or hosted.\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} smsApplicationSid -\n *          The SID of the Application resource to handle SMS messages\n * @property {string} smsFallbackMethod -\n *          The HTTP method used with sms_fallback_url\n * @property {string} smsFallbackUrl -\n *          The URL that we call when an error occurs while retrieving or executing the TwiML\n * @property {string} smsMethod - The HTTP method to use with sms_url\n * @property {string} smsUrl -\n *          The URL we call when the phone number receives an incoming SMS message\n * @property {string} statusCallback -\n *          The URL to send status information to your application\n * @property {string} statusCallbackMethod -\n *          The HTTP method we use to call status_callback\n * @property {string} trunkSid -\n *          The SID of the Trunk that handles calls to the phone number\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {local.voice_receive_mode} voiceReceiveMode - The voice_receive_mode\n * @property {string} voiceApplicationSid -\n *          The SID of the application that handles calls to the phone number\n * @property {boolean} voiceCallerIdLookup - Whether to lookup the caller's name\n * @property {string} voiceFallbackMethod -\n *          The HTTP method used with voice_fallback_url\n * @property {string} voiceFallbackUrl -\n *          The URL we call when an error occurs in TwiML\n * @property {string} voiceMethod - The HTTP method used with the voice_url\n * @property {string} voiceUrl -\n *          The URL we call when this phone number receives a call\n * @property {local.emergency_status} emergencyStatus -\n *          Displays if emergency calling is enabled for this number.\n * @property {string} emergencyAddressSid -\n *          The emergency address configuration to use for emergency calling\n * @property {local.emergency_address_status} emergencyAddressStatus -\n *          State of the emergency address configuration for the phone number\n * @property {string} bundleSid -\n *          The SID of the Bundle resource associated with number\n * @property {string} status - The status\n *\n * @param {V2010} version - Version of the resource\n * @param {LocalPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nLocalInstance = function LocalInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.addressSid = payload.address_sid; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.identitySid = payload.identity_sid; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.origin = payload.origin; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.smsApplicationSid = payload.sms_application_sid; // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.voiceReceiveMode = payload.voice_receive_mode; // jshint ignore:line\n  this.voiceApplicationSid = payload.voice_application_sid; // jshint ignore:line\n  this.voiceCallerIdLookup = payload.voice_caller_id_lookup; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n  this.emergencyStatus = payload.emergency_status; // jshint ignore:line\n  this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line\n  this.emergencyAddressStatus = payload.emergency_address_status; // jshint ignore:line\n  this.bundleSid = payload.bundle_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nLocalInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nLocalInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  LocalList: LocalList,\n  LocalPage: LocalPage,\n  LocalInstance: LocalInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MobileList;\nvar MobilePage;\nvar MobileInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the MobileList\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nMobileList = function MobileList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function mobile\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileContext}\n   */\n  /* jshint ignore:end */\n  function MobileListInstance(sid) {\n    return MobileListInstance.get(sid);\n  }\n\n  MobileListInstance._version = version;\n  // Path Solution\n  MobileListInstance._solution = {accountSid: accountSid};\n  MobileListInstance._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers/Mobile.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams MobileInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the resources to read\n   * @param {string} [opts.phoneNumber] - The phone numbers of the resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MobileListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MobileInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the resources to read\n   * @param {string} [opts.phoneNumber] - The phone numbers of the resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MobileListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MobileInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the resources to read\n   * @param {string} [opts.phoneNumber] - The phone numbers of the resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MobileListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'Origin': _.get(opts, 'origin'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MobilePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MobileInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MobileListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MobilePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a MobileInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.phoneNumber - The phone number to purchase in E.164 format\n   * @param {string} [opts.apiVersion] -\n   *          The API version to use for incoming calls made to the new phone number\n   * @param {string} [opts.friendlyName] - A string to describe the new phone number\n   * @param {string} [opts.smsApplicationSid] -\n   *          The SID of the application to handle SMS messages\n   * @param {string} [opts.smsFallbackMethod] -\n   *          HTTP method used with sms_fallback_url\n   * @param {string} [opts.smsFallbackUrl] -\n   *          The URL we call when an error occurs while executing TwiML\n   * @param {string} [opts.smsMethod] - The HTTP method to use with sms url\n   * @param {string} [opts.smsUrl] -\n   *          The URL we should call when the new phone number receives an incoming SMS message\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method we should use to call status_callback\n   * @param {string} [opts.voiceApplicationSid] -\n   *          The SID of the application to handle the new phone number\n   * @param {boolean} [opts.voiceCallerIdLookup] -\n   *          Whether to lookup the caller's name\n   * @param {string} [opts.voiceFallbackMethod] -\n   *          The HTTP method used with voice_fallback_url\n   * @param {string} [opts.voiceFallbackUrl] -\n   *          The URL we will call when an error occurs in TwiML\n   * @param {string} [opts.voiceMethod] - The HTTP method used with the voice_url\n   * @param {string} [opts.voiceUrl] -\n   *          The URL we should call when the phone number receives a call\n   * @param {string} [opts.identitySid] -\n   *          The SID of the Identity resource to associate with the new phone number\n   * @param {string} [opts.addressSid] -\n   *          The SID of the Address resource associated with the phone number\n   * @param {mobile.emergency_status} [opts.emergencyStatus] -\n   *          Displays if emergency calling is enabled for this number.\n   * @param {string} [opts.emergencyAddressSid] -\n   *          The emergency address configuration to use for emergency calling\n   * @param {string} [opts.trunkSid] -\n   *          SID of the trunk to handle calls to the new phone number\n   * @param {mobile.voice_receive_mode} [opts.voiceReceiveMode] -\n   *          Incoming call type: fax or voice\n   * @param {string} [opts.bundleSid] -\n   *          The SID of the Bundle resource associated with number\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MobileInstance\n   */\n  /* jshint ignore:end */\n  MobileListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['phoneNumber'])) {\n      throw new Error('Required parameter \"opts[\\'phoneNumber\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'ApiVersion': _.get(opts, 'apiVersion'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'SmsApplicationSid': _.get(opts, 'smsApplicationSid'),\n      'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n      'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n      'SmsMethod': _.get(opts, 'smsMethod'),\n      'SmsUrl': _.get(opts, 'smsUrl'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'),\n      'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')),\n      'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n      'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n      'VoiceMethod': _.get(opts, 'voiceMethod'),\n      'VoiceUrl': _.get(opts, 'voiceUrl'),\n      'IdentitySid': _.get(opts, 'identitySid'),\n      'AddressSid': _.get(opts, 'addressSid'),\n      'EmergencyStatus': _.get(opts, 'emergencyStatus'),\n      'EmergencyAddressSid': _.get(opts, 'emergencyAddressSid'),\n      'TrunkSid': _.get(opts, 'trunkSid'),\n      'VoiceReceiveMode': _.get(opts, 'voiceReceiveMode'),\n      'BundleSid': _.get(opts, 'bundleSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MobileInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MobileListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MobileListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MobileListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MobilePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobilePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MobileSolution} solution - Path solution\n *\n * @returns MobilePage\n */\n/* jshint ignore:end */\nMobilePage = function MobilePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MobilePage.prototype, Page.prototype);\nMobilePage.prototype.constructor = MobilePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MobileInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobilePage#\n *\n * @param {MobilePayload} payload - Payload response from the API\n *\n * @returns MobileInstance\n */\n/* jshint ignore:end */\nMobilePage.prototype.getInstance = function getInstance(payload) {\n  return new MobileInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobilePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMobilePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMobilePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MobileContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} addressSid -\n *          The SID of the Address resource associated with the phone number\n * @property {mobile.address_requirement} addressRequirements -\n *          Whether the phone number requires an Address registered with Twilio.\n * @property {string} apiVersion -\n *          The API version used to start a new TwiML session\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Indicate if a phone can receive calls or messages\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} identitySid -\n *          The SID of the Identity resource associated with number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} origin - The phone number's origin. Can be twilio or hosted.\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} smsApplicationSid -\n *          The SID of the application that handles SMS messages sent to the phone number\n * @property {string} smsFallbackMethod -\n *          The HTTP method used with sms_fallback_url\n * @property {string} smsFallbackUrl -\n *          The URL that we call when an error occurs while retrieving or executing the TwiML\n * @property {string} smsMethod - The HTTP method to use with sms_url\n * @property {string} smsUrl -\n *          The URL we call when the phone number receives an incoming SMS message\n * @property {string} statusCallback -\n *          The URL to send status information to your application\n * @property {string} statusCallbackMethod -\n *          The HTTP method we use to call status_callback\n * @property {string} trunkSid -\n *          The SID of the Trunk that handles calls to the phone number\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {mobile.voice_receive_mode} voiceReceiveMode - The voice_receive_mode\n * @property {string} voiceApplicationSid -\n *          The SID of the application that handles calls to the phone number\n * @property {boolean} voiceCallerIdLookup - Whether to lookup the caller's name\n * @property {string} voiceFallbackMethod -\n *          The HTTP method used with voice_fallback_url\n * @property {string} voiceFallbackUrl -\n *          The URL we call when an error occurs in TwiML\n * @property {string} voiceMethod - The HTTP method used with the voice_url\n * @property {string} voiceUrl -\n *          The URL we call when the phone number receives a call\n * @property {mobile.emergency_status} emergencyStatus -\n *          Displays if emergency calling is enabled for this number.\n * @property {string} emergencyAddressSid -\n *          The emergency address configuration to use for emergency calling\n * @property {mobile.emergency_address_status} emergencyAddressStatus -\n *          State of the emergency address configuration for the phone number\n * @property {string} bundleSid -\n *          The SID of the Bundle resource associated with number\n * @property {string} status - The status\n *\n * @param {V2010} version - Version of the resource\n * @param {MobilePayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nMobileInstance = function MobileInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.addressSid = payload.address_sid; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.identitySid = payload.identity_sid; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.origin = payload.origin; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.smsApplicationSid = payload.sms_application_sid; // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.voiceReceiveMode = payload.voice_receive_mode; // jshint ignore:line\n  this.voiceApplicationSid = payload.voice_application_sid; // jshint ignore:line\n  this.voiceCallerIdLookup = payload.voice_caller_id_lookup; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n  this.emergencyStatus = payload.emergency_status; // jshint ignore:line\n  this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line\n  this.emergencyAddressStatus = payload.emergency_address_status; // jshint ignore:line\n  this.bundleSid = payload.bundle_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMobileInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMobileInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MobileList: MobileList,\n  MobilePage: MobilePage,\n  MobileInstance: MobileInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TollFreeList;\nvar TollFreePage;\nvar TollFreeInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the TollFreeList\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nTollFreeList = function TollFreeList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function tollFree\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeContext}\n   */\n  /* jshint ignore:end */\n  function TollFreeListInstance(sid) {\n    return TollFreeListInstance.get(sid);\n  }\n\n  TollFreeListInstance._version = version;\n  // Path Solution\n  TollFreeListInstance._solution = {accountSid: accountSid};\n  TollFreeListInstance._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers/TollFree.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams TollFreeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the resources to read\n   * @param {string} [opts.phoneNumber] - The phone numbers of the resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TollFreeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the resources to read\n   * @param {string} [opts.phoneNumber] - The phone numbers of the resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TollFreeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the resources to read\n   * @param {string} [opts.phoneNumber] - The phone numbers of the resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'Origin': _.get(opts, 'origin'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TollFreePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TollFreeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TollFreePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a TollFreeInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.phoneNumber - The phone number to purchase in E.164 format\n   * @param {string} [opts.apiVersion] -\n   *          The API version to use for incoming calls made to the new phone number\n   * @param {string} [opts.friendlyName] - A string to describe the new phone number\n   * @param {string} [opts.smsApplicationSid] -\n   *          The SID of the application to handle SMS messages\n   * @param {string} [opts.smsFallbackMethod] -\n   *          HTTP method used with sms_fallback_url\n   * @param {string} [opts.smsFallbackUrl] -\n   *          The URL we call when an error occurs while executing TwiML\n   * @param {string} [opts.smsMethod] - The HTTP method to use with sms_url\n   * @param {string} [opts.smsUrl] -\n   *          The URL we should call when the new phone number receives an incoming SMS message\n   * @param {string} [opts.statusCallback] -\n   *          The URL to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method we should use to call status_callback\n   * @param {string} [opts.voiceApplicationSid] -\n   *          The SID of the application to handle the new phone number\n   * @param {boolean} [opts.voiceCallerIdLookup] -\n   *          Whether to lookup the caller's name\n   * @param {string} [opts.voiceFallbackMethod] -\n   *          The HTTP method used with voice_fallback_url\n   * @param {string} [opts.voiceFallbackUrl] -\n   *          The URL we will call when an error occurs in TwiML\n   * @param {string} [opts.voiceMethod] - The HTTP method used with the voice_url\n   * @param {string} [opts.voiceUrl] -\n   *          The URL we should call when the phone number receives a call\n   * @param {string} [opts.identitySid] -\n   *          The SID of the Identity resource to associate with the new phone number\n   * @param {string} [opts.addressSid] -\n   *          The SID of the Address resource associated with the phone number\n   * @param {toll_free.emergency_status} [opts.emergencyStatus] -\n   *          Displays if emergency calling is enabled for this number.\n   * @param {string} [opts.emergencyAddressSid] -\n   *          The emergency address configuration to use for emergency calling\n   * @param {string} [opts.trunkSid] -\n   *          SID of the trunk to handle calls to the new phone number\n   * @param {toll_free.voice_receive_mode} [opts.voiceReceiveMode] -\n   *          Incoming call type: fax or voice\n   * @param {string} [opts.bundleSid] -\n   *          The SID of the Bundle resource associated with number\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TollFreeInstance\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['phoneNumber'])) {\n      throw new Error('Required parameter \"opts[\\'phoneNumber\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'ApiVersion': _.get(opts, 'apiVersion'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'SmsApplicationSid': _.get(opts, 'smsApplicationSid'),\n      'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n      'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n      'SmsMethod': _.get(opts, 'smsMethod'),\n      'SmsUrl': _.get(opts, 'smsUrl'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'),\n      'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')),\n      'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n      'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n      'VoiceMethod': _.get(opts, 'voiceMethod'),\n      'VoiceUrl': _.get(opts, 'voiceUrl'),\n      'IdentitySid': _.get(opts, 'identitySid'),\n      'AddressSid': _.get(opts, 'addressSid'),\n      'EmergencyStatus': _.get(opts, 'emergencyStatus'),\n      'EmergencyAddressSid': _.get(opts, 'emergencyAddressSid'),\n      'TrunkSid': _.get(opts, 'trunkSid'),\n      'VoiceReceiveMode': _.get(opts, 'voiceReceiveMode'),\n      'BundleSid': _.get(opts, 'bundleSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TollFreeInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TollFreeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TollFreeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TollFreeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TollFreePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TollFreeSolution} solution - Path solution\n *\n * @returns TollFreePage\n */\n/* jshint ignore:end */\nTollFreePage = function TollFreePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TollFreePage.prototype, Page.prototype);\nTollFreePage.prototype.constructor = TollFreePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TollFreeInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreePage#\n *\n * @param {TollFreePayload} payload - Payload response from the API\n *\n * @returns TollFreeInstance\n */\n/* jshint ignore:end */\nTollFreePage.prototype.getInstance = function getInstance(payload) {\n  return new TollFreeInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTollFreePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTollFreePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TollFreeContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} addressSid -\n *          The SID of the Address resource associated with the phone number\n * @property {toll_free.address_requirement} addressRequirements -\n *          Whether the phone number requires an Address registered with Twilio.\n * @property {string} apiVersion -\n *          The API version used to start a new TwiML session\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Indicate if a phone can receive calls or messages\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} identitySid -\n *          The SID of the Identity resource associated with number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} origin - The phone number's origin. Can be twilio or hosted.\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} smsApplicationSid -\n *          The SID of the application that handles SMS messages sent to the phone number\n * @property {string} smsFallbackMethod -\n *          The HTTP method used with sms_fallback_url\n * @property {string} smsFallbackUrl -\n *          The URL that we call when an error occurs while retrieving or executing the TwiML\n * @property {string} smsMethod - The HTTP method to use with sms_url\n * @property {string} smsUrl -\n *          The URL we call when the phone number receives an incoming SMS message\n * @property {string} statusCallback -\n *          The URL to send status information to your application\n * @property {string} statusCallbackMethod -\n *          The HTTP method we use to call status_callback\n * @property {string} trunkSid -\n *          The SID of the Trunk that handles calls to the phone number\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {toll_free.voice_receive_mode} voiceReceiveMode -\n *          The voice_receive_mode\n * @property {string} voiceApplicationSid -\n *          The SID of the application that handles calls to the phone number\n * @property {boolean} voiceCallerIdLookup - Whether to lookup the caller's name\n * @property {string} voiceFallbackMethod -\n *          The HTTP method used with voice_fallback_url\n * @property {string} voiceFallbackUrl -\n *          The URL we call when an error occurs in TwiML\n * @property {string} voiceMethod - The HTTP method used with the voice_url\n * @property {string} voiceUrl -\n *          The URL we call when the phone number receives a call\n * @property {toll_free.emergency_status} emergencyStatus -\n *          Displays if emergency calling is enabled for this number.\n * @property {string} emergencyAddressSid -\n *          The emergency address configuration to use for emergency calling\n * @property {toll_free.emergency_address_status} emergencyAddressStatus -\n *          State of the emergency address configuration for the phone number\n * @property {string} bundleSid -\n *          The SID of the Bundle resource associated with number\n * @property {string} status - The status\n *\n * @param {V2010} version - Version of the resource\n * @param {TollFreePayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nTollFreeInstance = function TollFreeInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.addressSid = payload.address_sid; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.identitySid = payload.identity_sid; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.origin = payload.origin; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.smsApplicationSid = payload.sms_application_sid; // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.voiceReceiveMode = payload.voice_receive_mode; // jshint ignore:line\n  this.voiceApplicationSid = payload.voice_application_sid; // jshint ignore:line\n  this.voiceCallerIdLookup = payload.voice_caller_id_lookup; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n  this.emergencyStatus = payload.emergency_status; // jshint ignore:line\n  this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line\n  this.emergencyAddressStatus = payload.emergency_address_status; // jshint ignore:line\n  this.bundleSid = payload.bundle_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTollFreeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTollFreeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TollFreeList: TollFreeList,\n  TollFreePage: TollFreePage,\n  TollFreeInstance: TollFreeInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AssignedAddOnList = require(\n    './incomingPhoneNumber/assignedAddOn').AssignedAddOnList;\nvar LocalList = require('./incomingPhoneNumber/local').LocalList;\nvar MobileList = require('./incomingPhoneNumber/mobile').MobileList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar TollFreeList = require('./incomingPhoneNumber/tollFree').TollFreeList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar IncomingPhoneNumberList;\nvar IncomingPhoneNumberPage;\nvar IncomingPhoneNumberInstance;\nvar IncomingPhoneNumberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the IncomingPhoneNumberList\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nIncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid)\n                                                            {\n  /* jshint ignore:start */\n  /**\n   * @function incomingPhoneNumbers\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  function IncomingPhoneNumberListInstance(sid) {\n    return IncomingPhoneNumberListInstance.get(sid);\n  }\n\n  IncomingPhoneNumberListInstance._version = version;\n  // Path Solution\n  IncomingPhoneNumberListInstance._solution = {accountSid: accountSid};\n  IncomingPhoneNumberListInstance._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers.json`;\n\n  // Components\n  IncomingPhoneNumberListInstance._local = undefined;\n  IncomingPhoneNumberListInstance._mobile = undefined;\n  IncomingPhoneNumberListInstance._tollFree = undefined;\n\n  /* jshint ignore:start */\n  /**\n   * Streams IncomingPhoneNumberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the IncomingPhoneNumber resources to read\n   * @param {string} [opts.phoneNumber] -\n   *          The phone numbers of the IncomingPhoneNumber resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  IncomingPhoneNumberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists IncomingPhoneNumberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the IncomingPhoneNumber resources to read\n   * @param {string} [opts.phoneNumber] -\n   *          The phone numbers of the IncomingPhoneNumber resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IncomingPhoneNumberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of IncomingPhoneNumberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.beta] - Whether to include new phone numbers\n   * @param {string} [opts.friendlyName] -\n   *          A string that identifies the IncomingPhoneNumber resources to read\n   * @param {string} [opts.phoneNumber] -\n   *          The phone numbers of the IncomingPhoneNumber resources to read\n   * @param {string} [opts.origin] -\n   *          Include phone numbers based on their origin. By default, phone numbers of all origin are included.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IncomingPhoneNumberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Beta': serialize.bool(_.get(opts, 'beta')),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'Origin': _.get(opts, 'origin'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IncomingPhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of IncomingPhoneNumberInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IncomingPhoneNumberListInstance.getPage = function getPage(targetUrl, callback)\n                                                              {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IncomingPhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a IncomingPhoneNumberInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.apiVersion] -\n   *          The API version to use for incoming calls made to the new phone number\n   * @param {string} [opts.friendlyName] - A string to describe the new phone number\n   * @param {string} [opts.smsApplicationSid] -\n   *          The SID of the application to handle SMS messages\n   * @param {string} [opts.smsFallbackMethod] -\n   *          HTTP method used with sms_fallback_url\n   * @param {string} [opts.smsFallbackUrl] -\n   *          The URL we call when an error occurs while executing TwiML\n   * @param {string} [opts.smsMethod] - The HTTP method to use with sms url\n   * @param {string} [opts.smsUrl] -\n   *          The URL we should call when the new phone number receives an incoming SMS message\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          HTTP method we should use to call status_callback\n   * @param {string} [opts.voiceApplicationSid] -\n   *          The SID of the application to handle the new phone number\n   * @param {boolean} [opts.voiceCallerIdLookup] -\n   *          Whether to lookup the caller's name\n   * @param {string} [opts.voiceFallbackMethod] -\n   *          The HTTP method used with voice_fallback_url\n   * @param {string} [opts.voiceFallbackUrl] -\n   *          The URL we will call when an error occurs in TwiML\n   * @param {string} [opts.voiceMethod] - The HTTP method used with the voice_url\n   * @param {string} [opts.voiceUrl] -\n   *          The URL we should call when the phone number receives a call\n   * @param {incoming_phone_number.emergency_status} [opts.emergencyStatus] -\n   *          Displays if emergency calling is enabled for this number.\n   * @param {string} [opts.emergencyAddressSid] -\n   *          The emergency address configuration to use for emergency calling\n   * @param {string} [opts.trunkSid] -\n   *          SID of the trunk to handle calls to the new phone number\n   * @param {string} [opts.identitySid] -\n   *          The SID of the Identity resource to associate with the new phone number\n   * @param {string} [opts.addressSid] -\n   *          The SID of the Address resource associated with the phone number\n   * @param {incoming_phone_number.voice_receive_mode} [opts.voiceReceiveMode] -\n   *          Incoming call type: fax or voice\n   * @param {string} [opts.bundleSid] -\n   *          The SID of the Bundle resource associated with number\n   * @param {string} [opts.phoneNumber] -\n   *          The phone number to purchase in E.164 format\n   * @param {string} [opts.areaCode] - The desired area code for the new phone number\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance\n   */\n  /* jshint ignore:end */\n  IncomingPhoneNumberListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'AreaCode': _.get(opts, 'areaCode'),\n      'ApiVersion': _.get(opts, 'apiVersion'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'SmsApplicationSid': _.get(opts, 'smsApplicationSid'),\n      'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n      'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n      'SmsMethod': _.get(opts, 'smsMethod'),\n      'SmsUrl': _.get(opts, 'smsUrl'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'),\n      'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')),\n      'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n      'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n      'VoiceMethod': _.get(opts, 'voiceMethod'),\n      'VoiceUrl': _.get(opts, 'voiceUrl'),\n      'EmergencyStatus': _.get(opts, 'emergencyStatus'),\n      'EmergencyAddressSid': _.get(opts, 'emergencyAddressSid'),\n      'TrunkSid': _.get(opts, 'trunkSid'),\n      'IdentitySid': _.get(opts, 'identitySid'),\n      'AddressSid': _.get(opts, 'addressSid'),\n      'VoiceReceiveMode': _.get(opts, 'voiceReceiveMode'),\n      'BundleSid': _.get(opts, 'bundleSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IncomingPhoneNumberInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a incoming_phone_number\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  IncomingPhoneNumberListInstance.get = function get(sid) {\n    return new IncomingPhoneNumberContext(this._version, this._solution.accountSid, sid);\n  };\n\n  Object.defineProperty(IncomingPhoneNumberListInstance,\n    'local', {\n      get: function local() {\n        if (!this._local) {\n          this._local = new LocalList(this._version, this._solution.accountSid);\n        }\n\n        return this._local;\n      }\n  });\n\n  Object.defineProperty(IncomingPhoneNumberListInstance,\n    'mobile', {\n      get: function mobile() {\n        if (!this._mobile) {\n          this._mobile = new MobileList(this._version, this._solution.accountSid);\n        }\n\n        return this._mobile;\n      }\n  });\n\n  Object.defineProperty(IncomingPhoneNumberListInstance,\n    'tollFree', {\n      get: function tollFree() {\n        if (!this._tollFree) {\n          this._tollFree = new TollFreeList(this._version, this._solution.accountSid);\n        }\n\n        return this._tollFree;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  IncomingPhoneNumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  IncomingPhoneNumberListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return IncomingPhoneNumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IncomingPhoneNumberPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {IncomingPhoneNumberSolution} solution - Path solution\n *\n * @returns IncomingPhoneNumberPage\n */\n/* jshint ignore:end */\nIncomingPhoneNumberPage = function IncomingPhoneNumberPage(version, response,\n                                                            solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(IncomingPhoneNumberPage.prototype, Page.prototype);\nIncomingPhoneNumberPage.prototype.constructor = IncomingPhoneNumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of IncomingPhoneNumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberPage#\n *\n * @param {IncomingPhoneNumberPayload} payload - Payload response from the API\n *\n * @returns IncomingPhoneNumberInstance\n */\n/* jshint ignore:end */\nIncomingPhoneNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new IncomingPhoneNumberInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIncomingPhoneNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIncomingPhoneNumberPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IncomingPhoneNumberContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} addressSid -\n *          The SID of the Address resource associated with the phone number\n * @property {incoming_phone_number.address_requirement} addressRequirements -\n *          Whether the phone number requires an Address registered with Twilio.\n * @property {string} apiVersion -\n *          The API version used to start a new TwiML session\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {PhoneNumberCapabilities} capabilities -\n *          Indicate if a phone can receive calls or messages\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} identitySid -\n *          The SID of the Identity resource associated with number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} origin - The phone number's origin. Can be twilio or hosted.\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} smsApplicationSid -\n *          The SID of the application that handles SMS messages sent to the phone number\n * @property {string} smsFallbackMethod -\n *          The HTTP method used with sms_fallback_url\n * @property {string} smsFallbackUrl -\n *          The URL that we call when an error occurs while retrieving or executing the TwiML\n * @property {string} smsMethod - The HTTP method to use with sms_url\n * @property {string} smsUrl -\n *          The URL we call when the phone number receives an incoming SMS message\n * @property {string} statusCallback -\n *          The URL to send status information to your application\n * @property {string} statusCallbackMethod -\n *          The HTTP method we use to call status_callback\n * @property {string} trunkSid -\n *          The SID of the Trunk that handles calls to the phone number\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {incoming_phone_number.voice_receive_mode} voiceReceiveMode -\n *          The voice_receive_mode\n * @property {string} voiceApplicationSid -\n *          The SID of the application that handles calls to the phone number\n * @property {boolean} voiceCallerIdLookup - Whether to lookup the caller's name\n * @property {string} voiceFallbackMethod -\n *          The HTTP method used with voice_fallback_url\n * @property {string} voiceFallbackUrl -\n *          The URL we call when an error occurs in TwiML\n * @property {string} voiceMethod - The HTTP method used with the voice_url\n * @property {string} voiceUrl -\n *          The URL we call when the phone number receives a call\n * @property {incoming_phone_number.emergency_status} emergencyStatus -\n *          Displays if emergency calling is enabled for this number.\n * @property {string} emergencyAddressSid -\n *          The emergency address configuration to use for emergency calling\n * @property {incoming_phone_number.emergency_address_status} emergencyAddressStatus -\n *          State of the emergency address configuration for the phone number\n * @property {string} bundleSid -\n *          The SID of the Bundle resource associated with number\n * @property {string} status - The status\n *\n * @param {V2010} version - Version of the resource\n * @param {IncomingPhoneNumberPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nIncomingPhoneNumberInstance = function IncomingPhoneNumberInstance(version,\n    payload, accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.addressSid = payload.address_sid; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.identitySid = payload.identity_sid; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.origin = payload.origin; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.smsApplicationSid = payload.sms_application_sid; // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.voiceReceiveMode = payload.voice_receive_mode; // jshint ignore:line\n  this.voiceApplicationSid = payload.voice_application_sid; // jshint ignore:line\n  this.voiceCallerIdLookup = payload.voice_caller_id_lookup; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n  this.emergencyStatus = payload.emergency_status; // jshint ignore:line\n  this.emergencyAddressSid = payload.emergency_address_sid; // jshint ignore:line\n  this.emergencyAddressStatus = payload.emergency_address_status; // jshint ignore:line\n  this.bundleSid = payload.bundle_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(IncomingPhoneNumberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new IncomingPhoneNumberContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a IncomingPhoneNumberInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.accountSid] -\n *          The SID of the Account that created the resource to update\n * @param {string} [opts.apiVersion] -\n *          The API version to use for incoming calls made to the phone number\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.smsApplicationSid] -\n *          Unique string that identifies the application\n * @param {string} [opts.smsFallbackMethod] -\n *          HTTP method used with sms_fallback_url\n * @param {string} [opts.smsFallbackUrl] -\n *          The URL we call when an error occurs while executing TwiML\n * @param {string} [opts.smsMethod] - The HTTP method to use with sms_url\n * @param {string} [opts.smsUrl] -\n *          The URL we should call when the phone number receives an incoming SMS message\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback\n * @param {string} [opts.voiceApplicationSid] -\n *          The SID of the application to handle the phone number\n * @param {boolean} [opts.voiceCallerIdLookup] -\n *          Whether to lookup the caller's name\n * @param {string} [opts.voiceFallbackMethod] -\n *          The HTTP method used with fallback_url\n * @param {string} [opts.voiceFallbackUrl] -\n *          The URL we will call when an error occurs in TwiML\n * @param {string} [opts.voiceMethod] - The HTTP method used with the voice_url\n * @param {string} [opts.voiceUrl] -\n *          The URL we should call when the phone number receives a call\n * @param {incoming_phone_number.emergency_status} [opts.emergencyStatus] -\n *          Displays if emergency calling is enabled for this number.\n * @param {string} [opts.emergencyAddressSid] -\n *          The emergency address configuration to use for emergency calling\n * @param {string} [opts.trunkSid] -\n *          SID of the trunk to handle phone calls to the phone number\n * @param {incoming_phone_number.voice_receive_mode} [opts.voiceReceiveMode] -\n *          Incoming call type: fax or voice\n * @param {string} [opts.identitySid] -\n *          Unique string that identifies the identity associated with number\n * @param {string} [opts.addressSid] -\n *          The SID of the Address resource associated with the phone number\n * @param {string} [opts.bundleSid] -\n *          The SID of the Bundle resource associated with number\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance\n */\n/* jshint ignore:end */\nIncomingPhoneNumberInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a IncomingPhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance\n */\n/* jshint ignore:end */\nIncomingPhoneNumberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a IncomingPhoneNumberInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance\n */\n/* jshint ignore:end */\nIncomingPhoneNumberInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the assignedAddOns\n *\n * @function assignedAddOns\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList}\n */\n/* jshint ignore:end */\nIncomingPhoneNumberInstance.prototype.assignedAddOns = function assignedAddOns()\n    {\n  return this._proxy.assignedAddOns;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIncomingPhoneNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIncomingPhoneNumberInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IncomingPhoneNumberContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext\n *\n * @property {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.AssignedAddOnList} assignedAddOns -\n *          assignedAddOns resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nIncomingPhoneNumberContext = function IncomingPhoneNumberContext(version,\n    accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/IncomingPhoneNumbers/${sid}.json`;\n\n  // Dependents\n  this._assignedAddOns = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a IncomingPhoneNumberInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.accountSid] -\n *          The SID of the Account that created the resource to update\n * @param {string} [opts.apiVersion] -\n *          The API version to use for incoming calls made to the phone number\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.smsApplicationSid] -\n *          Unique string that identifies the application\n * @param {string} [opts.smsFallbackMethod] -\n *          HTTP method used with sms_fallback_url\n * @param {string} [opts.smsFallbackUrl] -\n *          The URL we call when an error occurs while executing TwiML\n * @param {string} [opts.smsMethod] - The HTTP method to use with sms_url\n * @param {string} [opts.smsUrl] -\n *          The URL we should call when the phone number receives an incoming SMS message\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback\n * @param {string} [opts.voiceApplicationSid] -\n *          The SID of the application to handle the phone number\n * @param {boolean} [opts.voiceCallerIdLookup] -\n *          Whether to lookup the caller's name\n * @param {string} [opts.voiceFallbackMethod] -\n *          The HTTP method used with fallback_url\n * @param {string} [opts.voiceFallbackUrl] -\n *          The URL we will call when an error occurs in TwiML\n * @param {string} [opts.voiceMethod] - The HTTP method used with the voice_url\n * @param {string} [opts.voiceUrl] -\n *          The URL we should call when the phone number receives a call\n * @param {incoming_phone_number.emergency_status} [opts.emergencyStatus] -\n *          Displays if emergency calling is enabled for this number.\n * @param {string} [opts.emergencyAddressSid] -\n *          The emergency address configuration to use for emergency calling\n * @param {string} [opts.trunkSid] -\n *          SID of the trunk to handle phone calls to the phone number\n * @param {incoming_phone_number.voice_receive_mode} [opts.voiceReceiveMode] -\n *          Incoming call type: fax or voice\n * @param {string} [opts.identitySid] -\n *          Unique string that identifies the identity associated with number\n * @param {string} [opts.addressSid] -\n *          The SID of the Address resource associated with the phone number\n * @param {string} [opts.bundleSid] -\n *          The SID of the Bundle resource associated with number\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance\n */\n/* jshint ignore:end */\nIncomingPhoneNumberContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'AccountSid': _.get(opts, 'accountSid'),\n    'ApiVersion': _.get(opts, 'apiVersion'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'SmsApplicationSid': _.get(opts, 'smsApplicationSid'),\n    'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n    'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n    'SmsMethod': _.get(opts, 'smsMethod'),\n    'SmsUrl': _.get(opts, 'smsUrl'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n    'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'),\n    'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')),\n    'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n    'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n    'VoiceMethod': _.get(opts, 'voiceMethod'),\n    'VoiceUrl': _.get(opts, 'voiceUrl'),\n    'EmergencyStatus': _.get(opts, 'emergencyStatus'),\n    'EmergencyAddressSid': _.get(opts, 'emergencyAddressSid'),\n    'TrunkSid': _.get(opts, 'trunkSid'),\n    'VoiceReceiveMode': _.get(opts, 'voiceReceiveMode'),\n    'IdentitySid': _.get(opts, 'identitySid'),\n    'AddressSid': _.get(opts, 'addressSid'),\n    'BundleSid': _.get(opts, 'bundleSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IncomingPhoneNumberInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a IncomingPhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance\n */\n/* jshint ignore:end */\nIncomingPhoneNumberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IncomingPhoneNumberInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a IncomingPhoneNumberInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IncomingPhoneNumberInstance\n */\n/* jshint ignore:end */\nIncomingPhoneNumberContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(IncomingPhoneNumberContext.prototype,\n  'assignedAddOns', {\n    get: function() {\n      if (!this._assignedAddOns) {\n        this._assignedAddOns = new AssignedAddOnList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n      return this._assignedAddOns;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIncomingPhoneNumberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nIncomingPhoneNumberContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  IncomingPhoneNumberList: IncomingPhoneNumberList,\n  IncomingPhoneNumberPage: IncomingPhoneNumberPage,\n  IncomingPhoneNumberInstance: IncomingPhoneNumberInstance,\n  IncomingPhoneNumberContext: IncomingPhoneNumberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar KeyList;\nvar KeyPage;\nvar KeyInstance;\nvar KeyContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the KeyList\n *\n * @constructor Twilio.Api.V2010.AccountContext.KeyList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nKeyList = function KeyList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function keys\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.KeyContext}\n   */\n  /* jshint ignore:end */\n  function KeyListInstance(sid) {\n    return KeyListInstance.get(sid);\n  }\n\n  KeyListInstance._version = version;\n  // Path Solution\n  KeyListInstance._solution = {accountSid: accountSid};\n  KeyListInstance._uri = `/Accounts/${accountSid}/Keys.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams KeyInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.KeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  KeyListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists KeyInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.KeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  KeyListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of KeyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.KeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  KeyListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new KeyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of KeyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.KeyList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  KeyListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new KeyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a key\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.KeyList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.KeyContext}\n   */\n  /* jshint ignore:end */\n  KeyListInstance.get = function get(sid) {\n    return new KeyContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.KeyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  KeyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  KeyListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return KeyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the KeyPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.KeyPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {KeySolution} solution - Path solution\n *\n * @returns KeyPage\n */\n/* jshint ignore:end */\nKeyPage = function KeyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(KeyPage.prototype, Page.prototype);\nKeyPage.prototype.constructor = KeyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of KeyInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.KeyPage#\n *\n * @param {KeyPayload} payload - Payload response from the API\n *\n * @returns KeyInstance\n */\n/* jshint ignore:end */\nKeyPage.prototype.getInstance = function getInstance(payload) {\n  return new KeyInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.KeyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nKeyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nKeyPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the KeyContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.KeyInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n *\n * @param {V2010} version - Version of the resource\n * @param {KeyPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nKeyInstance = function KeyInstance(version, payload, accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(KeyInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new KeyContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a KeyInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.KeyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a KeyInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.KeyInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a KeyInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.KeyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.KeyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nKeyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nKeyInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the KeyContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.KeyContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nKeyContext = function KeyContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Keys/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a KeyInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.KeyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new KeyInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a KeyInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.KeyContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new KeyInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a KeyInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.KeyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.KeyContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nKeyContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nKeyContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  KeyList: KeyList,\n  KeyPage: KeyPage,\n  KeyInstance: KeyInstance,\n  KeyContext: KeyContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar FeedbackList;\nvar FeedbackPage;\nvar FeedbackInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackList\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageContext.FeedbackList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} messageSid -\n *          The SID of the Message resource for which the feedback was provided\n */\n/* jshint ignore:end */\nFeedbackList = function FeedbackList(version, accountSid, messageSid) {\n  /* jshint ignore:start */\n  /**\n   * @function feedback\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.MessageContext.FeedbackContext}\n   */\n  /* jshint ignore:end */\n  function FeedbackListInstance(sid) {\n    return FeedbackListInstance.get(sid);\n  }\n\n  FeedbackListInstance._version = version;\n  // Path Solution\n  FeedbackListInstance._solution = {accountSid: accountSid, messageSid: messageSid};\n  FeedbackListInstance._uri = `/Accounts/${accountSid}/Messages/${messageSid}/Feedback.json`;\n  /* jshint ignore:start */\n  /**\n   * create a FeedbackInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext.FeedbackList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {feedback.outcome} [opts.outcome] - Whether the feedback has arrived\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FeedbackInstance\n   */\n  /* jshint ignore:end */\n  FeedbackListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'Outcome': _.get(opts, 'outcome')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FeedbackInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext.FeedbackList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FeedbackListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FeedbackListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FeedbackListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageContext.FeedbackPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FeedbackSolution} solution - Path solution\n *\n * @returns FeedbackPage\n */\n/* jshint ignore:end */\nFeedbackPage = function FeedbackPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FeedbackPage.prototype, Page.prototype);\nFeedbackPage.prototype.constructor = FeedbackPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FeedbackInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.FeedbackPage#\n *\n * @param {FeedbackPayload} payload - Payload response from the API\n *\n * @returns FeedbackInstance\n */\n/* jshint ignore:end */\nFeedbackPage.prototype.getInstance = function getInstance(payload) {\n  return new FeedbackInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.messageSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.FeedbackPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFeedbackPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFeedbackPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FeedbackContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageContext.FeedbackInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} messageSid -\n *          The SID of the Message resource for which the feedback was provided\n * @property {feedback.outcome} outcome - Whether the feedback has arrived\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {FeedbackPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} messageSid -\n *          The SID of the Message resource for which the feedback was provided\n */\n/* jshint ignore:end */\nFeedbackInstance = function FeedbackInstance(version, payload, accountSid,\n                                              messageSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.messageSid = payload.message_sid; // jshint ignore:line\n  this.outcome = payload.outcome; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, messageSid: messageSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.FeedbackInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFeedbackInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFeedbackInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FeedbackList: FeedbackList,\n  FeedbackPage: FeedbackPage,\n  FeedbackInstance: FeedbackInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MediaList;\nvar MediaPage;\nvar MediaInstance;\nvar MediaContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaList\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageContext.MediaList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n * @param {string} messageSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nMediaList = function MediaList(version, accountSid, messageSid) {\n  /* jshint ignore:start */\n  /**\n   * @function media\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.MessageContext.MediaContext}\n   */\n  /* jshint ignore:end */\n  function MediaListInstance(sid) {\n    return MediaListInstance.get(sid);\n  }\n\n  MediaListInstance._version = version;\n  // Path Solution\n  MediaListInstance._solution = {accountSid: accountSid, messageSid: messageSid};\n  MediaListInstance._uri = `/Accounts/${accountSid}/Messages/${messageSid}/Media.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams MediaInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Only include media that was created on this date\n   * @param {Date} [opts.dateCreated] -\n   *          Only include media that was created on this date\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Only include media that was created on this date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MediaListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MediaInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Only include media that was created on this date\n   * @param {Date} [opts.dateCreated] -\n   *          Only include media that was created on this date\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Only include media that was created on this date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MediaListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MediaInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Only include media that was created on this date\n   * @param {Date} [opts.dateCreated] -\n   *          Only include media that was created on this date\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Only include media that was created on this date\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MediaListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DateCreated<': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateCreated>': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MediaPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MediaInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MediaListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MediaPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a media\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaList#\n   *\n   * @param {string} sid - The unique string that identifies this resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.MessageContext.MediaContext}\n   */\n  /* jshint ignore:end */\n  MediaListInstance.get = function get(sid) {\n    return new MediaContext(this._version, this._solution.accountSid, this._solution.messageSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MediaListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MediaListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MediaListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageContext.MediaPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MediaSolution} solution - Path solution\n *\n * @returns MediaPage\n */\n/* jshint ignore:end */\nMediaPage = function MediaPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MediaPage.prototype, Page.prototype);\nMediaPage.prototype.constructor = MediaPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MediaInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaPage#\n *\n * @param {MediaPayload} payload - Payload response from the API\n *\n * @returns MediaInstance\n */\n/* jshint ignore:end */\nMediaPage.prototype.getInstance = function getInstance(payload) {\n  return new MediaInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.messageSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMediaPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMediaPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageContext.MediaInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that created this resource\n * @property {string} contentType - The default mime-type of the media\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that this resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that this resource was last updated\n * @property {string} parentSid - The SID of the resource that created the media\n * @property {string} sid - The unique string that identifies this resource\n * @property {string} uri -\n *          The URI of this resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {MediaPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} messageSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nMediaInstance = function MediaInstance(version, payload, accountSid, messageSid,\n                                        sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.contentType = payload.content_type; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.parentSid = payload.parent_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, messageSid: messageSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MediaInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MediaContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.messageSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a MediaInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaInstance\n */\n/* jshint ignore:end */\nMediaInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MediaInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaInstance\n */\n/* jshint ignore:end */\nMediaInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMediaInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMediaInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageContext.MediaContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource(s) to fetch\n * @param {sid} messageSid -\n *          The SID of the Message resource that this Media resource belongs to\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nMediaContext = function MediaContext(version, accountSid, messageSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, messageSid: messageSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Messages/${messageSid}/Media/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MediaInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaInstance\n */\n/* jshint ignore:end */\nMediaContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MediaInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaInstance\n */\n/* jshint ignore:end */\nMediaContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MediaInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.messageSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext.MediaContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMediaContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMediaContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MediaList: MediaList,\n  MediaPage: MediaPage,\n  MediaInstance: MediaInstance,\n  MediaContext: MediaContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar FeedbackList = require('./message/feedback').FeedbackList;\nvar MediaList = require('./message/media').MediaList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar MessageList;\nvar MessagePage;\nvar MessageInstance;\nvar MessageContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageList\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nMessageList = function MessageList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function messages\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  function MessageListInstance(sid) {\n    return MessageListInstance.get(sid);\n  }\n\n  MessageListInstance._version = version;\n  // Path Solution\n  MessageListInstance._solution = {accountSid: accountSid};\n  MessageListInstance._uri = `/Accounts/${accountSid}/Messages.json`;\n  /* jshint ignore:start */\n  /**\n   * create a MessageInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.MessageList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.to - The destination phone number\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string} [opts.applicationSid] - The application to use for callbacks\n   * @param {number} [opts.maxPrice] -\n   *          The total maximum price up to 4 decimal places in US dollars acceptable for the message to be delivered.\n   * @param {boolean} [opts.provideFeedback] -\n   *          Whether to confirm delivery of the message\n   * @param {number} [opts.attempt] -\n   *          Total numer of attempts made , this inclusive to send out the message\n   * @param {number} [opts.validityPeriod] -\n   *          The number of seconds that the message can remain in our outgoing queue.\n   * @param {boolean} [opts.forceDelivery] - Reserved\n   * @param {message.content_retention} [opts.contentRetention] -\n   *          Determines if the message content can be stored or redacted based on privacy settings\n   * @param {message.address_retention} [opts.addressRetention] -\n   *          Determines if the address can be stored or obfuscated based on privacy settings\n   * @param {boolean} [opts.smartEncoded] -\n   *          Whether to detect Unicode characters that have a similar GSM-7 character and replace them\n   * @param {string|list} [opts.persistentAction] -\n   *          Rich actions for Channels Messages.\n   * @param {message.schedule_type} [opts.scheduleType] -\n   *          Pass the value `fixed` to schedule a message at a fixed time.\n   * @param {Date} [opts.sendAt] -\n   *          The time that Twilio will send the message. Must be in ISO 8601 format.\n   * @param {boolean} [opts.sendAsMms] -\n   *          If set to True, Twilio will deliver the message as a single MMS message, regardless of the presence of media.\n   * @param {string} [opts.from] - The phone number that initiated the message\n   * @param {string} [opts.messagingServiceSid] -\n   *          The SID of the Messaging Service you want to associate with the message.\n   * @param {string} [opts.body] -\n   *          The text of the message you want to send. Can be up to 1,600 characters in length.\n   * @param {string|list} [opts.mediaUrl] -\n   *          The URL of the media to send with the message\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MessageInstance\n   */\n  /* jshint ignore:end */\n  MessageListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['to'])) {\n      throw new Error('Required parameter \"opts[\\'to\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'To': _.get(opts, 'to'),\n      'From': _.get(opts, 'from'),\n      'MessagingServiceSid': _.get(opts, 'messagingServiceSid'),\n      'Body': _.get(opts, 'body'),\n      'MediaUrl': serialize.map(_.get(opts, 'mediaUrl'), function(e) { return e; }),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'ApplicationSid': _.get(opts, 'applicationSid'),\n      'MaxPrice': _.get(opts, 'maxPrice'),\n      'ProvideFeedback': serialize.bool(_.get(opts, 'provideFeedback')),\n      'Attempt': _.get(opts, 'attempt'),\n      'ValidityPeriod': _.get(opts, 'validityPeriod'),\n      'ForceDelivery': serialize.bool(_.get(opts, 'forceDelivery')),\n      'ContentRetention': _.get(opts, 'contentRetention'),\n      'AddressRetention': _.get(opts, 'addressRetention'),\n      'SmartEncoded': serialize.bool(_.get(opts, 'smartEncoded')),\n      'PersistentAction': serialize.map(_.get(opts, 'persistentAction'), function(e) { return e; }),\n      'ScheduleType': _.get(opts, 'scheduleType'),\n      'SendAt': serialize.iso8601DateTime(_.get(opts, 'sendAt')),\n      'SendAsMms': serialize.bool(_.get(opts, 'sendAsMms'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MessageInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.to] - Filter by messages sent to this number\n   * @param {string} [opts.from] - Filter by from number\n   * @param {Date} [opts.dateSentBefore] - Filter by date sent\n   * @param {Date} [opts.dateSent] - Filter by date sent\n   * @param {Date} [opts.dateSentAfter] - Filter by date sent\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MessageListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MessageInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.to] - Filter by messages sent to this number\n   * @param {string} [opts.from] - Filter by from number\n   * @param {Date} [opts.dateSentBefore] - Filter by date sent\n   * @param {Date} [opts.dateSent] - Filter by date sent\n   * @param {Date} [opts.dateSentAfter] - Filter by date sent\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.to] - Filter by messages sent to this number\n   * @param {string} [opts.from] - Filter by from number\n   * @param {Date} [opts.dateSentBefore] - Filter by date sent\n   * @param {Date} [opts.dateSent] - Filter by date sent\n   * @param {Date} [opts.dateSentAfter] - Filter by date sent\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'To': _.get(opts, 'to'),\n      'From': _.get(opts, 'from'),\n      'DateSent<': serialize.iso8601DateTime(_.get(opts, 'dateSentBefore')),\n      'DateSent': serialize.iso8601DateTime(_.get(opts, 'dateSent')),\n      'DateSent>': serialize.iso8601DateTime(_.get(opts, 'dateSentAfter')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.MessageList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a message\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.MessageList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  MessageListInstance.get = function get(sid) {\n    return new MessageContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.MessageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessageListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessageListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessagePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessageSolution} solution - Path solution\n *\n * @returns MessagePage\n */\n/* jshint ignore:end */\nMessagePage = function MessagePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessagePage.prototype, Page.prototype);\nMessagePage.prototype.constructor = MessagePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessageInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.MessagePage#\n *\n * @param {MessagePayload} payload - Payload response from the API\n *\n * @returns MessageInstance\n */\n/* jshint ignore:end */\nMessagePage.prototype.getInstance = function getInstance(payload) {\n  return new MessageInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.MessagePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageInstance\n *\n * @property {string} body - The message text\n * @property {string} numSegments -\n *          The number of messages used to deliver the message body\n * @property {message.direction} direction - The direction of the message\n * @property {string} from - The phone number that initiated the message\n * @property {string} to - The phone number that received the message\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} price - The amount billed for the message\n * @property {string} errorMessage - The description of the error_code\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} numMedia -\n *          The number of media files associated with the message\n * @property {message.status} status - The status of the message\n * @property {string} messagingServiceSid -\n *          The SID of the Messaging Service used with the message.\n * @property {string} sid - The unique string that identifies the resource\n * @property {Date} dateSent -\n *          The RFC 2822 date and time in GMT when the message was sent\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {number} errorCode - The error code associated with the message\n * @property {string} priceUnit - The currency in which price is measured\n * @property {string} apiVersion - The API version used to process the message\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n *\n * @param {V2010} version - Version of the resource\n * @param {MessagePayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nMessageInstance = function MessageInstance(version, payload, accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.body = payload.body; // jshint ignore:line\n  this.numSegments = payload.num_segments; // jshint ignore:line\n  this.direction = payload.direction; // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.price = payload.price; // jshint ignore:line\n  this.errorMessage = payload.error_message; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.numMedia = payload.num_media; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.dateSent = deserialize.rfc2822DateTime(payload.date_sent); // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MessageInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MessageContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The text of the message you want to send\n * @param {message.update_status} [opts.status] -\n *          Set as `canceled` to cancel a message from being sent.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the media\n *\n * @function media\n * @memberof Twilio.Api.V2010.AccountContext.MessageInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.MessageContext.MediaList}\n */\n/* jshint ignore:end */\nMessageInstance.prototype.media = function media() {\n  return this._proxy.media;\n};\n\n/* jshint ignore:start */\n/**\n * Access the feedback\n *\n * @function feedback\n * @memberof Twilio.Api.V2010.AccountContext.MessageInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.MessageContext.FeedbackList}\n */\n/* jshint ignore:end */\nMessageInstance.prototype.feedback = function feedback() {\n  return this._proxy.feedback;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.MessageInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessageInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.MessageContext\n *\n * @property {Twilio.Api.V2010.AccountContext.MessageContext.MediaList} media -\n *          media resource\n * @property {Twilio.Api.V2010.AccountContext.MessageContext.FeedbackList} feedback -\n *          feedback resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nMessageContext = function MessageContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Messages/${sid}.json`;\n\n  // Dependents\n  this._media = undefined;\n  this._feedback = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The text of the message you want to send\n * @param {message.update_status} [opts.status] -\n *          Set as `canceled` to cancel a message from being sent.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Body': _.get(opts, 'body'), 'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(MessageContext.prototype,\n  'media', {\n    get: function() {\n      if (!this._media) {\n        this._media = new MediaList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._media;\n    }\n});\n\nObject.defineProperty(MessageContext.prototype,\n  'feedback', {\n    get: function() {\n      if (!this._feedback) {\n        this._feedback = new FeedbackList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._feedback;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.MessageContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMessageContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessageList: MessageList,\n  MessagePage: MessagePage,\n  MessageInstance: MessageInstance,\n  MessageContext: MessageContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar NewKeyList;\nvar NewKeyPage;\nvar NewKeyInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the NewKeyList\n *\n * @constructor Twilio.Api.V2010.AccountContext.NewKeyList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nNewKeyList = function NewKeyList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function newKeys\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.NewKeyContext}\n   */\n  /* jshint ignore:end */\n  function NewKeyListInstance(sid) {\n    return NewKeyListInstance.get(sid);\n  }\n\n  NewKeyListInstance._version = version;\n  // Path Solution\n  NewKeyListInstance._solution = {accountSid: accountSid};\n  NewKeyListInstance._uri = `/Accounts/${accountSid}/Keys.json`;\n  /* jshint ignore:start */\n  /**\n   * create a NewKeyInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.NewKeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed NewKeyInstance\n   */\n  /* jshint ignore:end */\n  NewKeyListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NewKeyInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.NewKeyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NewKeyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NewKeyListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NewKeyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NewKeyPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.NewKeyPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NewKeySolution} solution - Path solution\n *\n * @returns NewKeyPage\n */\n/* jshint ignore:end */\nNewKeyPage = function NewKeyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NewKeyPage.prototype, Page.prototype);\nNewKeyPage.prototype.constructor = NewKeyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NewKeyInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.NewKeyPage#\n *\n * @param {NewKeyPayload} payload - Payload response from the API\n *\n * @returns NewKeyInstance\n */\n/* jshint ignore:end */\nNewKeyPage.prototype.getInstance = function getInstance(payload) {\n  return new NewKeyInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.NewKeyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNewKeyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNewKeyPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NewKeyContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.NewKeyInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} secret -\n *          The secret your application uses to sign Access Tokens and to authenticate to the REST API.\n *\n * @param {V2010} version - Version of the resource\n * @param {NewKeyPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nNewKeyInstance = function NewKeyInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.secret = payload.secret; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.NewKeyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNewKeyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNewKeyInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NewKeyList: NewKeyList,\n  NewKeyPage: NewKeyPage,\n  NewKeyInstance: NewKeyInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar NewSigningKeyList;\nvar NewSigningKeyPage;\nvar NewSigningKeyInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the NewSigningKeyList\n *\n * @constructor Twilio.Api.V2010.AccountContext.NewSigningKeyList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nNewSigningKeyList = function NewSigningKeyList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function newSigningKeys\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.NewSigningKeyContext}\n   */\n  /* jshint ignore:end */\n  function NewSigningKeyListInstance(sid) {\n    return NewSigningKeyListInstance.get(sid);\n  }\n\n  NewSigningKeyListInstance._version = version;\n  // Path Solution\n  NewSigningKeyListInstance._solution = {accountSid: accountSid};\n  NewSigningKeyListInstance._uri = `/Accounts/${accountSid}/SigningKeys.json`;\n  /* jshint ignore:start */\n  /**\n   * create a NewSigningKeyInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.NewSigningKeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed NewSigningKeyInstance\n   */\n  /* jshint ignore:end */\n  NewSigningKeyListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NewSigningKeyInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.NewSigningKeyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NewSigningKeyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NewSigningKeyListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NewSigningKeyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NewSigningKeyPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.NewSigningKeyPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NewSigningKeySolution} solution - Path solution\n *\n * @returns NewSigningKeyPage\n */\n/* jshint ignore:end */\nNewSigningKeyPage = function NewSigningKeyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NewSigningKeyPage.prototype, Page.prototype);\nNewSigningKeyPage.prototype.constructor = NewSigningKeyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NewSigningKeyInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.NewSigningKeyPage#\n *\n * @param {NewSigningKeyPayload} payload - Payload response from the API\n *\n * @returns NewSigningKeyInstance\n */\n/* jshint ignore:end */\nNewSigningKeyPage.prototype.getInstance = function getInstance(payload) {\n  return new NewSigningKeyInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.NewSigningKeyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNewSigningKeyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNewSigningKeyPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NewSigningKeyContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.NewSigningKeyInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} secret -\n *          The secret your application uses to sign Access Tokens and to authenticate to the REST API.\n *\n * @param {V2010} version - Version of the resource\n * @param {NewSigningKeyPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nNewSigningKeyInstance = function NewSigningKeyInstance(version, payload,\n                                                        accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.secret = payload.secret; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.NewSigningKeyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNewSigningKeyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNewSigningKeyInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NewSigningKeyList: NewSigningKeyList,\n  NewSigningKeyPage: NewSigningKeyPage,\n  NewSigningKeyInstance: NewSigningKeyInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar NotificationList;\nvar NotificationPage;\nvar NotificationInstance;\nvar NotificationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationList\n *\n * @constructor Twilio.Api.V2010.AccountContext.NotificationList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nNotificationList = function NotificationList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function notifications\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.NotificationContext}\n   */\n  /* jshint ignore:end */\n  function NotificationListInstance(sid) {\n    return NotificationListInstance.get(sid);\n  }\n\n  NotificationListInstance._version = version;\n  // Path Solution\n  NotificationListInstance._solution = {accountSid: accountSid};\n  NotificationListInstance._uri = `/Accounts/${accountSid}/Notifications.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams NotificationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.NotificationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.log] - Filter by log level\n   * @param {Date} [opts.messageDateBefore] - Filter by date\n   * @param {Date} [opts.messageDate] - Filter by date\n   * @param {Date} [opts.messageDateAfter] - Filter by date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists NotificationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.NotificationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.log] - Filter by log level\n   * @param {Date} [opts.messageDateBefore] - Filter by date\n   * @param {Date} [opts.messageDate] - Filter by date\n   * @param {Date} [opts.messageDateAfter] - Filter by date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of NotificationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.NotificationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.log] - Filter by log level\n   * @param {Date} [opts.messageDateBefore] - Filter by date\n   * @param {Date} [opts.messageDate] - Filter by date\n   * @param {Date} [opts.messageDateAfter] - Filter by date\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Log': _.get(opts, 'log'),\n      'MessageDate<': serialize.iso8601Date(_.get(opts, 'messageDateBefore')),\n      'MessageDate': serialize.iso8601Date(_.get(opts, 'messageDate')),\n      'MessageDate>': serialize.iso8601Date(_.get(opts, 'messageDateAfter')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NotificationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of NotificationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.NotificationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NotificationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a notification\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.NotificationList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.NotificationContext}\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.get = function get(sid) {\n    return new NotificationContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.NotificationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NotificationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NotificationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.NotificationPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NotificationSolution} solution - Path solution\n *\n * @returns NotificationPage\n */\n/* jshint ignore:end */\nNotificationPage = function NotificationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NotificationPage.prototype, Page.prototype);\nNotificationPage.prototype.constructor = NotificationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NotificationInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.NotificationPage#\n *\n * @param {NotificationPayload} payload - Payload response from the API\n *\n * @returns NotificationInstance\n */\n/* jshint ignore:end */\nNotificationPage.prototype.getInstance = function getInstance(payload) {\n  return new NotificationInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.NotificationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.NotificationInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} apiVersion -\n *          The API version used to generate the notification\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} errorCode -\n *          A unique error code corresponding to the notification\n * @property {string} log - An integer log level\n * @property {Date} messageDate - The date the notification was generated\n * @property {string} messageText - The text of the notification\n * @property {string} moreInfo - A URL for more information about the error code\n * @property {string} requestMethod - HTTP method used with the request url\n * @property {string} requestUrl -\n *          URL of the resource that generated the notification\n * @property {string} requestVariables -\n *          Twilio-generated HTTP variables sent to the server\n * @property {string} responseBody - The HTTP body returned by your server\n * @property {string} responseHeaders - The HTTP headers returned by your server\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {NotificationPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nNotificationInstance = function NotificationInstance(version, payload,\n                                                      accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.errorCode = payload.error_code; // jshint ignore:line\n  this.log = payload.log; // jshint ignore:line\n  this.messageDate = deserialize.rfc2822DateTime(payload.message_date); // jshint ignore:line\n  this.messageText = payload.message_text; // jshint ignore:line\n  this.moreInfo = payload.more_info; // jshint ignore:line\n  this.requestMethod = payload.request_method; // jshint ignore:line\n  this.requestUrl = payload.request_url; // jshint ignore:line\n  this.requestVariables = payload.request_variables; // jshint ignore:line\n  this.responseBody = payload.response_body; // jshint ignore:line\n  this.responseHeaders = payload.response_headers; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(NotificationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new NotificationContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a NotificationInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.NotificationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NotificationInstance\n */\n/* jshint ignore:end */\nNotificationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.NotificationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.NotificationContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nNotificationContext = function NotificationContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Notifications/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NotificationInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.NotificationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NotificationInstance\n */\n/* jshint ignore:end */\nNotificationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NotificationInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.NotificationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nNotificationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NotificationList: NotificationList,\n  NotificationPage: NotificationPage,\n  NotificationInstance: NotificationInstance,\n  NotificationContext: NotificationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar OutgoingCallerIdList;\nvar OutgoingCallerIdPage;\nvar OutgoingCallerIdInstance;\nvar OutgoingCallerIdContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the OutgoingCallerIdList\n *\n * @constructor Twilio.Api.V2010.AccountContext.OutgoingCallerIdList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nOutgoingCallerIdList = function OutgoingCallerIdList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function outgoingCallerIds\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.OutgoingCallerIdContext}\n   */\n  /* jshint ignore:end */\n  function OutgoingCallerIdListInstance(sid) {\n    return OutgoingCallerIdListInstance.get(sid);\n  }\n\n  OutgoingCallerIdListInstance._version = version;\n  // Path Solution\n  OutgoingCallerIdListInstance._solution = {accountSid: accountSid};\n  OutgoingCallerIdListInstance._uri = `/Accounts/${accountSid}/OutgoingCallerIds.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams OutgoingCallerIdInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.phoneNumber] -\n   *          The phone number of the OutgoingCallerId resources to read\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the OutgoingCallerId resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  OutgoingCallerIdListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists OutgoingCallerIdInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.phoneNumber] -\n   *          The phone number of the OutgoingCallerId resources to read\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the OutgoingCallerId resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  OutgoingCallerIdListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of OutgoingCallerIdInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.phoneNumber] -\n   *          The phone number of the OutgoingCallerId resources to read\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the OutgoingCallerId resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  OutgoingCallerIdListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new OutgoingCallerIdPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of OutgoingCallerIdInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  OutgoingCallerIdListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new OutgoingCallerIdPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a outgoing_caller_id\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.OutgoingCallerIdContext}\n   */\n  /* jshint ignore:end */\n  OutgoingCallerIdListInstance.get = function get(sid) {\n    return new OutgoingCallerIdContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  OutgoingCallerIdListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  OutgoingCallerIdListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return OutgoingCallerIdListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the OutgoingCallerIdPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.OutgoingCallerIdPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {OutgoingCallerIdSolution} solution - Path solution\n *\n * @returns OutgoingCallerIdPage\n */\n/* jshint ignore:end */\nOutgoingCallerIdPage = function OutgoingCallerIdPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(OutgoingCallerIdPage.prototype, Page.prototype);\nOutgoingCallerIdPage.prototype.constructor = OutgoingCallerIdPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of OutgoingCallerIdInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdPage#\n *\n * @param {OutgoingCallerIdPayload} payload - Payload response from the API\n *\n * @returns OutgoingCallerIdInstance\n */\n/* jshint ignore:end */\nOutgoingCallerIdPage.prototype.getInstance = function getInstance(payload) {\n  return new OutgoingCallerIdInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nOutgoingCallerIdPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nOutgoingCallerIdPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the OutgoingCallerIdContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.OutgoingCallerIdInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {OutgoingCallerIdPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nOutgoingCallerIdInstance = function OutgoingCallerIdInstance(version, payload,\n    accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(OutgoingCallerIdInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new OutgoingCallerIdContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a OutgoingCallerIdInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OutgoingCallerIdInstance\n */\n/* jshint ignore:end */\nOutgoingCallerIdInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a OutgoingCallerIdInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OutgoingCallerIdInstance\n */\n/* jshint ignore:end */\nOutgoingCallerIdInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a OutgoingCallerIdInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OutgoingCallerIdInstance\n */\n/* jshint ignore:end */\nOutgoingCallerIdInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nOutgoingCallerIdInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nOutgoingCallerIdInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the OutgoingCallerIdContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.OutgoingCallerIdContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nOutgoingCallerIdContext = function OutgoingCallerIdContext(version, accountSid,\n                                                            sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/OutgoingCallerIds/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a OutgoingCallerIdInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OutgoingCallerIdInstance\n */\n/* jshint ignore:end */\nOutgoingCallerIdContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new OutgoingCallerIdInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a OutgoingCallerIdInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OutgoingCallerIdInstance\n */\n/* jshint ignore:end */\nOutgoingCallerIdContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new OutgoingCallerIdInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a OutgoingCallerIdInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OutgoingCallerIdInstance\n */\n/* jshint ignore:end */\nOutgoingCallerIdContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.OutgoingCallerIdContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nOutgoingCallerIdContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nOutgoingCallerIdContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  OutgoingCallerIdList: OutgoingCallerIdList,\n  OutgoingCallerIdPage: OutgoingCallerIdPage,\n  OutgoingCallerIdInstance: OutgoingCallerIdInstance,\n  OutgoingCallerIdContext: OutgoingCallerIdContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MemberList;\nvar MemberPage;\nvar MemberInstance;\nvar MemberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberList\n *\n * @constructor Twilio.Api.V2010.AccountContext.QueueContext.MemberList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n * @param {string} queueSid - The SID of the Queue the member is in\n */\n/* jshint ignore:end */\nMemberList = function MemberList(version, accountSid, queueSid) {\n  /* jshint ignore:start */\n  /**\n   * @function members\n   * @memberof Twilio.Api.V2010.AccountContext.QueueContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.QueueContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  function MemberListInstance(sid) {\n    return MemberListInstance.get(sid);\n  }\n\n  MemberListInstance._version = version;\n  // Path Solution\n  MemberListInstance._solution = {accountSid: accountSid, queueSid: queueSid};\n  MemberListInstance._uri = `/Accounts/${accountSid}/Queues/${queueSid}/Members.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams MemberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MemberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MemberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a member\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberList#\n   *\n   * @param {string} callSid - The Call SID of the resource(s) to fetch\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.QueueContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  MemberListInstance.get = function get(callSid) {\n    return new MemberContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.queueSid,\n      callSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MemberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MemberListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MemberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.QueueContext.MemberPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MemberSolution} solution - Path solution\n *\n * @returns MemberPage\n */\n/* jshint ignore:end */\nMemberPage = function MemberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MemberPage.prototype, Page.prototype);\nMemberPage.prototype.constructor = MemberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MemberInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberPage#\n *\n * @param {MemberPayload} payload - Payload response from the API\n *\n * @returns MemberInstance\n */\n/* jshint ignore:end */\nMemberPage.prototype.getInstance = function getInstance(payload) {\n  return new MemberInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.queueSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.QueueContext.MemberInstance\n *\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {Date} dateEnqueued - The date the member was enqueued\n * @property {number} position - This member's current position in the queue.\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {number} waitTime -\n *          The number of seconds the member has been in the queue.\n * @property {string} queueSid - The SID of the Queue the member is in\n *\n * @param {V2010} version - Version of the resource\n * @param {MemberPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} queueSid - The SID of the Queue the member is in\n * @param {sid_like} callSid - The Call SID of the resource(s) to fetch\n */\n/* jshint ignore:end */\nMemberInstance = function MemberInstance(version, payload, accountSid, queueSid,\n                                          callSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.dateEnqueued = deserialize.rfc2822DateTime(payload.date_enqueued); // jshint ignore:line\n  this.position = deserialize.integer(payload.position); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.waitTime = deserialize.integer(payload.wait_time); // jshint ignore:line\n  this.queueSid = payload.queue_sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, queueSid: queueSid, callSid: callSid || this.callSid, };\n};\n\nObject.defineProperty(MemberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MemberContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.queueSid,\n          this._solution.callSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.url - The absolute URL of the Queue resource\n * @param {string} [opts.method] - How to pass the update request data\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.QueueContext.MemberContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource(s) to fetch\n * @param {sid} queueSid - The SID of the Queue in which to find the members\n * @param {sid_like} callSid - The Call SID of the resource(s) to fetch\n */\n/* jshint ignore:end */\nMemberContext = function MemberContext(version, accountSid, queueSid, callSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, queueSid: queueSid, callSid: callSid, };\n  this._uri = `/Accounts/${accountSid}/Queues/${queueSid}/Members/${callSid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.queueSid,\n      this._solution.callSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.url - The absolute URL of the Queue resource\n * @param {string} [opts.method] - How to pass the update request data\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['url'])) {\n    throw new Error('Required parameter \"opts[\\'url\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Url': _.get(opts, 'url'), 'Method': _.get(opts, 'method')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.queueSid,\n      this._solution.callSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext.MemberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMemberContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MemberList: MemberList,\n  MemberPage: MemberPage,\n  MemberInstance: MemberInstance,\n  MemberContext: MemberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar MemberList = require('./queue/member').MemberList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar QueueList;\nvar QueuePage;\nvar QueueInstance;\nvar QueueContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the QueueList\n *\n * @constructor Twilio.Api.V2010.AccountContext.QueueList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n */\n/* jshint ignore:end */\nQueueList = function QueueList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function queues\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.QueueContext}\n   */\n  /* jshint ignore:end */\n  function QueueListInstance(sid) {\n    return QueueListInstance.get(sid);\n  }\n\n  QueueListInstance._version = version;\n  // Path Solution\n  QueueListInstance._solution = {accountSid: accountSid};\n  QueueListInstance._uri = `/Accounts/${accountSid}/Queues.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams QueueInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.QueueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  QueueListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists QueueInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.QueueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  QueueListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of QueueInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.QueueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  QueueListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new QueuePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of QueueInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.QueueList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  QueueListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new QueuePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a QueueInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.QueueList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe this resource\n   * @param {number} [opts.maxSize] - The max number of calls allowed in the queue\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed QueueInstance\n   */\n  /* jshint ignore:end */\n  QueueListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'MaxSize': _.get(opts, 'maxSize')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new QueueInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a queue\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.QueueList#\n   *\n   * @param {string} sid - The unique string that identifies this resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.QueueContext}\n   */\n  /* jshint ignore:end */\n  QueueListInstance.get = function get(sid) {\n    return new QueueContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.QueueList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  QueueListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  QueueListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return QueueListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the QueuePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.QueuePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {QueueSolution} solution - Path solution\n *\n * @returns QueuePage\n */\n/* jshint ignore:end */\nQueuePage = function QueuePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(QueuePage.prototype, Page.prototype);\nQueuePage.prototype.constructor = QueuePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of QueueInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.QueuePage#\n *\n * @param {QueuePayload} payload - Payload response from the API\n *\n * @returns QueueInstance\n */\n/* jshint ignore:end */\nQueuePage.prototype.getInstance = function getInstance(payload) {\n  return new QueueInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.QueuePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nQueuePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nQueuePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the QueueContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.QueueInstance\n *\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that this resource was last updated\n * @property {number} currentSize - The number of calls currently in the queue.\n * @property {string} friendlyName -\n *          A string that you assigned to describe this resource\n * @property {string} uri -\n *          The URI of this resource, relative to `https://api.twilio.com`\n * @property {string} accountSid -\n *          The SID of the Account that created this resource\n * @property {number} averageWaitTime - Average wait time of members in the queue\n * @property {string} sid - The unique string that identifies this resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that this resource was created\n * @property {number} maxSize - The max number of calls allowed in the queue\n *\n * @param {V2010} version - Version of the resource\n * @param {QueuePayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nQueueInstance = function QueueInstance(version, payload, accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.currentSize = deserialize.integer(payload.current_size); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.averageWaitTime = deserialize.integer(payload.average_wait_time); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.maxSize = deserialize.integer(payload.max_size); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(QueueInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new QueueContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a QueueInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.QueueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueueInstance\n */\n/* jshint ignore:end */\nQueueInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a QueueInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.QueueInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe this resource\n * @param {number} [opts.maxSize] - The max number of calls allowed in the queue\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueueInstance\n */\n/* jshint ignore:end */\nQueueInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a QueueInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.QueueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueueInstance\n */\n/* jshint ignore:end */\nQueueInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the members\n *\n * @function members\n * @memberof Twilio.Api.V2010.AccountContext.QueueInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.QueueContext.MemberList}\n */\n/* jshint ignore:end */\nQueueInstance.prototype.members = function members() {\n  return this._proxy.members;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.QueueInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nQueueInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nQueueInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the QueueContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.QueueContext\n *\n * @property {Twilio.Api.V2010.AccountContext.QueueContext.MemberList} members -\n *          members resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource(s) to fetch\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nQueueContext = function QueueContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Queues/${sid}.json`;\n\n  // Dependents\n  this._members = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a QueueInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueueInstance\n */\n/* jshint ignore:end */\nQueueContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new QueueInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a QueueInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe this resource\n * @param {number} [opts.maxSize] - The max number of calls allowed in the queue\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueueInstance\n */\n/* jshint ignore:end */\nQueueContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'MaxSize': _.get(opts, 'maxSize')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new QueueInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a QueueInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueueInstance\n */\n/* jshint ignore:end */\nQueueContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(QueueContext.prototype,\n  'members', {\n    get: function() {\n      if (!this._members) {\n        this._members = new MemberList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._members;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.QueueContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nQueueContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nQueueContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  QueueList: QueueList,\n  QueuePage: QueuePage,\n  QueueInstance: QueueInstance,\n  QueueContext: QueueContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar PayloadList;\nvar PayloadPage;\nvar PayloadInstance;\nvar PayloadContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PayloadList\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} referenceSid -\n *          The SID of the recording to which the AddOnResult resource that contains the payload belongs\n * @param {string} addOnResultSid -\n *          The SID of the AddOnResult to which the payload belongs\n */\n/* jshint ignore:end */\nPayloadList = function PayloadList(version, accountSid, referenceSid,\n                                    addOnResultSid) {\n  /* jshint ignore:start */\n  /**\n   * @function payloads\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadContext}\n   */\n  /* jshint ignore:end */\n  function PayloadListInstance(sid) {\n    return PayloadListInstance.get(sid);\n  }\n\n  PayloadListInstance._version = version;\n  // Path Solution\n  PayloadListInstance._solution = {\n    accountSid: accountSid,\n    referenceSid: referenceSid,\n    addOnResultSid: addOnResultSid\n  };\n  PayloadListInstance._uri = `/Accounts/${accountSid}/Recordings/${referenceSid}/AddOnResults/${addOnResultSid}/Payloads.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams PayloadInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  PayloadListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists PayloadInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PayloadListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of PayloadInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PayloadListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PayloadPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of PayloadInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PayloadListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PayloadPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a payload\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadList#\n   *\n   * @param {string} sid - The unique string that identifies the resource to fetch\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadContext}\n   */\n  /* jshint ignore:end */\n  PayloadListInstance.get = function get(sid) {\n    return new PayloadContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.referenceSid,\n      this._solution.addOnResultSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PayloadListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PayloadListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PayloadListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PayloadPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PayloadSolution} solution - Path solution\n *\n * @returns PayloadPage\n */\n/* jshint ignore:end */\nPayloadPage = function PayloadPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PayloadPage.prototype, Page.prototype);\nPayloadPage.prototype.constructor = PayloadPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PayloadInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadPage#\n *\n * @param {PayloadPayload} payload - Payload response from the API\n *\n * @returns PayloadInstance\n */\n/* jshint ignore:end */\nPayloadPage.prototype.getInstance = function getInstance(payload) {\n  return new PayloadInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.referenceSid,\n    this._solution.addOnResultSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPayloadPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPayloadPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PayloadContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} addOnResultSid -\n *          The SID of the AddOnResult to which the payload belongs\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} label - The string that describes the payload\n * @property {string} addOnSid - The SID of the Add-on to which the result belongs\n * @property {string} addOnConfigurationSid - The SID of the Add-on configuration\n * @property {string} contentType - The MIME type of the payload\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} referenceSid -\n *          The SID of the recording to which the AddOnResult resource that contains the payload belongs\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n *\n * @param {V2010} version - Version of the resource\n * @param {PayloadPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} referenceSid -\n *          The SID of the recording to which the AddOnResult resource that contains the payload belongs\n * @param {sid} addOnResultSid -\n *          The SID of the AddOnResult to which the payload belongs\n * @param {sid} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nPayloadInstance = function PayloadInstance(version, payload, accountSid,\n                                            referenceSid, addOnResultSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.addOnResultSid = payload.add_on_result_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.label = payload.label; // jshint ignore:line\n  this.addOnSid = payload.add_on_sid; // jshint ignore:line\n  this.addOnConfigurationSid = payload.add_on_configuration_sid; // jshint ignore:line\n  this.contentType = payload.content_type; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.referenceSid = payload.reference_sid; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    accountSid: accountSid,\n    referenceSid: referenceSid,\n    addOnResultSid: addOnResultSid,\n    sid: sid || this.sid,\n  };\n};\n\nObject.defineProperty(PayloadInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PayloadContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.referenceSid,\n          this._solution.addOnResultSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a PayloadInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PayloadInstance\n */\n/* jshint ignore:end */\nPayloadInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a PayloadInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PayloadInstance\n */\n/* jshint ignore:end */\nPayloadInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPayloadInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPayloadInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PayloadContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} referenceSid -\n *          The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs\n * @param {sid} addOnResultSid -\n *          The SID of the AddOnResult to which the payload to fetch belongs\n * @param {sid} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nPayloadContext = function PayloadContext(version, accountSid, referenceSid,\n                                          addOnResultSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {\n    accountSid: accountSid,\n    referenceSid: referenceSid,\n    addOnResultSid: addOnResultSid,\n    sid: sid,\n  };\n  this._uri = `/Accounts/${accountSid}/Recordings/${referenceSid}/AddOnResults/${addOnResultSid}/Payloads/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PayloadInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PayloadInstance\n */\n/* jshint ignore:end */\nPayloadContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PayloadInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.referenceSid,\n      this._solution.addOnResultSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a PayloadInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PayloadInstance\n */\n/* jshint ignore:end */\nPayloadContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPayloadContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPayloadContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PayloadList: PayloadList,\n  PayloadPage: PayloadPage,\n  PayloadInstance: PayloadInstance,\n  PayloadContext: PayloadContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar PayloadList = require('./addOnResult/payload').PayloadList;\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar AddOnResultList;\nvar AddOnResultPage;\nvar AddOnResultInstance;\nvar AddOnResultContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AddOnResultList\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} referenceSid -\n *          The SID of the recording to which the AddOnResult resource belongs\n */\n/* jshint ignore:end */\nAddOnResultList = function AddOnResultList(version, accountSid, referenceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function addOnResults\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext}\n   */\n  /* jshint ignore:end */\n  function AddOnResultListInstance(sid) {\n    return AddOnResultListInstance.get(sid);\n  }\n\n  AddOnResultListInstance._version = version;\n  // Path Solution\n  AddOnResultListInstance._solution = {accountSid: accountSid, referenceSid: referenceSid};\n  AddOnResultListInstance._uri = `/Accounts/${accountSid}/Recordings/${referenceSid}/AddOnResults.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams AddOnResultInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AddOnResultListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AddOnResultInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AddOnResultListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AddOnResultInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AddOnResultListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AddOnResultPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AddOnResultInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AddOnResultListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AddOnResultPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a add_on_result\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultList#\n   *\n   * @param {string} sid - The unique string that identifies the resource to fetch\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext}\n   */\n  /* jshint ignore:end */\n  AddOnResultListInstance.get = function get(sid) {\n    return new AddOnResultContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.referenceSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AddOnResultListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AddOnResultListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AddOnResultListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AddOnResultPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AddOnResultSolution} solution - Path solution\n *\n * @returns AddOnResultPage\n */\n/* jshint ignore:end */\nAddOnResultPage = function AddOnResultPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AddOnResultPage.prototype, Page.prototype);\nAddOnResultPage.prototype.constructor = AddOnResultPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AddOnResultInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultPage#\n *\n * @param {AddOnResultPayload} payload - Payload response from the API\n *\n * @returns AddOnResultInstance\n */\n/* jshint ignore:end */\nAddOnResultPage.prototype.getInstance = function getInstance(payload) {\n  return new AddOnResultInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.referenceSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAddOnResultPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAddOnResultPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AddOnResultContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {add_on_result.status} status - The status of the result\n * @property {string} addOnSid - The SID of the Add-on to which the result belongs\n * @property {string} addOnConfigurationSid - The SID of the Add-on configuration\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {Date} dateCompleted -\n *          The date and time in GMT that the result was completed\n * @property {string} referenceSid -\n *          The SID of the recording to which the AddOnResult resource belongs\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n *\n * @param {V2010} version - Version of the resource\n * @param {AddOnResultPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} referenceSid -\n *          The SID of the recording to which the AddOnResult resource belongs\n * @param {sid} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nAddOnResultInstance = function AddOnResultInstance(version, payload, accountSid,\n                                                    referenceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.addOnSid = payload.add_on_sid; // jshint ignore:line\n  this.addOnConfigurationSid = payload.add_on_configuration_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.dateCompleted = deserialize.rfc2822DateTime(payload.date_completed); // jshint ignore:line\n  this.referenceSid = payload.reference_sid; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, referenceSid: referenceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AddOnResultInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AddOnResultContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.referenceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AddOnResultInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddOnResultInstance\n */\n/* jshint ignore:end */\nAddOnResultInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AddOnResultInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddOnResultInstance\n */\n/* jshint ignore:end */\nAddOnResultInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the payloads\n *\n * @function payloads\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadList}\n */\n/* jshint ignore:end */\nAddOnResultInstance.prototype.payloads = function payloads() {\n  return this._proxy.payloads;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAddOnResultInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAddOnResultInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AddOnResultContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext\n *\n * @property {Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext.PayloadList} payloads -\n *          payloads resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} referenceSid -\n *          The SID of the recording to which the result to fetch belongs\n * @param {sid} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nAddOnResultContext = function AddOnResultContext(version, accountSid,\n                                                  referenceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, referenceSid: referenceSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Recordings/${referenceSid}/AddOnResults/${sid}.json`;\n\n  // Dependents\n  this._payloads = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AddOnResultInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddOnResultInstance\n */\n/* jshint ignore:end */\nAddOnResultContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AddOnResultInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.referenceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AddOnResultInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddOnResultInstance\n */\n/* jshint ignore:end */\nAddOnResultContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AddOnResultContext.prototype,\n  'payloads', {\n    get: function() {\n      if (!this._payloads) {\n        this._payloads = new PayloadList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.referenceSid,\n          this._solution.sid\n        );\n      }\n      return this._payloads;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAddOnResultContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAddOnResultContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AddOnResultList: AddOnResultList,\n  AddOnResultPage: AddOnResultPage,\n  AddOnResultInstance: AddOnResultInstance,\n  AddOnResultContext: AddOnResultContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TranscriptionList;\nvar TranscriptionPage;\nvar TranscriptionInstance;\nvar TranscriptionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TranscriptionList\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} recordingSid -\n *          The SID that identifies the transcription's recording\n */\n/* jshint ignore:end */\nTranscriptionList = function TranscriptionList(version, accountSid,\n                                                recordingSid) {\n  /* jshint ignore:start */\n  /**\n   * @function transcriptions\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionContext}\n   */\n  /* jshint ignore:end */\n  function TranscriptionListInstance(sid) {\n    return TranscriptionListInstance.get(sid);\n  }\n\n  TranscriptionListInstance._version = version;\n  // Path Solution\n  TranscriptionListInstance._solution = {accountSid: accountSid, recordingSid: recordingSid};\n  TranscriptionListInstance._uri = `/Accounts/${accountSid}/Recordings/${recordingSid}/Transcriptions.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams TranscriptionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TranscriptionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TranscriptionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TranscriptionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TranscriptionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TranscriptionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a transcription\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionContext}\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.get = function get(sid) {\n    return new TranscriptionContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.recordingSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TranscriptionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TranscriptionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TranscriptionPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TranscriptionSolution} solution - Path solution\n *\n * @returns TranscriptionPage\n */\n/* jshint ignore:end */\nTranscriptionPage = function TranscriptionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TranscriptionPage.prototype, Page.prototype);\nTranscriptionPage.prototype.constructor = TranscriptionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TranscriptionInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionPage#\n *\n * @param {TranscriptionPayload} payload - Payload response from the API\n *\n * @returns TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionPage.prototype.getInstance = function getInstance(payload) {\n  return new TranscriptionInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.recordingSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTranscriptionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTranscriptionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TranscriptionContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} apiVersion - The API version used to create the transcription\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} duration - The duration of the transcribed audio in seconds.\n * @property {number} price - The charge for the transcription\n * @property {string} priceUnit - The currency in which price is measured\n * @property {string} recordingSid -\n *          The SID that identifies the transcription's recording\n * @property {string} sid - The unique string that identifies the resource\n * @property {transcription.status} status - The status of the transcription\n * @property {string} transcriptionText - The text content of the transcription.\n * @property {string} type - The transcription type\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {TranscriptionPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} recordingSid -\n *          The SID that identifies the transcription's recording\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTranscriptionInstance = function TranscriptionInstance(version, payload,\n                                                        accountSid,\n                                                        recordingSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.duration = payload.duration; // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.recordingSid = payload.recording_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.transcriptionText = payload.transcription_text; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, recordingSid: recordingSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TranscriptionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TranscriptionContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.recordingSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TranscriptionInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TranscriptionInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTranscriptionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTranscriptionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TranscriptionContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} recordingSid -\n *          The SID of the recording that created the transcriptions to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTranscriptionContext = function TranscriptionContext(version, accountSid,\n                                                      recordingSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, recordingSid: recordingSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Recordings/${recordingSid}/Transcriptions/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TranscriptionInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TranscriptionInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.recordingSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TranscriptionInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTranscriptionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTranscriptionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TranscriptionList: TranscriptionList,\n  TranscriptionPage: TranscriptionPage,\n  TranscriptionInstance: TranscriptionInstance,\n  TranscriptionContext: TranscriptionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AddOnResultList = require('./recording/addOnResult').AddOnResultList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar TranscriptionList = require('./recording/transcription').TranscriptionList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RecordingList;\nvar RecordingPage;\nvar RecordingInstance;\nvar RecordingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingList\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nRecordingList = function RecordingList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function recordings\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.RecordingContext}\n   */\n  /* jshint ignore:end */\n  function RecordingListInstance(sid) {\n    return RecordingListInstance.get(sid);\n  }\n\n  RecordingListInstance._version = version;\n  // Path Solution\n  RecordingListInstance._solution = {accountSid: accountSid};\n  RecordingListInstance._uri = `/Accounts/${accountSid}/Recordings.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams RecordingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Only include recordings that were created on this date\n   * @param {Date} [opts.dateCreated] -\n   *          Only include recordings that were created on this date\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Only include recordings that were created on this date\n   * @param {string} [opts.callSid] - The Call SID of the resources to read\n   * @param {string} [opts.conferenceSid] -\n   *          Read by unique Conference SID for the recording\n   * @param {boolean} [opts.includeSoftDeleted] -\n   *          A boolean parameter indicating whether to retrieve soft deleted recordings or not.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RecordingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Only include recordings that were created on this date\n   * @param {Date} [opts.dateCreated] -\n   *          Only include recordings that were created on this date\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Only include recordings that were created on this date\n   * @param {string} [opts.callSid] - The Call SID of the resources to read\n   * @param {string} [opts.conferenceSid] -\n   *          Read by unique Conference SID for the recording\n   * @param {boolean} [opts.includeSoftDeleted] -\n   *          A boolean parameter indicating whether to retrieve soft deleted recordings or not.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Only include recordings that were created on this date\n   * @param {Date} [opts.dateCreated] -\n   *          Only include recordings that were created on this date\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Only include recordings that were created on this date\n   * @param {string} [opts.callSid] - The Call SID of the resources to read\n   * @param {string} [opts.conferenceSid] -\n   *          Read by unique Conference SID for the recording\n   * @param {boolean} [opts.includeSoftDeleted] -\n   *          A boolean parameter indicating whether to retrieve soft deleted recordings or not.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DateCreated<': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateCreated>': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'CallSid': _.get(opts, 'callSid'),\n      'ConferenceSid': _.get(opts, 'conferenceSid'),\n      'IncludeSoftDeleted': serialize.bool(_.get(opts, 'includeSoftDeleted')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a recording\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.RecordingContext}\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.get = function get(sid) {\n    return new RecordingContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.RecordingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RecordingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RecordingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RecordingSolution} solution - Path solution\n *\n * @returns RecordingPage\n */\n/* jshint ignore:end */\nRecordingPage = function RecordingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RecordingPage.prototype, Page.prototype);\nRecordingPage.prototype.constructor = RecordingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RecordingInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.RecordingPage#\n *\n * @param {RecordingPayload} payload - Payload response from the API\n *\n * @returns RecordingInstance\n */\n/* jshint ignore:end */\nRecordingPage.prototype.getInstance = function getInstance(payload) {\n  return new RecordingInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} apiVersion - The API version used during the recording.\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {string} conferenceSid -\n *          The unique ID for the conference associated with the recording.\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {Date} startTime -\n *          The start time of the recording, given in RFC 2822 format\n * @property {string} duration - The length of the recording in seconds.\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} price - The one-time cost of creating the recording.\n * @property {string} priceUnit - The currency used in the price property.\n * @property {recording.status} status - The status of the recording.\n * @property {number} channels -\n *          The number of channels in the final recording file as an integer.\n * @property {recording.source} source - How the recording was created\n * @property {number} errorCode -\n *          More information about why the recording is missing, if status is `absent`.\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {object} encryptionDetails - How to decrypt the recording.\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n *\n * @param {V2010} version - Version of the resource\n * @param {RecordingPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRecordingInstance = function RecordingInstance(version, payload, accountSid,\n                                                sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.conferenceSid = payload.conference_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.startTime = deserialize.rfc2822DateTime(payload.start_time); // jshint ignore:line\n  this.duration = payload.duration; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.price = payload.price; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.channels = deserialize.integer(payload.channels); // jshint ignore:line\n  this.source = payload.source; // jshint ignore:line\n  this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.encryptionDetails = payload.encryption_details; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RecordingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RecordingContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.RecordingInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.includeSoftDeleted] -\n *          A boolean parameter indicating whether to retrieve soft deleted recordings or not.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RecordingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.RecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the transcriptions\n *\n * @function transcriptions\n * @memberof Twilio.Api.V2010.AccountContext.RecordingInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionList}\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.transcriptions = function transcriptions() {\n  return this._proxy.transcriptions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the addOnResults\n *\n * @function addOnResults\n * @memberof Twilio.Api.V2010.AccountContext.RecordingInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultList}\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.addOnResults = function addOnResults() {\n  return this._proxy.addOnResults;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.RecordingContext\n *\n * @property {Twilio.Api.V2010.AccountContext.RecordingContext.TranscriptionList} transcriptions -\n *          transcriptions resource\n * @property {Twilio.Api.V2010.AccountContext.RecordingContext.AddOnResultList} addOnResults -\n *          addOnResults resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRecordingContext = function RecordingContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Recordings/${sid}.json`;\n\n  // Dependents\n  this._transcriptions = undefined;\n  this._addOnResults = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.includeSoftDeleted] -\n *          A boolean parameter indicating whether to retrieve soft deleted recordings or not.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'IncludeSoftDeleted': serialize.bool(_.get(opts, 'includeSoftDeleted'))});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RecordingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(RecordingContext.prototype,\n  'transcriptions', {\n    get: function() {\n      if (!this._transcriptions) {\n        this._transcriptions = new TranscriptionList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n      return this._transcriptions;\n    }\n});\n\nObject.defineProperty(RecordingContext.prototype,\n  'addOnResults', {\n    get: function() {\n      if (!this._addOnResults) {\n        this._addOnResults = new AddOnResultList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n      return this._addOnResults;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.RecordingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRecordingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RecordingList: RecordingList,\n  RecordingPage: RecordingPage,\n  RecordingInstance: RecordingInstance,\n  RecordingContext: RecordingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ShortCodeList;\nvar ShortCodePage;\nvar ShortCodeInstance;\nvar ShortCodeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodeList\n *\n * @constructor Twilio.Api.V2010.AccountContext.ShortCodeList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created this resource\n */\n/* jshint ignore:end */\nShortCodeList = function ShortCodeList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function shortCodes\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ShortCodeContext}\n   */\n  /* jshint ignore:end */\n  function ShortCodeListInstance(sid) {\n    return ShortCodeListInstance.get(sid);\n  }\n\n  ShortCodeListInstance._version = version;\n  // Path Solution\n  ShortCodeListInstance._solution = {accountSid: accountSid};\n  ShortCodeListInstance._uri = `/Accounts/${accountSid}/SMS/ShortCodes.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams ShortCodeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.ShortCodeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the ShortCode resources to read\n   * @param {string} [opts.shortCode] - Filter by ShortCode\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ShortCodeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.ShortCodeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the ShortCode resources to read\n   * @param {string} [opts.shortCode] - Filter by ShortCode\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ShortCodeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.ShortCodeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the ShortCode resources to read\n   * @param {string} [opts.shortCode] - Filter by ShortCode\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'ShortCode': _.get(opts, 'shortCode'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ShortCodePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ShortCodeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.ShortCodeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ShortCodePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a short_code\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.ShortCodeList#\n   *\n   * @param {string} sid - The unique string that identifies this resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ShortCodeContext}\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.get = function get(sid) {\n    return new ShortCodeContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.ShortCodeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ShortCodeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ShortCodeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.ShortCodePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ShortCodeSolution} solution - Path solution\n *\n * @returns ShortCodePage\n */\n/* jshint ignore:end */\nShortCodePage = function ShortCodePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ShortCodePage.prototype, Page.prototype);\nShortCodePage.prototype.constructor = ShortCodePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ShortCodeInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.ShortCodePage#\n *\n * @param {ShortCodePayload} payload - Payload response from the API\n *\n * @returns ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodePage.prototype.getInstance = function getInstance(payload) {\n  return new ShortCodeInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ShortCodePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nShortCodePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nShortCodePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodeContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ShortCodeInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that created this resource\n * @property {string} apiVersion -\n *          The API version used to start a new TwiML session\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that this resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that this resource was last updated\n * @property {string} friendlyName -\n *          A string that you assigned to describe this resource\n * @property {string} shortCode - The short code. e.g., 894546.\n * @property {string} sid - The unique string that identifies this resource\n * @property {string} smsFallbackMethod -\n *          HTTP method we use to call the sms_fallback_url\n * @property {string} smsFallbackUrl -\n *          URL Twilio will request if an error occurs in executing TwiML\n * @property {string} smsMethod - HTTP method to use when requesting the sms url\n * @property {string} smsUrl -\n *          URL we call when receiving an incoming SMS message to this short code\n * @property {string} uri -\n *          The URI of this resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {ShortCodePayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created this resource\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nShortCodeInstance = function ShortCodeInstance(version, payload, accountSid,\n                                                sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.shortCode = payload.short_code; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ShortCodeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ShortCodeContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ShortCodeInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ShortCodeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ShortCodeInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ShortCodeInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe this resource\n * @param {string} [opts.apiVersion] -\n *          The API version to use to start a new TwiML session\n * @param {string} [opts.smsUrl] - URL Twilio will request when receiving an SMS\n * @param {string} [opts.smsMethod] -\n *          HTTP method to use when requesting the sms url\n * @param {string} [opts.smsFallbackUrl] -\n *          URL Twilio will request if an error occurs in executing TwiML\n * @param {string} [opts.smsFallbackMethod] -\n *          HTTP method Twilio will use with sms_fallback_url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ShortCodeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nShortCodeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodeContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ShortCodeContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource(s) to fetch\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nShortCodeContext = function ShortCodeContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SMS/ShortCodes/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ShortCodeInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.ShortCodeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ShortCodeInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ShortCodeInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.ShortCodeContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe this resource\n * @param {string} [opts.apiVersion] -\n *          The API version to use to start a new TwiML session\n * @param {string} [opts.smsUrl] - URL Twilio will request when receiving an SMS\n * @param {string} [opts.smsMethod] -\n *          HTTP method to use when requesting the sms url\n * @param {string} [opts.smsFallbackUrl] -\n *          URL Twilio will request if an error occurs in executing TwiML\n * @param {string} [opts.smsFallbackMethod] -\n *          HTTP method Twilio will use with sms_fallback_url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'ApiVersion': _.get(opts, 'apiVersion'),\n    'SmsUrl': _.get(opts, 'smsUrl'),\n    'SmsMethod': _.get(opts, 'smsMethod'),\n    'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n    'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ShortCodeInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ShortCodeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nShortCodeContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ShortCodeList: ShortCodeList,\n  ShortCodePage: ShortCodePage,\n  ShortCodeInstance: ShortCodeInstance,\n  ShortCodeContext: ShortCodeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SigningKeyList;\nvar SigningKeyPage;\nvar SigningKeyInstance;\nvar SigningKeyContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SigningKeyList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SigningKeyList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nSigningKeyList = function SigningKeyList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function signingKeys\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SigningKeyContext}\n   */\n  /* jshint ignore:end */\n  function SigningKeyListInstance(sid) {\n    return SigningKeyListInstance.get(sid);\n  }\n\n  SigningKeyListInstance._version = version;\n  // Path Solution\n  SigningKeyListInstance._solution = {accountSid: accountSid};\n  SigningKeyListInstance._uri = `/Accounts/${accountSid}/SigningKeys.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams SigningKeyInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SigningKeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SigningKeyListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SigningKeyInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SigningKeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SigningKeyListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SigningKeyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SigningKeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SigningKeyListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SigningKeyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SigningKeyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SigningKeyList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SigningKeyListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SigningKeyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a signing_key\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SigningKeyList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SigningKeyContext}\n   */\n  /* jshint ignore:end */\n  SigningKeyListInstance.get = function get(sid) {\n    return new SigningKeyContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SigningKeyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SigningKeyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SigningKeyListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SigningKeyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SigningKeyPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SigningKeyPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SigningKeySolution} solution - Path solution\n *\n * @returns SigningKeyPage\n */\n/* jshint ignore:end */\nSigningKeyPage = function SigningKeyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SigningKeyPage.prototype, Page.prototype);\nSigningKeyPage.prototype.constructor = SigningKeyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SigningKeyInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyPage#\n *\n * @param {SigningKeyPayload} payload - Payload response from the API\n *\n * @returns SigningKeyInstance\n */\n/* jshint ignore:end */\nSigningKeyPage.prototype.getInstance = function getInstance(payload) {\n  return new SigningKeyInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSigningKeyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSigningKeyPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SigningKeyContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SigningKeyInstance\n *\n * @property {string} sid - The sid\n * @property {string} friendlyName - The friendly_name\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n *\n * @param {V2010} version - Version of the resource\n * @param {SigningKeyPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nSigningKeyInstance = function SigningKeyInstance(version, payload, accountSid,\n                                                  sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SigningKeyInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SigningKeyContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SigningKeyInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SigningKeyInstance\n */\n/* jshint ignore:end */\nSigningKeyInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SigningKeyInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SigningKeyInstance\n */\n/* jshint ignore:end */\nSigningKeyInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SigningKeyInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SigningKeyInstance\n */\n/* jshint ignore:end */\nSigningKeyInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSigningKeyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSigningKeyInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SigningKeyContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SigningKeyContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid - The account_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nSigningKeyContext = function SigningKeyContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SigningKeys/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SigningKeyInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SigningKeyInstance\n */\n/* jshint ignore:end */\nSigningKeyContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SigningKeyInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SigningKeyInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SigningKeyInstance\n */\n/* jshint ignore:end */\nSigningKeyContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SigningKeyInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SigningKeyInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SigningKeyInstance\n */\n/* jshint ignore:end */\nSigningKeyContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SigningKeyContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSigningKeyContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSigningKeyContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SigningKeyList: SigningKeyList,\n  SigningKeyPage: SigningKeyPage,\n  SigningKeyInstance: SigningKeyInstance,\n  SigningKeyContext: SigningKeyContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar CredentialList;\nvar CredentialPage;\nvar CredentialInstance;\nvar CredentialContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {string} credentialListSid -\n *          The unique id that identifies the credential list that includes this credential\n */\n/* jshint ignore:end */\nCredentialList = function CredentialList(version, accountSid, credentialListSid)\n                                          {\n  /* jshint ignore:start */\n  /**\n   * @function credentials\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListInstance(sid) {\n    return CredentialListInstance.get(sid);\n  }\n\n  CredentialListInstance._version = version;\n  // Path Solution\n  CredentialListInstance._solution = {accountSid: accountSid, credentialListSid: credentialListSid};\n  CredentialListInstance._uri = `/Accounts/${accountSid}/SIP/CredentialLists/${credentialListSid}/Credentials.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CredentialInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.username - The username for this credential.\n   * @param {string} opts.password -\n   *          The password will not be returned in the response.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialInstance\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['username'])) {\n      throw new Error('Required parameter \"opts[\\'username\\']\" missing.');\n    }\n    if (_.isUndefined(opts['password'])) {\n      throw new Error('Required parameter \"opts[\\'password\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Username': _.get(opts, 'username'), 'Password': _.get(opts, 'password')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.credentialListSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList#\n   *\n   * @param {string} sid - The unique id that identifies the resource to fetch.\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialContext}\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.get = function get(sid) {\n    return new CredentialContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.credentialListSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialSolution} solution - Path solution\n *\n * @returns CredentialPage\n */\n/* jshint ignore:end */\nCredentialPage = function CredentialPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialPage.prototype, Page.prototype);\nCredentialPage.prototype.constructor = CredentialPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialPage#\n *\n * @param {CredentialPayload} payload - Payload response from the API\n *\n * @returns CredentialInstance\n */\n/* jshint ignore:end */\nCredentialPage.prototype.getInstance = function getInstance(payload) {\n  return new CredentialInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.credentialListSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialInstance\n *\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @property {string} credentialListSid -\n *          The unique id that identifies the credential list that includes this credential\n * @property {string} username - The username for this credential.\n * @property {Date} dateCreated -\n *          The date that this resource was created, given as GMT in RFC 2822 format.\n * @property {Date} dateUpdated -\n *          The date that this resource was last updated, given as GMT in RFC 2822 format.\n * @property {string} uri -\n *          The URI for this resource, relative to https://api.twilio.com\n *\n * @param {V2010} version - Version of the resource\n * @param {CredentialPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {sid} credentialListSid -\n *          The unique id that identifies the credential list that includes this credential\n * @param {sid} sid - The unique id that identifies the resource to fetch.\n */\n/* jshint ignore:end */\nCredentialInstance = function CredentialInstance(version, payload, accountSid,\n                                                  credentialListSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.credentialListSid = payload.credential_list_sid; // jshint ignore:line\n  this.username = payload.username; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    accountSid: accountSid,\n    credentialListSid: credentialListSid,\n    sid: sid || this.sid,\n  };\n};\n\nObject.defineProperty(CredentialInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.credentialListSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.password] -\n *          The password will not be returned in the response\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {sid} credentialListSid -\n *          The unique id that identifies the credential list that contains the desired credential\n * @param {sid} sid - The unique id that identifies the resource to fetch.\n */\n/* jshint ignore:end */\nCredentialContext = function CredentialContext(version, accountSid,\n                                                credentialListSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, credentialListSid: credentialListSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/CredentialLists/${credentialListSid}/Credentials/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.credentialListSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.password] -\n *          The password will not be returned in the response\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Password': _.get(opts, 'password')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.credentialListSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialList: CredentialList,\n  CredentialPage: CredentialPage,\n  CredentialInstance: CredentialInstance,\n  CredentialContext: CredentialContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CredentialList = require('./credentialList/credential').CredentialList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar CredentialListList;\nvar CredentialListPage;\nvar CredentialListInstance;\nvar CredentialListContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.CredentialListList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nCredentialListList = function CredentialListList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function credentialLists\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListListInstance(sid) {\n    return CredentialListListInstance.get(sid);\n  }\n\n  CredentialListListInstance._version = version;\n  // Path Solution\n  CredentialListListInstance._solution = {accountSid: accountSid};\n  CredentialListListInstance._uri = `/Accounts/${accountSid}/SIP/CredentialLists.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialListInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialListInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CredentialListInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - Human readable descriptive text\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialListInstance\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialListInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential_list\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListList#\n   *\n   * @param {string} sid - Fetch by unique credential list Sid\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext}\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.get = function get(sid) {\n    return new CredentialListContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.CredentialListPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialListSolution} solution - Path solution\n *\n * @returns CredentialListPage\n */\n/* jshint ignore:end */\nCredentialListPage = function CredentialListPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialListPage.prototype, Page.prototype);\nCredentialListPage.prototype.constructor = CredentialListPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialListInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListPage#\n *\n * @param {CredentialListPayload} payload - Payload response from the API\n *\n * @returns CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListPage.prototype.getInstance = function getInstance(payload) {\n  return new CredentialListInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialListPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialListPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.CredentialListInstance\n *\n * @property {string} accountSid - The unique sid that identifies this account\n * @property {Date} dateCreated - The date this resource was created\n * @property {Date} dateUpdated - The date this resource was last updated\n * @property {string} friendlyName - Human readable descriptive text\n * @property {string} sid - A string that uniquely identifies this credential\n * @property {string} subresourceUris -\n *          The list of credentials associated with this credential list.\n * @property {string} uri - The URI for this resource\n *\n * @param {V2010} version - Version of the resource\n * @param {CredentialListPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n * @param {sid} sid - Fetch by unique credential list Sid\n */\n/* jshint ignore:end */\nCredentialListInstance = function CredentialListInstance(version, payload,\n                                                          accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(CredentialListInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialListContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialListInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialListInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - Human readable descriptive text\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialListInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the credentials\n *\n * @function credentials\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList}\n */\n/* jshint ignore:end */\nCredentialListInstance.prototype.credentials = function credentials() {\n  return this._proxy.credentials;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialListInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialListInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext\n *\n * @property {Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext.CredentialList} credentials -\n *          credentials resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {sid} sid - Fetch by unique credential list Sid\n */\n/* jshint ignore:end */\nCredentialListContext = function CredentialListContext(version, accountSid, sid)\n                                                        {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/CredentialLists/${sid}.json`;\n\n  // Dependents\n  this._credentials = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialListInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialListInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialListInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - Human readable descriptive text\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['friendlyName'])) {\n    throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialListInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialListInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(CredentialListContext.prototype,\n  'credentials', {\n    get: function() {\n      if (!this._credentials) {\n        this._credentials = new CredentialList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n      return this._credentials;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.CredentialListContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialListContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialListContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialListList: CredentialListList,\n  CredentialListPage: CredentialListPage,\n  CredentialListInstance: CredentialListInstance,\n  CredentialListContext: CredentialListContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require(\n    '../../../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require(\n    '../../../../../../../../base/values');  /* jshint ignore:line */\n\nvar AuthCallsCredentialListMappingList;\nvar AuthCallsCredentialListMappingPage;\nvar AuthCallsCredentialListMappingInstance;\nvar AuthCallsCredentialListMappingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthCallsCredentialListMappingList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} domainSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingList = function\n    AuthCallsCredentialListMappingList(version, accountSid, domainSid) {\n  /* jshint ignore:start */\n  /**\n   * @function credentialListMappings\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingContext}\n   */\n  /* jshint ignore:end */\n  function AuthCallsCredentialListMappingListInstance(sid) {\n    return AuthCallsCredentialListMappingListInstance.get(sid);\n  }\n\n  AuthCallsCredentialListMappingListInstance._version = version;\n  // Path Solution\n  AuthCallsCredentialListMappingListInstance._solution = {\n    accountSid: accountSid,\n    domainSid: domainSid\n  };\n  AuthCallsCredentialListMappingListInstance._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/Auth/Calls/CredentialListMappings.json`;\n  /* jshint ignore:start */\n  /**\n   * create a AuthCallsCredentialListMappingInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.credentialListSid -\n   *          The SID of the CredentialList resource to map to the SIP domain\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AuthCallsCredentialListMappingInstance\n   */\n  /* jshint ignore:end */\n  AuthCallsCredentialListMappingListInstance.create = function create(opts,\n      callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['credentialListSid'])) {\n      throw new Error('Required parameter \"opts[\\'credentialListSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'CredentialListSid': _.get(opts, 'credentialListSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthCallsCredentialListMappingInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.domainSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams AuthCallsCredentialListMappingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AuthCallsCredentialListMappingListInstance.each = function each(opts, callback)\n      {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AuthCallsCredentialListMappingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthCallsCredentialListMappingListInstance.list = function list(opts, callback)\n      {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AuthCallsCredentialListMappingInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthCallsCredentialListMappingListInstance.page = function page(opts, callback)\n      {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthCallsCredentialListMappingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AuthCallsCredentialListMappingInstance records\n   * from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthCallsCredentialListMappingListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthCallsCredentialListMappingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a auth_calls_credential_list_mapping\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingContext}\n   */\n  /* jshint ignore:end */\n  AuthCallsCredentialListMappingListInstance.get = function get(sid) {\n    return new AuthCallsCredentialListMappingContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AuthCallsCredentialListMappingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AuthCallsCredentialListMappingListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AuthCallsCredentialListMappingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthCallsCredentialListMappingPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AuthCallsCredentialListMappingSolution} solution - Path solution\n *\n * @returns AuthCallsCredentialListMappingPage\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingPage = function\n    AuthCallsCredentialListMappingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AuthCallsCredentialListMappingPage.prototype, Page.prototype);\nAuthCallsCredentialListMappingPage.prototype.constructor = AuthCallsCredentialListMappingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AuthCallsCredentialListMappingInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingPage#\n *\n * @param {AuthCallsCredentialListMappingPayload} payload -\n *          Payload response from the API\n *\n * @returns AuthCallsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new AuthCallsCredentialListMappingInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.domainSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthCallsCredentialListMappingPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthCallsCredentialListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} sid - The unique string that identifies the resource\n *\n * @param {V2010} version - Version of the resource\n * @param {AuthCallsCredentialListMappingPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} domainSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingInstance = function\n    AuthCallsCredentialListMappingInstance(version, payload, accountSid,\n    domainSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AuthCallsCredentialListMappingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AuthCallsCredentialListMappingContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.domainSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AuthCallsCredentialListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthCallsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingInstance.prototype.fetch = function\n    fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AuthCallsCredentialListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthCallsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingInstance.prototype.remove = function\n    remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthCallsCredentialListMappingInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthCallsCredentialListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} domainSid -\n *          The SID of the SIP domain that contains the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingContext = function\n    AuthCallsCredentialListMappingContext(version, accountSid, domainSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/Auth/Calls/CredentialListMappings/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AuthCallsCredentialListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthCallsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingContext.prototype.fetch = function fetch(callback)\n    {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AuthCallsCredentialListMappingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AuthCallsCredentialListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthCallsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingContext.prototype.remove = function\n    remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsCredentialListMappingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthCallsCredentialListMappingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAuthCallsCredentialListMappingContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AuthCallsCredentialListMappingList: AuthCallsCredentialListMappingList,\n  AuthCallsCredentialListMappingPage: AuthCallsCredentialListMappingPage,\n  AuthCallsCredentialListMappingInstance: AuthCallsCredentialListMappingInstance,\n  AuthCallsCredentialListMappingContext: AuthCallsCredentialListMappingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require(\n    '../../../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require(\n    '../../../../../../../../base/values');  /* jshint ignore:line */\n\nvar AuthCallsIpAccessControlListMappingList;\nvar AuthCallsIpAccessControlListMappingPage;\nvar AuthCallsIpAccessControlListMappingInstance;\nvar AuthCallsIpAccessControlListMappingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthCallsIpAccessControlListMappingList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} domainSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingList = function\n    AuthCallsIpAccessControlListMappingList(version, accountSid, domainSid) {\n  /* jshint ignore:start */\n  /**\n   * @function ipAccessControlListMappings\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingContext}\n   */\n  /* jshint ignore:end */\n  function AuthCallsIpAccessControlListMappingListInstance(sid) {\n    return AuthCallsIpAccessControlListMappingListInstance.get(sid);\n  }\n\n  AuthCallsIpAccessControlListMappingListInstance._version = version;\n  // Path Solution\n  AuthCallsIpAccessControlListMappingListInstance._solution = {\n    accountSid: accountSid,\n    domainSid: domainSid\n  };\n  AuthCallsIpAccessControlListMappingListInstance._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/Auth/Calls/IpAccessControlListMappings.json`;\n  /* jshint ignore:start */\n  /**\n   * create a AuthCallsIpAccessControlListMappingInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.ipAccessControlListSid -\n   *          The SID of the IpAccessControlList resource to map to the SIP domain\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AuthCallsIpAccessControlListMappingInstance\n   */\n  /* jshint ignore:end */\n  AuthCallsIpAccessControlListMappingListInstance.create = function create(opts,\n      callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['ipAccessControlListSid'])) {\n      throw new Error('Required parameter \"opts[\\'ipAccessControlListSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'IpAccessControlListSid': _.get(opts, 'ipAccessControlListSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthCallsIpAccessControlListMappingInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.domainSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams AuthCallsIpAccessControlListMappingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AuthCallsIpAccessControlListMappingListInstance.each = function each(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AuthCallsIpAccessControlListMappingInstance records from the API as a\n   * list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthCallsIpAccessControlListMappingListInstance.list = function list(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AuthCallsIpAccessControlListMappingInstance records\n   * from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthCallsIpAccessControlListMappingListInstance.page = function page(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthCallsIpAccessControlListMappingPage(\n        this._version,\n        payload,\n        this._solution\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AuthCallsIpAccessControlListMappingInstance\n   * records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthCallsIpAccessControlListMappingListInstance.getPage = function\n      getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthCallsIpAccessControlListMappingPage(\n        this._version,\n        payload,\n        this._solution\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a auth_calls_ip_access_control_list_mapping\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingContext}\n   */\n  /* jshint ignore:end */\n  AuthCallsIpAccessControlListMappingListInstance.get = function get(sid) {\n    return new AuthCallsIpAccessControlListMappingContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AuthCallsIpAccessControlListMappingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AuthCallsIpAccessControlListMappingListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AuthCallsIpAccessControlListMappingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthCallsIpAccessControlListMappingPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AuthCallsIpAccessControlListMappingSolution} solution - Path solution\n *\n * @returns AuthCallsIpAccessControlListMappingPage\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingPage = function\n    AuthCallsIpAccessControlListMappingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AuthCallsIpAccessControlListMappingPage.prototype, Page.prototype);\nAuthCallsIpAccessControlListMappingPage.prototype.constructor = AuthCallsIpAccessControlListMappingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AuthCallsIpAccessControlListMappingInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingPage#\n *\n * @param {AuthCallsIpAccessControlListMappingPayload} payload -\n *          Payload response from the API\n *\n * @returns AuthCallsIpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new AuthCallsIpAccessControlListMappingInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.domainSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthCallsIpAccessControlListMappingPage.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthCallsIpAccessControlListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} sid - The unique string that identifies the resource\n *\n * @param {V2010} version - Version of the resource\n * @param {AuthCallsIpAccessControlListMappingPayload} payload -\n *          The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} domainSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingInstance = function\n    AuthCallsIpAccessControlListMappingInstance(version, payload, accountSid,\n    domainSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AuthCallsIpAccessControlListMappingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AuthCallsIpAccessControlListMappingContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.domainSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AuthCallsIpAccessControlListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthCallsIpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingInstance.prototype.fetch = function\n    fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AuthCallsIpAccessControlListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthCallsIpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingInstance.prototype.remove = function\n    remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingInstance.prototype.toJSON = function toJSON()\n    {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthCallsIpAccessControlListMappingInstance.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthCallsIpAccessControlListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} domainSid -\n *          The SID of the SIP domain that contains the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingContext = function\n    AuthCallsIpAccessControlListMappingContext(version, accountSid, domainSid,\n    sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/Auth/Calls/IpAccessControlListMappings/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AuthCallsIpAccessControlListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthCallsIpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingContext.prototype.fetch = function\n    fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AuthCallsIpAccessControlListMappingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AuthCallsIpAccessControlListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthCallsIpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingContext.prototype.remove = function\n    remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext.AuthCallsIpAccessControlListMappingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthCallsIpAccessControlListMappingContext.prototype.toJSON = function toJSON()\n    {\n  return this._solution;\n};\n\nAuthCallsIpAccessControlListMappingContext.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AuthCallsIpAccessControlListMappingList: AuthCallsIpAccessControlListMappingList,\n  AuthCallsIpAccessControlListMappingPage: AuthCallsIpAccessControlListMappingPage,\n  AuthCallsIpAccessControlListMappingInstance: AuthCallsIpAccessControlListMappingInstance,\n  AuthCallsIpAccessControlListMappingContext: AuthCallsIpAccessControlListMappingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AuthCallsCredentialListMappingList = require(\n    './authCallsMapping/authCallsCredentialListMapping').AuthCallsCredentialListMappingList;\nvar AuthCallsIpAccessControlListMappingList = require(\n    './authCallsMapping/authCallsIpAccessControlListMapping').AuthCallsIpAccessControlListMappingList;\n\nvar AuthTypeCallsList;\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthTypeCallsList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} domainSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthTypeCallsList = function AuthTypeCallsList(version, accountSid, domainSid) {\n  /* jshint ignore:start */\n  /**\n   * @function calls\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsContext}\n   */\n  /* jshint ignore:end */\n  function AuthTypeCallsListInstance(sid) {\n    return AuthTypeCallsListInstance.get(sid);\n  }\n\n  AuthTypeCallsListInstance._version = version;\n  // Path Solution\n  AuthTypeCallsListInstance._solution = {accountSid: accountSid, domainSid: domainSid};\n\n  // Components\n  AuthTypeCallsListInstance._credentialListMappings = undefined;\n  AuthTypeCallsListInstance._ipAccessControlListMappings = undefined;\n\n  Object.defineProperty(AuthTypeCallsListInstance,\n    'credentialListMappings', {\n      get: function credentialListMappings() {\n        if (!this._credentialListMappings) {\n          this._credentialListMappings = new AuthCallsCredentialListMappingList(\n            this._version,\n            this._solution.accountSid,\n            this._solution.domainSid\n          );\n        }\n\n        return this._credentialListMappings;\n      }\n  });\n\n  Object.defineProperty(AuthTypeCallsListInstance,\n    'ipAccessControlListMappings', {\n      get: function ipAccessControlListMappings() {\n        if (!this._ipAccessControlListMappings) {\n          this._ipAccessControlListMappings = new AuthCallsIpAccessControlListMappingList(\n            this._version,\n            this._solution.accountSid,\n            this._solution.domainSid\n          );\n        }\n\n        return this._ipAccessControlListMappings;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeCallsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AuthTypeCallsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AuthTypeCallsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AuthTypeCallsListInstance;\n};\n\nmodule.exports = {\n  AuthTypeCallsList: AuthTypeCallsList\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require(\n    '../../../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require(\n    '../../../../../../../../base/values');  /* jshint ignore:line */\n\nvar AuthRegistrationsCredentialListMappingList;\nvar AuthRegistrationsCredentialListMappingPage;\nvar AuthRegistrationsCredentialListMappingInstance;\nvar AuthRegistrationsCredentialListMappingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthRegistrationsCredentialListMappingList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} domainSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingList = function\n    AuthRegistrationsCredentialListMappingList(version, accountSid, domainSid) {\n  /* jshint ignore:start */\n  /**\n   * @function credentialListMappings\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingContext}\n   */\n  /* jshint ignore:end */\n  function AuthRegistrationsCredentialListMappingListInstance(sid) {\n    return AuthRegistrationsCredentialListMappingListInstance.get(sid);\n  }\n\n  AuthRegistrationsCredentialListMappingListInstance._version = version;\n  // Path Solution\n  AuthRegistrationsCredentialListMappingListInstance._solution = {\n    accountSid: accountSid,\n    domainSid: domainSid\n  };\n  AuthRegistrationsCredentialListMappingListInstance._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/Auth/Registrations/CredentialListMappings.json`;\n  /* jshint ignore:start */\n  /**\n   * create a AuthRegistrationsCredentialListMappingInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.credentialListSid -\n   *          The SID of the CredentialList resource to map to the SIP domain\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AuthRegistrationsCredentialListMappingInstance\n   */\n  /* jshint ignore:end */\n  AuthRegistrationsCredentialListMappingListInstance.create = function\n      create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['credentialListSid'])) {\n      throw new Error('Required parameter \"opts[\\'credentialListSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'CredentialListSid': _.get(opts, 'credentialListSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthRegistrationsCredentialListMappingInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.domainSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams AuthRegistrationsCredentialListMappingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AuthRegistrationsCredentialListMappingListInstance.each = function each(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AuthRegistrationsCredentialListMappingInstance records from the API as a\n   * list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthRegistrationsCredentialListMappingListInstance.list = function list(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AuthRegistrationsCredentialListMappingInstance records\n   * from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthRegistrationsCredentialListMappingListInstance.page = function page(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthRegistrationsCredentialListMappingPage(\n        this._version,\n        payload,\n        this._solution\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AuthRegistrationsCredentialListMappingInstance\n   * records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthRegistrationsCredentialListMappingListInstance.getPage = function\n      getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthRegistrationsCredentialListMappingPage(\n        this._version,\n        payload,\n        this._solution\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a auth_registrations_credential_list_mapping\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingContext}\n   */\n  /* jshint ignore:end */\n  AuthRegistrationsCredentialListMappingListInstance.get = function get(sid) {\n    return new AuthRegistrationsCredentialListMappingContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AuthRegistrationsCredentialListMappingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AuthRegistrationsCredentialListMappingListInstance[util.inspect.custom] =\n      function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AuthRegistrationsCredentialListMappingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthRegistrationsCredentialListMappingPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AuthRegistrationsCredentialListMappingSolution} solution - Path solution\n *\n * @returns AuthRegistrationsCredentialListMappingPage\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingPage = function\n    AuthRegistrationsCredentialListMappingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AuthRegistrationsCredentialListMappingPage.prototype, Page.prototype);\nAuthRegistrationsCredentialListMappingPage.prototype.constructor = AuthRegistrationsCredentialListMappingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AuthRegistrationsCredentialListMappingInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingPage#\n *\n * @param {AuthRegistrationsCredentialListMappingPayload} payload -\n *          Payload response from the API\n *\n * @returns AuthRegistrationsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new AuthRegistrationsCredentialListMappingInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.domainSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingPage.prototype.toJSON = function toJSON()\n    {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthRegistrationsCredentialListMappingPage.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthRegistrationsCredentialListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} sid - The unique string that identifies the resource\n *\n * @param {V2010} version - Version of the resource\n * @param {AuthRegistrationsCredentialListMappingPayload} payload -\n *          The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} domainSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingInstance = function\n    AuthRegistrationsCredentialListMappingInstance(version, payload, accountSid,\n    domainSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AuthRegistrationsCredentialListMappingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AuthRegistrationsCredentialListMappingContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.domainSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AuthRegistrationsCredentialListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthRegistrationsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingInstance.prototype.fetch = function\n    fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AuthRegistrationsCredentialListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthRegistrationsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingInstance.prototype.remove = function\n    remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingInstance.prototype.toJSON = function\n    toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthRegistrationsCredentialListMappingInstance.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthRegistrationsCredentialListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} domainSid -\n *          The SID of the SIP domain that contains the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingContext = function\n    AuthRegistrationsCredentialListMappingContext(version, accountSid,\n    domainSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/Auth/Registrations/CredentialListMappings/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AuthRegistrationsCredentialListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthRegistrationsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingContext.prototype.fetch = function\n    fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AuthRegistrationsCredentialListMappingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AuthRegistrationsCredentialListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthRegistrationsCredentialListMappingInstance\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingContext.prototype.remove = function\n    remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext.AuthRegistrationsCredentialListMappingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthRegistrationsCredentialListMappingContext.prototype.toJSON = function\n    toJSON() {\n  return this._solution;\n};\n\nAuthRegistrationsCredentialListMappingContext.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AuthRegistrationsCredentialListMappingList: AuthRegistrationsCredentialListMappingList,\n  AuthRegistrationsCredentialListMappingPage: AuthRegistrationsCredentialListMappingPage,\n  AuthRegistrationsCredentialListMappingInstance: AuthRegistrationsCredentialListMappingInstance,\n  AuthRegistrationsCredentialListMappingContext: AuthRegistrationsCredentialListMappingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AuthRegistrationsCredentialListMappingList = require(\n    './authRegistrationsMapping/authRegistrationsCredentialListMapping').AuthRegistrationsCredentialListMappingList;\n\nvar AuthTypeRegistrationsList;\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthTypeRegistrationsList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} domainSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthTypeRegistrationsList = function AuthTypeRegistrationsList(version,\n    accountSid, domainSid) {\n  /* jshint ignore:start */\n  /**\n   * @function registrations\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsContext}\n   */\n  /* jshint ignore:end */\n  function AuthTypeRegistrationsListInstance(sid) {\n    return AuthTypeRegistrationsListInstance.get(sid);\n  }\n\n  AuthTypeRegistrationsListInstance._version = version;\n  // Path Solution\n  AuthTypeRegistrationsListInstance._solution = {accountSid: accountSid, domainSid: domainSid};\n\n  // Components\n  AuthTypeRegistrationsListInstance._credentialListMappings = undefined;\n\n  Object.defineProperty(AuthTypeRegistrationsListInstance,\n    'credentialListMappings', {\n      get: function credentialListMappings() {\n        if (!this._credentialListMappings) {\n          this._credentialListMappings = new AuthRegistrationsCredentialListMappingList(\n            this._version,\n            this._solution.accountSid,\n            this._solution.domainSid\n          );\n        }\n\n        return this._credentialListMappings;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext.AuthTypeRegistrationsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AuthTypeRegistrationsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AuthTypeRegistrationsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AuthTypeRegistrationsListInstance;\n};\n\nmodule.exports = {\n  AuthTypeRegistrationsList: AuthTypeRegistrationsList\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AuthTypeCallsList = require(\n    './authTypes/authCallsMapping').AuthTypeCallsList;\nvar AuthTypeRegistrationsList = require(\n    './authTypes/authRegistrationsMapping').AuthTypeRegistrationsList;\n\nvar AuthTypesList;\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthTypesList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n * @param {string} domainSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAuthTypesList = function AuthTypesList(version, accountSid, domainSid) {\n  /* jshint ignore:start */\n  /**\n   * @function auth\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesContext}\n   */\n  /* jshint ignore:end */\n  function AuthTypesListInstance(sid) {\n    return AuthTypesListInstance.get(sid);\n  }\n\n  AuthTypesListInstance._version = version;\n  // Path Solution\n  AuthTypesListInstance._solution = {accountSid: accountSid, domainSid: domainSid};\n\n  // Components\n  AuthTypesListInstance._calls = undefined;\n  AuthTypesListInstance._registrations = undefined;\n\n  Object.defineProperty(AuthTypesListInstance,\n    'calls', {\n      get: function calls() {\n        if (!this._calls) {\n          this._calls = new AuthTypeCallsList(\n            this._version,\n            this._solution.accountSid,\n            this._solution.domainSid\n          );\n        }\n\n        return this._calls;\n      }\n  });\n\n  Object.defineProperty(AuthTypesListInstance,\n    'registrations', {\n      get: function registrations() {\n        if (!this._registrations) {\n          this._registrations = new AuthTypeRegistrationsList(\n            this._version,\n            this._solution.accountSid,\n            this._solution.domainSid\n          );\n        }\n\n        return this._registrations;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AuthTypesListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AuthTypesListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AuthTypesListInstance;\n};\n\nmodule.exports = {\n  AuthTypesList: AuthTypesList\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar CredentialListMappingList;\nvar CredentialListMappingPage;\nvar CredentialListMappingInstance;\nvar CredentialListMappingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListMappingList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {string} domainSid -\n *          The unique string that identifies the SipDomain resource.\n */\n/* jshint ignore:end */\nCredentialListMappingList = function CredentialListMappingList(version,\n    accountSid, domainSid) {\n  /* jshint ignore:start */\n  /**\n   * @function credentialListMappings\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListMappingListInstance(sid) {\n    return CredentialListMappingListInstance.get(sid);\n  }\n\n  CredentialListMappingListInstance._version = version;\n  // Path Solution\n  CredentialListMappingListInstance._solution = {accountSid: accountSid, domainSid: domainSid};\n  CredentialListMappingListInstance._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/CredentialListMappings.json`;\n  /* jshint ignore:start */\n  /**\n   * create a CredentialListMappingInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.credentialListSid -\n   *          A string that identifies the CredentialList resource to map to the SIP domain\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialListMappingInstance\n   */\n  /* jshint ignore:end */\n  CredentialListMappingListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['credentialListSid'])) {\n      throw new Error('Required parameter \"opts[\\'credentialListSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'CredentialListSid': _.get(opts, 'credentialListSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialListMappingInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.domainSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialListMappingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListMappingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialListMappingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListMappingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialListMappingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListMappingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialListMappingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialListMappingInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListMappingListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialListMappingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential_list_mapping\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList#\n   *\n   * @param {string} sid - A string that identifies the resource to fetch\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingContext}\n   */\n  /* jshint ignore:end */\n  CredentialListMappingListInstance.get = function get(sid) {\n    return new CredentialListMappingContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListMappingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListMappingListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListMappingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListMappingPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialListMappingSolution} solution - Path solution\n *\n * @returns CredentialListMappingPage\n */\n/* jshint ignore:end */\nCredentialListMappingPage = function CredentialListMappingPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialListMappingPage.prototype, Page.prototype);\nCredentialListMappingPage.prototype.constructor = CredentialListMappingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialListMappingInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingPage#\n *\n * @param {CredentialListMappingPayload} payload - Payload response from the API\n *\n * @returns CredentialListMappingInstance\n */\n/* jshint ignore:end */\nCredentialListMappingPage.prototype.getInstance = function getInstance(payload)\n    {\n  return new CredentialListMappingInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.domainSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialListMappingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialListMappingPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingInstance\n *\n * @property {string} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @property {Date} dateCreated -\n *          The date that this resource was created, given as GMT in RFC 2822 format.\n * @property {Date} dateUpdated -\n *          The date that this resource was last updated, given as GMT in RFC 2822 format.\n * @property {string} domainSid -\n *          The unique string that identifies the SipDomain resource.\n * @property {string} friendlyName -\n *          A human readable descriptive text for this resource, up to 64 characters long.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} uri -\n *          The URI for this resource, relative to https://api.twilio.com\n *\n * @param {V2010} version - Version of the resource\n * @param {CredentialListMappingPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {sid} domainSid -\n *          The unique string that identifies the SipDomain resource.\n * @param {sid} sid - A string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nCredentialListMappingInstance = function CredentialListMappingInstance(version,\n    payload, accountSid, domainSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.domainSid = payload.domain_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(CredentialListMappingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialListMappingContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.domainSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListMappingInstance\n */\n/* jshint ignore:end */\nCredentialListMappingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListMappingInstance\n */\n/* jshint ignore:end */\nCredentialListMappingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialListMappingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialListMappingInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid - The unique sid that identifies this account\n * @param {sid} domainSid -\n *          A string that identifies the SIP Domain that includes the resource to fetch\n * @param {sid} sid - A string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nCredentialListMappingContext = function CredentialListMappingContext(version,\n    accountSid, domainSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/CredentialListMappings/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListMappingInstance\n */\n/* jshint ignore:end */\nCredentialListMappingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialListMappingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListMappingInstance\n */\n/* jshint ignore:end */\nCredentialListMappingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialListMappingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialListMappingContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialListMappingList: CredentialListMappingList,\n  CredentialListMappingPage: CredentialListMappingPage,\n  CredentialListMappingInstance: CredentialListMappingInstance,\n  CredentialListMappingContext: CredentialListMappingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar IpAccessControlListMappingList;\nvar IpAccessControlListMappingPage;\nvar IpAccessControlListMappingInstance;\nvar IpAccessControlListMappingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListMappingList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {string} domainSid -\n *          The unique string that identifies the SipDomain resource.\n */\n/* jshint ignore:end */\nIpAccessControlListMappingList = function\n    IpAccessControlListMappingList(version, accountSid, domainSid) {\n  /* jshint ignore:start */\n  /**\n   * @function ipAccessControlListMappings\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingContext}\n   */\n  /* jshint ignore:end */\n  function IpAccessControlListMappingListInstance(sid) {\n    return IpAccessControlListMappingListInstance.get(sid);\n  }\n\n  IpAccessControlListMappingListInstance._version = version;\n  // Path Solution\n  IpAccessControlListMappingListInstance._solution = {accountSid: accountSid, domainSid: domainSid};\n  IpAccessControlListMappingListInstance._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/IpAccessControlListMappings.json`;\n  /* jshint ignore:start */\n  /**\n   * create a IpAccessControlListMappingInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.ipAccessControlListSid -\n   *          The unique id of the IP access control list to map to the SIP domain\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed IpAccessControlListMappingInstance\n   */\n  /* jshint ignore:end */\n  IpAccessControlListMappingListInstance.create = function create(opts, callback)\n      {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['ipAccessControlListSid'])) {\n      throw new Error('Required parameter \"opts[\\'ipAccessControlListSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'IpAccessControlListSid': _.get(opts, 'ipAccessControlListSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAccessControlListMappingInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.domainSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams IpAccessControlListMappingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  IpAccessControlListMappingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists IpAccessControlListMappingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAccessControlListMappingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of IpAccessControlListMappingInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAccessControlListMappingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAccessControlListMappingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of IpAccessControlListMappingInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAccessControlListMappingListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAccessControlListMappingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a ip_access_control_list_mapping\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies the resource to fetch.\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingContext}\n   */\n  /* jshint ignore:end */\n  IpAccessControlListMappingListInstance.get = function get(sid) {\n    return new IpAccessControlListMappingContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  IpAccessControlListMappingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  IpAccessControlListMappingListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return IpAccessControlListMappingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListMappingPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {IpAccessControlListMappingSolution} solution - Path solution\n *\n * @returns IpAccessControlListMappingPage\n */\n/* jshint ignore:end */\nIpAccessControlListMappingPage = function\n    IpAccessControlListMappingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(IpAccessControlListMappingPage.prototype, Page.prototype);\nIpAccessControlListMappingPage.prototype.constructor = IpAccessControlListMappingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of IpAccessControlListMappingInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingPage#\n *\n * @param {IpAccessControlListMappingPayload} payload -\n *          Payload response from the API\n *\n * @returns IpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nIpAccessControlListMappingPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new IpAccessControlListMappingInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.domainSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAccessControlListMappingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpAccessControlListMappingPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingInstance\n *\n * @property {string} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @property {Date} dateCreated -\n *          The date that this resource was created, given as GMT in RFC 2822 format.\n * @property {Date} dateUpdated -\n *          The date that this resource was last updated, given as GMT in RFC 2822 format.\n * @property {string} domainSid -\n *          The unique string that identifies the SipDomain resource.\n * @property {string} friendlyName -\n *          A human readable descriptive text for this resource, up to 64 characters long.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} uri -\n *          The URI for this resource, relative to https://api.twilio.com\n *\n * @param {V2010} version - Version of the resource\n * @param {IpAccessControlListMappingPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {sid} domainSid -\n *          The unique string that identifies the SipDomain resource.\n * @param {sid} sid -\n *          A 34 character string that uniquely identifies the resource to fetch.\n */\n/* jshint ignore:end */\nIpAccessControlListMappingInstance = function\n    IpAccessControlListMappingInstance(version, payload, accountSid, domainSid,\n    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.domainSid = payload.domain_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(IpAccessControlListMappingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new IpAccessControlListMappingContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.domainSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a IpAccessControlListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nIpAccessControlListMappingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpAccessControlListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nIpAccessControlListMappingInstance.prototype.remove = function remove(callback)\n    {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAccessControlListMappingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpAccessControlListMappingInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListMappingContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {sid} domainSid - A string that uniquely identifies the SIP Domain\n * @param {sid} sid -\n *          A 34 character string that uniquely identifies the resource to fetch.\n */\n/* jshint ignore:end */\nIpAccessControlListMappingContext = function\n    IpAccessControlListMappingContext(version, accountSid, domainSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, domainSid: domainSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/Domains/${domainSid}/IpAccessControlListMappings/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a IpAccessControlListMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nIpAccessControlListMappingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IpAccessControlListMappingInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.domainSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpAccessControlListMappingInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListMappingInstance\n */\n/* jshint ignore:end */\nIpAccessControlListMappingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAccessControlListMappingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nIpAccessControlListMappingContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  IpAccessControlListMappingList: IpAccessControlListMappingList,\n  IpAccessControlListMappingPage: IpAccessControlListMappingPage,\n  IpAccessControlListMappingInstance: IpAccessControlListMappingInstance,\n  IpAccessControlListMappingContext: IpAccessControlListMappingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AuthTypesList = require('./domain/authTypes').AuthTypesList;\nvar CredentialListMappingList = require(\n    './domain/credentialListMapping').CredentialListMappingList;\nvar IpAccessControlListMappingList = require(\n    './domain/ipAccessControlListMapping').IpAccessControlListMappingList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar DomainList;\nvar DomainPage;\nvar DomainInstance;\nvar DomainContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DomainList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nDomainList = function DomainList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function domains\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext}\n   */\n  /* jshint ignore:end */\n  function DomainListInstance(sid) {\n    return DomainListInstance.get(sid);\n  }\n\n  DomainListInstance._version = version;\n  // Path Solution\n  DomainListInstance._solution = {accountSid: accountSid};\n  DomainListInstance._uri = `/Accounts/${accountSid}/SIP/Domains.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams DomainInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DomainListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DomainInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DomainListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DomainInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DomainListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DomainPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DomainInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DomainListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DomainPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a DomainInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.domainName -\n   *          The unique address on Twilio to route SIP traffic\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.voiceUrl] - The URL we should call when receiving a call\n   * @param {string} [opts.voiceMethod] - The HTTP method to use with voice_url\n   * @param {string} [opts.voiceFallbackUrl] -\n   *          The URL we should call when an error occurs in executing TwiML\n   * @param {string} [opts.voiceFallbackMethod] -\n   *          The HTTP method to use with voice_fallback_url\n   * @param {string} [opts.voiceStatusCallbackUrl] -\n   *          The URL that we should call to pass status updates\n   * @param {string} [opts.voiceStatusCallbackMethod] -\n   *          The HTTP method we should use to call `voice_status_callback_url`\n   * @param {boolean} [opts.sipRegistration] - Whether SIP registration is allowed\n   * @param {boolean} [opts.emergencyCallingEnabled] -\n   *          Whether emergency calling is enabled for the domain.\n   * @param {boolean} [opts.secure] - Whether secure SIP is enabled for the domain\n   * @param {string} [opts.byocTrunkSid] - The SID of the BYOC Trunk resource.\n   * @param {string} [opts.emergencyCallerSid] -\n   *          Whether an emergency caller sid is configured for the domain.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed DomainInstance\n   */\n  /* jshint ignore:end */\n  DomainListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['domainName'])) {\n      throw new Error('Required parameter \"opts[\\'domainName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DomainName': _.get(opts, 'domainName'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'VoiceUrl': _.get(opts, 'voiceUrl'),\n      'VoiceMethod': _.get(opts, 'voiceMethod'),\n      'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n      'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n      'VoiceStatusCallbackUrl': _.get(opts, 'voiceStatusCallbackUrl'),\n      'VoiceStatusCallbackMethod': _.get(opts, 'voiceStatusCallbackMethod'),\n      'SipRegistration': serialize.bool(_.get(opts, 'sipRegistration')),\n      'EmergencyCallingEnabled': serialize.bool(_.get(opts, 'emergencyCallingEnabled')),\n      'Secure': serialize.bool(_.get(opts, 'secure')),\n      'ByocTrunkSid': _.get(opts, 'byocTrunkSid'),\n      'EmergencyCallerSid': _.get(opts, 'emergencyCallerSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DomainInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a domain\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext}\n   */\n  /* jshint ignore:end */\n  DomainListInstance.get = function get(sid) {\n    return new DomainContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DomainListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DomainListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DomainListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DomainPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DomainSolution} solution - Path solution\n *\n * @returns DomainPage\n */\n/* jshint ignore:end */\nDomainPage = function DomainPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DomainPage.prototype, Page.prototype);\nDomainPage.prototype.constructor = DomainPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DomainInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainPage#\n *\n * @param {DomainPayload} payload - Payload response from the API\n *\n * @returns DomainInstance\n */\n/* jshint ignore:end */\nDomainPage.prototype.getInstance = function getInstance(payload) {\n  return new DomainInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDomainPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDomainPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DomainContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} apiVersion - The API version used to process the call\n * @property {string} authType - The types of authentication mapped to the domain\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} domainName -\n *          The unique address on Twilio to route SIP traffic\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} voiceFallbackMethod -\n *          The HTTP method used with voice_fallback_url\n * @property {string} voiceFallbackUrl -\n *          The URL we call when an error occurs while executing TwiML\n * @property {string} voiceMethod - The HTTP method to use with voice_url\n * @property {string} voiceStatusCallbackMethod -\n *          The HTTP method we use to call voice_status_callback_url\n * @property {string} voiceStatusCallbackUrl -\n *          The URL that we call with status updates\n * @property {string} voiceUrl - The URL we call when receiving a call\n * @property {string} subresourceUris -\n *          A list mapping resources associated with the SIP Domain resource\n * @property {boolean} sipRegistration - Whether SIP registration is allowed\n * @property {boolean} emergencyCallingEnabled -\n *          Whether emergency calling is enabled for the domain.\n * @property {boolean} secure - Whether secure SIP is enabled for the domain\n * @property {string} byocTrunkSid - The SID of the BYOC Trunk resource.\n * @property {string} emergencyCallerSid -\n *          Whether an emergency caller sid is configured for the domain.\n *\n * @param {V2010} version - Version of the resource\n * @param {DomainPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nDomainInstance = function DomainInstance(version, payload, accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.authType = payload.auth_type; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.domainName = payload.domain_name; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceStatusCallbackMethod = payload.voice_status_callback_method; // jshint ignore:line\n  this.voiceStatusCallbackUrl = payload.voice_status_callback_url; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.sipRegistration = payload.sip_registration; // jshint ignore:line\n  this.emergencyCallingEnabled = payload.emergency_calling_enabled; // jshint ignore:line\n  this.secure = payload.secure; // jshint ignore:line\n  this.byocTrunkSid = payload.byoc_trunk_sid; // jshint ignore:line\n  this.emergencyCallerSid = payload.emergency_caller_sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(DomainInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DomainContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DomainInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DomainInstance\n */\n/* jshint ignore:end */\nDomainInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a DomainInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.voiceFallbackMethod] -\n *          The HTTP method used with voice_fallback_url\n * @param {string} [opts.voiceFallbackUrl] -\n *          The URL we should call when an error occurs in executing TwiML\n * @param {string} [opts.voiceMethod] -\n *          The HTTP method we should use with voice_url\n * @param {string} [opts.voiceStatusCallbackMethod] -\n *          The HTTP method we should use to call voice_status_callback_url\n * @param {string} [opts.voiceStatusCallbackUrl] -\n *          The URL that we should call to pass status updates\n * @param {string} [opts.voiceUrl] - The URL we should call when receiving a call\n * @param {boolean} [opts.sipRegistration] - Whether SIP registration is allowed\n * @param {string} [opts.domainName] -\n *          The unique address on Twilio to route SIP traffic\n * @param {boolean} [opts.emergencyCallingEnabled] -\n *          Whether emergency calling is enabled for the domain.\n * @param {boolean} [opts.secure] - Whether secure SIP is enabled for the domain\n * @param {string} [opts.byocTrunkSid] - The SID of the BYOC Trunk resource.\n * @param {string} [opts.emergencyCallerSid] -\n *          Whether an emergency caller sid is configured for the domain.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DomainInstance\n */\n/* jshint ignore:end */\nDomainInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a DomainInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DomainInstance\n */\n/* jshint ignore:end */\nDomainInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the ipAccessControlListMappings\n *\n * @function ipAccessControlListMappings\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList}\n */\n/* jshint ignore:end */\nDomainInstance.prototype.ipAccessControlListMappings = function\n    ipAccessControlListMappings() {\n  return this._proxy.ipAccessControlListMappings;\n};\n\n/* jshint ignore:start */\n/**\n * Access the credentialListMappings\n *\n * @function credentialListMappings\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList}\n */\n/* jshint ignore:end */\nDomainInstance.prototype.credentialListMappings = function\n    credentialListMappings() {\n  return this._proxy.credentialListMappings;\n};\n\n/* jshint ignore:start */\n/**\n * Access the auth\n *\n * @function auth\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesList}\n */\n/* jshint ignore:end */\nDomainInstance.prototype.auth = function auth() {\n  return this._proxy.auth;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDomainInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDomainInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DomainContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.DomainContext\n *\n * @property {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.IpAccessControlListMappingList} ipAccessControlListMappings -\n *          ipAccessControlListMappings resource\n * @property {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.CredentialListMappingList} credentialListMappings -\n *          credentialListMappings resource\n * @property {Twilio.Api.V2010.AccountContext.SipContext.DomainContext.AuthTypesList} auth -\n *          auth resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nDomainContext = function DomainContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/Domains/${sid}.json`;\n\n  // Dependents\n  this._ipAccessControlListMappings = undefined;\n  this._credentialListMappings = undefined;\n  this._auth = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DomainInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DomainInstance\n */\n/* jshint ignore:end */\nDomainContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DomainInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a DomainInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.voiceFallbackMethod] -\n *          The HTTP method used with voice_fallback_url\n * @param {string} [opts.voiceFallbackUrl] -\n *          The URL we should call when an error occurs in executing TwiML\n * @param {string} [opts.voiceMethod] -\n *          The HTTP method we should use with voice_url\n * @param {string} [opts.voiceStatusCallbackMethod] -\n *          The HTTP method we should use to call voice_status_callback_url\n * @param {string} [opts.voiceStatusCallbackUrl] -\n *          The URL that we should call to pass status updates\n * @param {string} [opts.voiceUrl] - The URL we should call when receiving a call\n * @param {boolean} [opts.sipRegistration] - Whether SIP registration is allowed\n * @param {string} [opts.domainName] -\n *          The unique address on Twilio to route SIP traffic\n * @param {boolean} [opts.emergencyCallingEnabled] -\n *          Whether emergency calling is enabled for the domain.\n * @param {boolean} [opts.secure] - Whether secure SIP is enabled for the domain\n * @param {string} [opts.byocTrunkSid] - The SID of the BYOC Trunk resource.\n * @param {string} [opts.emergencyCallerSid] -\n *          Whether an emergency caller sid is configured for the domain.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DomainInstance\n */\n/* jshint ignore:end */\nDomainContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n    'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n    'VoiceMethod': _.get(opts, 'voiceMethod'),\n    'VoiceStatusCallbackMethod': _.get(opts, 'voiceStatusCallbackMethod'),\n    'VoiceStatusCallbackUrl': _.get(opts, 'voiceStatusCallbackUrl'),\n    'VoiceUrl': _.get(opts, 'voiceUrl'),\n    'SipRegistration': serialize.bool(_.get(opts, 'sipRegistration')),\n    'DomainName': _.get(opts, 'domainName'),\n    'EmergencyCallingEnabled': serialize.bool(_.get(opts, 'emergencyCallingEnabled')),\n    'Secure': serialize.bool(_.get(opts, 'secure')),\n    'ByocTrunkSid': _.get(opts, 'byocTrunkSid'),\n    'EmergencyCallerSid': _.get(opts, 'emergencyCallerSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DomainInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a DomainInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DomainInstance\n */\n/* jshint ignore:end */\nDomainContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(DomainContext.prototype,\n  'ipAccessControlListMappings', {\n    get: function() {\n      if (!this._ipAccessControlListMappings) {\n        this._ipAccessControlListMappings = new IpAccessControlListMappingList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n      return this._ipAccessControlListMappings;\n    }\n});\n\nObject.defineProperty(DomainContext.prototype,\n  'credentialListMappings', {\n    get: function() {\n      if (!this._credentialListMappings) {\n        this._credentialListMappings = new CredentialListMappingList(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n      return this._credentialListMappings;\n    }\n});\n\nObject.defineProperty(DomainContext.prototype,\n  'auth', {\n    get: function() {\n      if (!this._auth) {\n        this._auth = new AuthTypesList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._auth;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.DomainContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDomainContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDomainContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DomainList: DomainList,\n  DomainPage: DomainPage,\n  DomainInstance: DomainInstance,\n  DomainContext: DomainContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar IpAddressList;\nvar IpAddressPage;\nvar IpAddressInstance;\nvar IpAddressContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAddressList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {string} ipAccessControlListSid -\n *          The unique id of the IpAccessControlList resource that includes this resource.\n */\n/* jshint ignore:end */\nIpAddressList = function IpAddressList(version, accountSid,\n                                        ipAccessControlListSid) {\n  /* jshint ignore:start */\n  /**\n   * @function ipAddresses\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressContext}\n   */\n  /* jshint ignore:end */\n  function IpAddressListInstance(sid) {\n    return IpAddressListInstance.get(sid);\n  }\n\n  IpAddressListInstance._version = version;\n  // Path Solution\n  IpAddressListInstance._solution = {\n    accountSid: accountSid,\n    ipAccessControlListSid: ipAccessControlListSid\n  };\n  IpAddressListInstance._uri = `/Accounts/${accountSid}/SIP/IpAccessControlLists/${ipAccessControlListSid}/IpAddresses.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams IpAddressInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  IpAddressListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists IpAddressInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAddressListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of IpAddressInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAddressListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAddressPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of IpAddressInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAddressListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAddressPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a IpAddressInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          A human readable descriptive text for this resource, up to 64 characters long.\n   * @param {string} opts.ipAddress -\n   *          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.\n   * @param {number} [opts.cidrPrefixLength] -\n   *          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.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed IpAddressInstance\n   */\n  /* jshint ignore:end */\n  IpAddressListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['ipAddress'])) {\n      throw new Error('Required parameter \"opts[\\'ipAddress\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'IpAddress': _.get(opts, 'ipAddress'),\n      'CidrPrefixLength': _.get(opts, 'cidrPrefixLength')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAddressInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.ipAccessControlListSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a ip_address\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList#\n   *\n   * @param {string} sid - A string that identifies the IpAddress resource to fetch\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressContext}\n   */\n  /* jshint ignore:end */\n  IpAddressListInstance.get = function get(sid) {\n    return new IpAddressContext(\n      this._version,\n      this._solution.accountSid,\n      this._solution.ipAccessControlListSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  IpAddressListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  IpAddressListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return IpAddressListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAddressPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {IpAddressSolution} solution - Path solution\n *\n * @returns IpAddressPage\n */\n/* jshint ignore:end */\nIpAddressPage = function IpAddressPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(IpAddressPage.prototype, Page.prototype);\nIpAddressPage.prototype.constructor = IpAddressPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of IpAddressInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressPage#\n *\n * @param {IpAddressPayload} payload - Payload response from the API\n *\n * @returns IpAddressInstance\n */\n/* jshint ignore:end */\nIpAddressPage.prototype.getInstance = function getInstance(payload) {\n  return new IpAddressInstance(\n    this._version,\n    payload,\n    this._solution.accountSid,\n    this._solution.ipAccessControlListSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAddressPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpAddressPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAddressContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressInstance\n *\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @property {string} friendlyName -\n *          A human readable descriptive text for this resource, up to 64 characters long.\n * @property {string} ipAddress -\n *          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.\n * @property {number} cidrPrefixLength -\n *          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.\n * @property {string} ipAccessControlListSid -\n *          The unique id of the IpAccessControlList resource that includes this resource.\n * @property {Date} dateCreated -\n *          The date that this resource was created, given as GMT in RFC 2822 format.\n * @property {Date} dateUpdated -\n *          The date that this resource was last updated, given as GMT in RFC 2822 format.\n * @property {string} uri -\n *          The URI for this resource, relative to https://api.twilio.com\n *\n * @param {V2010} version - Version of the resource\n * @param {IpAddressPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          The unique id of the Account that is responsible for this resource.\n * @param {sid} ipAccessControlListSid -\n *          The unique id of the IpAccessControlList resource that includes this resource.\n * @param {sid} sid - A string that identifies the IpAddress resource to fetch\n */\n/* jshint ignore:end */\nIpAddressInstance = function IpAddressInstance(version, payload, accountSid,\n                                                ipAccessControlListSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.ipAddress = payload.ip_address; // jshint ignore:line\n  this.cidrPrefixLength = deserialize.integer(payload.cidr_prefix_length); // jshint ignore:line\n  this.ipAccessControlListSid = payload.ip_access_control_list_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    accountSid: accountSid,\n    ipAccessControlListSid: ipAccessControlListSid,\n    sid: sid || this.sid,\n  };\n};\n\nObject.defineProperty(IpAddressInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new IpAddressContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.ipAccessControlListSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a IpAddressInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAddressInstance\n */\n/* jshint ignore:end */\nIpAddressInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a IpAddressInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ipAddress] -\n *          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.\n * @param {string} [opts.friendlyName] -\n *          A human readable descriptive text for this resource, up to 64 characters long.\n * @param {number} [opts.cidrPrefixLength] -\n *          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.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAddressInstance\n */\n/* jshint ignore:end */\nIpAddressInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpAddressInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAddressInstance\n */\n/* jshint ignore:end */\nIpAddressInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAddressInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpAddressInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAddressContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid - The unique sid that identifies this account\n * @param {sid} ipAccessControlListSid -\n *          The IpAccessControlList Sid that identifies the IpAddress resources to fetch\n * @param {sid} sid - A string that identifies the IpAddress resource to fetch\n */\n/* jshint ignore:end */\nIpAddressContext = function IpAddressContext(version, accountSid,\n                                              ipAccessControlListSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, ipAccessControlListSid: ipAccessControlListSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/IpAccessControlLists/${ipAccessControlListSid}/IpAddresses/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a IpAddressInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAddressInstance\n */\n/* jshint ignore:end */\nIpAddressContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IpAddressInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.ipAccessControlListSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a IpAddressInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ipAddress] -\n *          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.\n * @param {string} [opts.friendlyName] -\n *          A human readable descriptive text for this resource, up to 64 characters long.\n * @param {number} [opts.cidrPrefixLength] -\n *          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.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAddressInstance\n */\n/* jshint ignore:end */\nIpAddressContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'IpAddress': _.get(opts, 'ipAddress'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'CidrPrefixLength': _.get(opts, 'cidrPrefixLength')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IpAddressInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.ipAccessControlListSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpAddressInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAddressInstance\n */\n/* jshint ignore:end */\nIpAddressContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAddressContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nIpAddressContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  IpAddressList: IpAddressList,\n  IpAddressPage: IpAddressPage,\n  IpAddressInstance: IpAddressInstance,\n  IpAddressContext: IpAddressContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar IpAddressList = require('./ipAccessControlList/ipAddress').IpAddressList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar IpAccessControlListList;\nvar IpAccessControlListPage;\nvar IpAccessControlListInstance;\nvar IpAccessControlListContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nIpAccessControlListList = function IpAccessControlListList(version, accountSid)\n                                                            {\n  /* jshint ignore:start */\n  /**\n   * @function ipAccessControlLists\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext}\n   */\n  /* jshint ignore:end */\n  function IpAccessControlListListInstance(sid) {\n    return IpAccessControlListListInstance.get(sid);\n  }\n\n  IpAccessControlListListInstance._version = version;\n  // Path Solution\n  IpAccessControlListListInstance._solution = {accountSid: accountSid};\n  IpAccessControlListListInstance._uri = `/Accounts/${accountSid}/SIP/IpAccessControlLists.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams IpAccessControlListInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists IpAccessControlListInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of IpAccessControlListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAccessControlListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of IpAccessControlListInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.getPage = function getPage(targetUrl, callback)\n                                                              {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAccessControlListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a IpAccessControlListInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          A human readable description of this resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed IpAccessControlListInstance\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAccessControlListInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a ip_access_control_list\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListList#\n   *\n   * @param {string} sid - A string that identifies the resource to fetch\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext}\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.get = function get(sid) {\n    return new IpAccessControlListContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  IpAccessControlListListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return IpAccessControlListListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {IpAccessControlListSolution} solution - Path solution\n *\n * @returns IpAccessControlListPage\n */\n/* jshint ignore:end */\nIpAccessControlListPage = function IpAccessControlListPage(version, response,\n                                                            solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(IpAccessControlListPage.prototype, Page.prototype);\nIpAccessControlListPage.prototype.constructor = IpAccessControlListPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of IpAccessControlListInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListPage#\n *\n * @param {IpAccessControlListPayload} payload - Payload response from the API\n *\n * @returns IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListPage.prototype.getInstance = function getInstance(payload) {\n  return new IpAccessControlListInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAccessControlListPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpAccessControlListPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListInstance\n *\n * @property {string} sid - A string that uniquely identifies this resource\n * @property {string} accountSid - The unique sid that identifies this account\n * @property {string} friendlyName - A human readable description of this resource\n * @property {Date} dateCreated - The date this resource was created\n * @property {Date} dateUpdated - The date this resource was last updated\n * @property {string} subresourceUris -\n *          The IP addresses associated with this resource.\n * @property {string} uri - The URI for this resource\n *\n * @param {V2010} version - Version of the resource\n * @param {IpAccessControlListPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n * @param {sid} sid - A string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nIpAccessControlListInstance = function IpAccessControlListInstance(version,\n    payload, accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(IpAccessControlListInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new IpAccessControlListContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a IpAccessControlListInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a IpAccessControlListInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName -\n *          A human readable description of this resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpAccessControlListInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the ipAddresses\n *\n * @function ipAddresses\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList}\n */\n/* jshint ignore:end */\nIpAccessControlListInstance.prototype.ipAddresses = function ipAddresses() {\n  return this._proxy.ipAddresses;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAccessControlListInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpAccessControlListInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext\n *\n * @property {Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext.IpAddressList} ipAddresses -\n *          ipAddresses resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid - The unique sid that identifies this account\n * @param {sid} sid - A string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nIpAccessControlListContext = function IpAccessControlListContext(version,\n    accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/SIP/IpAccessControlLists/${sid}.json`;\n\n  // Dependents\n  this._ipAddresses = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a IpAccessControlListInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IpAccessControlListInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a IpAccessControlListInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName -\n *          A human readable description of this resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['friendlyName'])) {\n    throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IpAccessControlListInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpAccessControlListInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(IpAccessControlListContext.prototype,\n  'ipAddresses', {\n    get: function() {\n      if (!this._ipAddresses) {\n        this._ipAddresses = new IpAddressList(this._version, this._solution.accountSid, this._solution.sid);\n      }\n      return this._ipAddresses;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.SipContext.IpAccessControlListContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAccessControlListContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nIpAccessControlListContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  IpAccessControlListList: IpAccessControlListList,\n  IpAccessControlListPage: IpAccessControlListPage,\n  IpAccessControlListInstance: IpAccessControlListInstance,\n  IpAccessControlListContext: IpAccessControlListContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CredentialListList = require('./sip/credentialList').CredentialListList;\nvar DomainList = require('./sip/domain').DomainList;\nvar IpAccessControlListList = require(\n    './sip/ipAccessControlList').IpAccessControlListList;\n\nvar SipList;\n\n/* jshint ignore:start */\n/**\n * Initialize the SipList\n *\n * @constructor Twilio.Api.V2010.AccountContext.SipList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nSipList = function SipList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function sip\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.SipContext}\n   */\n  /* jshint ignore:end */\n  function SipListInstance(sid) {\n    return SipListInstance.get(sid);\n  }\n\n  SipListInstance._version = version;\n  // Path Solution\n  SipListInstance._solution = {accountSid: accountSid};\n\n  // Components\n  SipListInstance._domains = undefined;\n  SipListInstance._regions = undefined;\n  SipListInstance._ipAccessControlLists = undefined;\n  SipListInstance._credentialLists = undefined;\n\n  Object.defineProperty(SipListInstance,\n    'domains', {\n      get: function domains() {\n        if (!this._domains) {\n          this._domains = new DomainList(this._version, this._solution.accountSid);\n        }\n\n        return this._domains;\n      }\n  });\n\n  Object.defineProperty(SipListInstance,\n    'ipAccessControlLists', {\n      get: function ipAccessControlLists() {\n        if (!this._ipAccessControlLists) {\n          this._ipAccessControlLists = new IpAccessControlListList(this._version, this._solution.accountSid);\n        }\n\n        return this._ipAccessControlLists;\n      }\n  });\n\n  Object.defineProperty(SipListInstance,\n    'credentialLists', {\n      get: function credentialLists() {\n        if (!this._credentialLists) {\n          this._credentialLists = new CredentialListList(this._version, this._solution.accountSid);\n        }\n\n        return this._credentialLists;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.SipList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SipListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SipListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SipListInstance;\n};\n\nmodule.exports = {\n  SipList: SipList\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TokenList;\nvar TokenPage;\nvar TokenInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the TokenList\n *\n * @constructor Twilio.Api.V2010.AccountContext.TokenList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nTokenList = function TokenList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function tokens\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.TokenContext}\n   */\n  /* jshint ignore:end */\n  function TokenListInstance(sid) {\n    return TokenListInstance.get(sid);\n  }\n\n  TokenListInstance._version = version;\n  // Path Solution\n  TokenListInstance._solution = {accountSid: accountSid};\n  TokenListInstance._uri = `/Accounts/${accountSid}/Tokens.json`;\n  /* jshint ignore:start */\n  /**\n   * create a TokenInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.TokenList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.ttl] - The duration in seconds the credentials are valid\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TokenInstance\n   */\n  /* jshint ignore:end */\n  TokenListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'Ttl': _.get(opts, 'ttl')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TokenInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.TokenList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TokenListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TokenListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TokenListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TokenPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.TokenPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TokenSolution} solution - Path solution\n *\n * @returns TokenPage\n */\n/* jshint ignore:end */\nTokenPage = function TokenPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TokenPage.prototype, Page.prototype);\nTokenPage.prototype.constructor = TokenPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TokenInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.TokenPage#\n *\n * @param {TokenPayload} payload - Payload response from the API\n *\n * @returns TokenInstance\n */\n/* jshint ignore:end */\nTokenPage.prototype.getInstance = function getInstance(payload) {\n  return new TokenInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.TokenPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTokenPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTokenPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TokenContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.TokenInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} iceServers - An array representing the ephemeral credentials\n * @property {string} password - The temporary password used for authenticating\n * @property {string} ttl - The duration in seconds the credentials are valid\n * @property {string} username -\n *          The temporary username that uniquely identifies a Token\n *\n * @param {V2010} version - Version of the resource\n * @param {TokenPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nTokenInstance = function TokenInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.iceServers = payload.ice_servers; // jshint ignore:line\n  this.password = payload.password; // jshint ignore:line\n  this.ttl = payload.ttl; // jshint ignore:line\n  this.username = payload.username; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.TokenInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTokenInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTokenInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TokenList: TokenList,\n  TokenPage: TokenPage,\n  TokenInstance: TokenInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TranscriptionList;\nvar TranscriptionPage;\nvar TranscriptionInstance;\nvar TranscriptionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TranscriptionList\n *\n * @constructor Twilio.Api.V2010.AccountContext.TranscriptionList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nTranscriptionList = function TranscriptionList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function transcriptions\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.TranscriptionContext}\n   */\n  /* jshint ignore:end */\n  function TranscriptionListInstance(sid) {\n    return TranscriptionListInstance.get(sid);\n  }\n\n  TranscriptionListInstance._version = version;\n  // Path Solution\n  TranscriptionListInstance._solution = {accountSid: accountSid};\n  TranscriptionListInstance._uri = `/Accounts/${accountSid}/Transcriptions.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams TranscriptionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.TranscriptionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TranscriptionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.TranscriptionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TranscriptionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.TranscriptionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TranscriptionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TranscriptionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.TranscriptionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TranscriptionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a transcription\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.TranscriptionList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.TranscriptionContext}\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.get = function get(sid) {\n    return new TranscriptionContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.TranscriptionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TranscriptionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TranscriptionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TranscriptionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TranscriptionPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.TranscriptionPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TranscriptionSolution} solution - Path solution\n *\n * @returns TranscriptionPage\n */\n/* jshint ignore:end */\nTranscriptionPage = function TranscriptionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TranscriptionPage.prototype, Page.prototype);\nTranscriptionPage.prototype.constructor = TranscriptionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TranscriptionInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.TranscriptionPage#\n *\n * @param {TranscriptionPayload} payload - Payload response from the API\n *\n * @returns TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionPage.prototype.getInstance = function getInstance(payload) {\n  return new TranscriptionInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.TranscriptionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTranscriptionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTranscriptionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TranscriptionContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.TranscriptionInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} apiVersion - The API version used to create the transcription\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} duration - The duration of the transcribed audio in seconds.\n * @property {number} price - The charge for the transcription\n * @property {string} priceUnit - The currency in which price is measured\n * @property {string} recordingSid -\n *          The SID that identifies the transcription's recording\n * @property {string} sid - The unique string that identifies the resource\n * @property {transcription.status} status - The status of the transcription\n * @property {string} transcriptionText - The text content of the transcription.\n * @property {string} type - The transcription type\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {TranscriptionPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTranscriptionInstance = function TranscriptionInstance(version, payload,\n                                                        accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.duration = payload.duration; // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.recordingSid = payload.recording_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.transcriptionText = payload.transcription_text; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TranscriptionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TranscriptionContext(\n          this._version,\n          this._solution.accountSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TranscriptionInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.TranscriptionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TranscriptionInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.TranscriptionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.TranscriptionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTranscriptionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTranscriptionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TranscriptionContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.TranscriptionContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTranscriptionContext = function TranscriptionContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Transcriptions/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TranscriptionInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.TranscriptionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TranscriptionInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TranscriptionInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.TranscriptionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TranscriptionInstance\n */\n/* jshint ignore:end */\nTranscriptionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.TranscriptionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTranscriptionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTranscriptionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TranscriptionList: TranscriptionList,\n  TranscriptionPage: TranscriptionPage,\n  TranscriptionInstance: TranscriptionInstance,\n  TranscriptionContext: TranscriptionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar AllTimeList;\nvar AllTimePage;\nvar AllTimeInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the AllTimeList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimeList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nAllTimeList = function AllTimeList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function allTime\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimeContext}\n   */\n  /* jshint ignore:end */\n  function AllTimeListInstance(sid) {\n    return AllTimeListInstance.get(sid);\n  }\n\n  AllTimeListInstance._version = version;\n  // Path Solution\n  AllTimeListInstance._solution = {accountSid: accountSid};\n  AllTimeListInstance._uri = `/Accounts/${accountSid}/Usage/Records/AllTime.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams AllTimeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {all_time.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AllTimeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AllTimeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {all_time.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AllTimeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AllTimeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {all_time.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AllTimeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Category': _.get(opts, 'category'),\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AllTimePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AllTimeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AllTimeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AllTimePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AllTimeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AllTimeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AllTimeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AllTimePage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimePage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AllTimeSolution} solution - Path solution\n *\n * @returns AllTimePage\n */\n/* jshint ignore:end */\nAllTimePage = function AllTimePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AllTimePage.prototype, Page.prototype);\nAllTimePage.prototype.constructor = AllTimePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AllTimeInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimePage#\n *\n * @param {AllTimePayload} payload - Payload response from the API\n *\n * @returns AllTimeInstance\n */\n/* jshint ignore:end */\nAllTimePage.prototype.getInstance = function getInstance(payload) {\n  return new AllTimeInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAllTimePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAllTimePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AllTimeContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimeInstance\n *\n * @property {string} accountSid - The SID of the Account accrued the usage\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} asOf - Usage records up to date as of this timestamp\n * @property {all_time.category} category - The category of usage\n * @property {string} count - The number of usage events\n * @property {string} countUnit - The units in which count is measured\n * @property {string} description -\n *          A plain-language description of the usage category\n * @property {Date} endDate -\n *          The last date for which usage is included in the UsageRecord\n * @property {number} price - The total price of the usage\n * @property {string} priceUnit - The currency in which `price` is measured\n * @property {Date} startDate -\n *          The first date for which usage is included in this UsageRecord\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} usage - The amount of usage\n * @property {string} usageUnit - The units in which usage is measured\n *\n * @param {V2010} version - Version of the resource\n * @param {AllTimePayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nAllTimeInstance = function AllTimeInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.asOf = payload.as_of; // jshint ignore:line\n  this.category = payload.category; // jshint ignore:line\n  this.count = payload.count; // jshint ignore:line\n  this.countUnit = payload.count_unit; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usage = payload.usage; // jshint ignore:line\n  this.usageUnit = payload.usage_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.AllTimeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAllTimeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAllTimeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AllTimeList: AllTimeList,\n  AllTimePage: AllTimePage,\n  AllTimeInstance: AllTimeInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar DailyList;\nvar DailyPage;\nvar DailyInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the DailyList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nDailyList = function DailyList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function daily\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyContext}\n   */\n  /* jshint ignore:end */\n  function DailyListInstance(sid) {\n    return DailyListInstance.get(sid);\n  }\n\n  DailyListInstance._version = version;\n  // Path Solution\n  DailyListInstance._solution = {accountSid: accountSid};\n  DailyListInstance._uri = `/Accounts/${accountSid}/Usage/Records/Daily.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams DailyInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {daily.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DailyListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DailyInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {daily.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DailyListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DailyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {daily.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DailyListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Category': _.get(opts, 'category'),\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DailyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DailyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DailyListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DailyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DailyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DailyListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DailyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DailyPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DailySolution} solution - Path solution\n *\n * @returns DailyPage\n */\n/* jshint ignore:end */\nDailyPage = function DailyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DailyPage.prototype, Page.prototype);\nDailyPage.prototype.constructor = DailyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DailyInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyPage#\n *\n * @param {DailyPayload} payload - Payload response from the API\n *\n * @returns DailyInstance\n */\n/* jshint ignore:end */\nDailyPage.prototype.getInstance = function getInstance(payload) {\n  return new DailyInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDailyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDailyPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DailyContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyInstance\n *\n * @property {string} accountSid - The SID of the Account accrued the usage\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} asOf - Usage records up to date as of this timestamp\n * @property {daily.category} category - The category of usage\n * @property {string} count - The number of usage events\n * @property {string} countUnit - The units in which count is measured\n * @property {string} description -\n *          A plain-language description of the usage category\n * @property {Date} endDate -\n *          The last date for which usage is included in the UsageRecord\n * @property {number} price - The total price of the usage\n * @property {string} priceUnit - The currency in which `price` is measured\n * @property {Date} startDate -\n *          The first date for which usage is included in this UsageRecord\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} usage - The amount of usage\n * @property {string} usageUnit - The units in which usage is measured\n *\n * @param {V2010} version - Version of the resource\n * @param {DailyPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nDailyInstance = function DailyInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.asOf = payload.as_of; // jshint ignore:line\n  this.category = payload.category; // jshint ignore:line\n  this.count = payload.count; // jshint ignore:line\n  this.countUnit = payload.count_unit; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usage = payload.usage; // jshint ignore:line\n  this.usageUnit = payload.usage_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.DailyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDailyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDailyInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DailyList: DailyList,\n  DailyPage: DailyPage,\n  DailyInstance: DailyInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar LastMonthList;\nvar LastMonthPage;\nvar LastMonthInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the LastMonthList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nLastMonthList = function LastMonthList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function lastMonth\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthContext}\n   */\n  /* jshint ignore:end */\n  function LastMonthListInstance(sid) {\n    return LastMonthListInstance.get(sid);\n  }\n\n  LastMonthListInstance._version = version;\n  // Path Solution\n  LastMonthListInstance._solution = {accountSid: accountSid};\n  LastMonthListInstance._uri = `/Accounts/${accountSid}/Usage/Records/LastMonth.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams LastMonthInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {last_month.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  LastMonthListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists LastMonthInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {last_month.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LastMonthListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of LastMonthInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {last_month.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LastMonthListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Category': _.get(opts, 'category'),\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new LastMonthPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of LastMonthInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LastMonthListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new LastMonthPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  LastMonthListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  LastMonthListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return LastMonthListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the LastMonthPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {LastMonthSolution} solution - Path solution\n *\n * @returns LastMonthPage\n */\n/* jshint ignore:end */\nLastMonthPage = function LastMonthPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(LastMonthPage.prototype, Page.prototype);\nLastMonthPage.prototype.constructor = LastMonthPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of LastMonthInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthPage#\n *\n * @param {LastMonthPayload} payload - Payload response from the API\n *\n * @returns LastMonthInstance\n */\n/* jshint ignore:end */\nLastMonthPage.prototype.getInstance = function getInstance(payload) {\n  return new LastMonthInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nLastMonthPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nLastMonthPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the LastMonthContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthInstance\n *\n * @property {string} accountSid - The SID of the Account accrued the usage\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} asOf - Usage records up to date as of this timestamp\n * @property {last_month.category} category - The category of usage\n * @property {string} count - The number of usage events\n * @property {string} countUnit - The units in which count is measured\n * @property {string} description -\n *          A plain-language description of the usage category\n * @property {Date} endDate -\n *          The last date for which usage is included in the UsageRecord\n * @property {number} price - The total price of the usage\n * @property {string} priceUnit - The currency in which `price` is measured\n * @property {Date} startDate -\n *          The first date for which usage is included in this UsageRecord\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} usage - The amount of usage\n * @property {string} usageUnit - The units in which usage is measured\n *\n * @param {V2010} version - Version of the resource\n * @param {LastMonthPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nLastMonthInstance = function LastMonthInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.asOf = payload.as_of; // jshint ignore:line\n  this.category = payload.category; // jshint ignore:line\n  this.count = payload.count; // jshint ignore:line\n  this.countUnit = payload.count_unit; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usage = payload.usage; // jshint ignore:line\n  this.usageUnit = payload.usage_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.LastMonthInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nLastMonthInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nLastMonthInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  LastMonthList: LastMonthList,\n  LastMonthPage: LastMonthPage,\n  LastMonthInstance: LastMonthInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar MonthlyList;\nvar MonthlyPage;\nvar MonthlyInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the MonthlyList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nMonthlyList = function MonthlyList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function monthly\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyContext}\n   */\n  /* jshint ignore:end */\n  function MonthlyListInstance(sid) {\n    return MonthlyListInstance.get(sid);\n  }\n\n  MonthlyListInstance._version = version;\n  // Path Solution\n  MonthlyListInstance._solution = {accountSid: accountSid};\n  MonthlyListInstance._uri = `/Accounts/${accountSid}/Usage/Records/Monthly.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams MonthlyInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {monthly.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MonthlyListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MonthlyInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {monthly.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MonthlyListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MonthlyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {monthly.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MonthlyListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Category': _.get(opts, 'category'),\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MonthlyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MonthlyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MonthlyListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MonthlyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MonthlyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MonthlyListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MonthlyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MonthlyPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MonthlySolution} solution - Path solution\n *\n * @returns MonthlyPage\n */\n/* jshint ignore:end */\nMonthlyPage = function MonthlyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MonthlyPage.prototype, Page.prototype);\nMonthlyPage.prototype.constructor = MonthlyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MonthlyInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyPage#\n *\n * @param {MonthlyPayload} payload - Payload response from the API\n *\n * @returns MonthlyInstance\n */\n/* jshint ignore:end */\nMonthlyPage.prototype.getInstance = function getInstance(payload) {\n  return new MonthlyInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMonthlyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMonthlyPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MonthlyContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyInstance\n *\n * @property {string} accountSid - The SID of the Account accrued the usage\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} asOf - Usage records up to date as of this timestamp\n * @property {monthly.category} category - The category of usage\n * @property {string} count - The number of usage events\n * @property {string} countUnit - The units in which count is measured\n * @property {string} description -\n *          A plain-language description of the usage category\n * @property {Date} endDate -\n *          The last date for which usage is included in the UsageRecord\n * @property {number} price - The total price of the usage\n * @property {string} priceUnit - The currency in which `price` is measured\n * @property {Date} startDate -\n *          The first date for which usage is included in this UsageRecord\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} usage - The amount of usage\n * @property {string} usageUnit - The units in which usage is measured\n *\n * @param {V2010} version - Version of the resource\n * @param {MonthlyPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nMonthlyInstance = function MonthlyInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.asOf = payload.as_of; // jshint ignore:line\n  this.category = payload.category; // jshint ignore:line\n  this.count = payload.count; // jshint ignore:line\n  this.countUnit = payload.count_unit; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usage = payload.usage; // jshint ignore:line\n  this.usageUnit = payload.usage_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.MonthlyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMonthlyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMonthlyInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MonthlyList: MonthlyList,\n  MonthlyPage: MonthlyPage,\n  MonthlyInstance: MonthlyInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar ThisMonthList;\nvar ThisMonthPage;\nvar ThisMonthInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the ThisMonthList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nThisMonthList = function ThisMonthList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function thisMonth\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthContext}\n   */\n  /* jshint ignore:end */\n  function ThisMonthListInstance(sid) {\n    return ThisMonthListInstance.get(sid);\n  }\n\n  ThisMonthListInstance._version = version;\n  // Path Solution\n  ThisMonthListInstance._solution = {accountSid: accountSid};\n  ThisMonthListInstance._uri = `/Accounts/${accountSid}/Usage/Records/ThisMonth.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams ThisMonthInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {this_month.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ThisMonthListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ThisMonthInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {this_month.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ThisMonthListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ThisMonthInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {this_month.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ThisMonthListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Category': _.get(opts, 'category'),\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ThisMonthPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ThisMonthInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ThisMonthListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ThisMonthPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ThisMonthListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ThisMonthListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ThisMonthListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ThisMonthPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ThisMonthSolution} solution - Path solution\n *\n * @returns ThisMonthPage\n */\n/* jshint ignore:end */\nThisMonthPage = function ThisMonthPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ThisMonthPage.prototype, Page.prototype);\nThisMonthPage.prototype.constructor = ThisMonthPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ThisMonthInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthPage#\n *\n * @param {ThisMonthPayload} payload - Payload response from the API\n *\n * @returns ThisMonthInstance\n */\n/* jshint ignore:end */\nThisMonthPage.prototype.getInstance = function getInstance(payload) {\n  return new ThisMonthInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nThisMonthPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nThisMonthPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ThisMonthContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthInstance\n *\n * @property {string} accountSid - The SID of the Account accrued the usage\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} asOf - Usage records up to date as of this timestamp\n * @property {this_month.category} category - The category of usage\n * @property {string} count - The number of usage events\n * @property {string} countUnit - The units in which count is measured\n * @property {string} description -\n *          A plain-language description of the usage category\n * @property {Date} endDate -\n *          The last date for which usage is included in the UsageRecord\n * @property {number} price - The total price of the usage\n * @property {string} priceUnit - The currency in which `price` is measured\n * @property {Date} startDate -\n *          The first date for which usage is included in this UsageRecord\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} usage - The amount of usage\n * @property {string} usageUnit - The units in which usage is measured\n *\n * @param {V2010} version - Version of the resource\n * @param {ThisMonthPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nThisMonthInstance = function ThisMonthInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.asOf = payload.as_of; // jshint ignore:line\n  this.category = payload.category; // jshint ignore:line\n  this.count = payload.count; // jshint ignore:line\n  this.countUnit = payload.count_unit; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usage = payload.usage; // jshint ignore:line\n  this.usageUnit = payload.usage_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.ThisMonthInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nThisMonthInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nThisMonthInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ThisMonthList: ThisMonthList,\n  ThisMonthPage: ThisMonthPage,\n  ThisMonthInstance: ThisMonthInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar TodayList;\nvar TodayPage;\nvar TodayInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the TodayList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nTodayList = function TodayList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function today\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayContext}\n   */\n  /* jshint ignore:end */\n  function TodayListInstance(sid) {\n    return TodayListInstance.get(sid);\n  }\n\n  TodayListInstance._version = version;\n  // Path Solution\n  TodayListInstance._solution = {accountSid: accountSid};\n  TodayListInstance._uri = `/Accounts/${accountSid}/Usage/Records/Today.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams TodayInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {today.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TodayListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TodayInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {today.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TodayListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TodayInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {today.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TodayListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Category': _.get(opts, 'category'),\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TodayPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TodayInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TodayListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TodayPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TodayListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TodayListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TodayListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TodayPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TodaySolution} solution - Path solution\n *\n * @returns TodayPage\n */\n/* jshint ignore:end */\nTodayPage = function TodayPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TodayPage.prototype, Page.prototype);\nTodayPage.prototype.constructor = TodayPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TodayInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayPage#\n *\n * @param {TodayPayload} payload - Payload response from the API\n *\n * @returns TodayInstance\n */\n/* jshint ignore:end */\nTodayPage.prototype.getInstance = function getInstance(payload) {\n  return new TodayInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTodayPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTodayPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TodayContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayInstance\n *\n * @property {string} accountSid - The SID of the Account accrued the usage\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} asOf - Usage records up to date as of this timestamp\n * @property {today.category} category - The category of usage\n * @property {string} count - The number of usage events\n * @property {string} countUnit - The units in which count is measured\n * @property {string} description -\n *          A plain-language description of the usage category\n * @property {Date} endDate -\n *          The last date for which usage is included in the UsageRecord\n * @property {number} price - The total price of the usage\n * @property {string} priceUnit - The currency in which `price` is measured\n * @property {Date} startDate -\n *          The first date for which usage is included in this UsageRecord\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} usage - The amount of usage\n * @property {string} usageUnit - The units in which usage is measured\n *\n * @param {V2010} version - Version of the resource\n * @param {TodayPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nTodayInstance = function TodayInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.asOf = payload.as_of; // jshint ignore:line\n  this.category = payload.category; // jshint ignore:line\n  this.count = payload.count; // jshint ignore:line\n  this.countUnit = payload.count_unit; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usage = payload.usage; // jshint ignore:line\n  this.usageUnit = payload.usage_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.TodayInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTodayInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTodayInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TodayList: TodayList,\n  TodayPage: TodayPage,\n  TodayInstance: TodayInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar YearlyList;\nvar YearlyPage;\nvar YearlyInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the YearlyList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nYearlyList = function YearlyList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function yearly\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyContext}\n   */\n  /* jshint ignore:end */\n  function YearlyListInstance(sid) {\n    return YearlyListInstance.get(sid);\n  }\n\n  YearlyListInstance._version = version;\n  // Path Solution\n  YearlyListInstance._solution = {accountSid: accountSid};\n  YearlyListInstance._uri = `/Accounts/${accountSid}/Usage/Records/Yearly.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams YearlyInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {yearly.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  YearlyListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists YearlyInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {yearly.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  YearlyListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of YearlyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {yearly.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  YearlyListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Category': _.get(opts, 'category'),\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new YearlyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of YearlyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  YearlyListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new YearlyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  YearlyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  YearlyListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return YearlyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the YearlyPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {YearlySolution} solution - Path solution\n *\n * @returns YearlyPage\n */\n/* jshint ignore:end */\nYearlyPage = function YearlyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(YearlyPage.prototype, Page.prototype);\nYearlyPage.prototype.constructor = YearlyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of YearlyInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyPage#\n *\n * @param {YearlyPayload} payload - Payload response from the API\n *\n * @returns YearlyInstance\n */\n/* jshint ignore:end */\nYearlyPage.prototype.getInstance = function getInstance(payload) {\n  return new YearlyInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nYearlyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nYearlyPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the YearlyContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyInstance\n *\n * @property {string} accountSid - The SID of the Account accrued the usage\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} asOf - Usage records up to date as of this timestamp\n * @property {yearly.category} category - The category of usage\n * @property {string} count - The number of usage events\n * @property {string} countUnit - The units in which count is measured\n * @property {string} description -\n *          A plain-language description of the usage category\n * @property {Date} endDate -\n *          The last date for which usage is included in the UsageRecord\n * @property {number} price - The total price of the usage\n * @property {string} priceUnit - The currency in which `price` is measured\n * @property {Date} startDate -\n *          The first date for which usage is included in this UsageRecord\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} usage - The amount of usage\n * @property {string} usageUnit - The units in which usage is measured\n *\n * @param {V2010} version - Version of the resource\n * @param {YearlyPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nYearlyInstance = function YearlyInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.asOf = payload.as_of; // jshint ignore:line\n  this.category = payload.category; // jshint ignore:line\n  this.count = payload.count; // jshint ignore:line\n  this.countUnit = payload.count_unit; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usage = payload.usage; // jshint ignore:line\n  this.usageUnit = payload.usage_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YearlyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nYearlyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nYearlyInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  YearlyList: YearlyList,\n  YearlyPage: YearlyPage,\n  YearlyInstance: YearlyInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar YesterdayList;\nvar YesterdayPage;\nvar YesterdayInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the YesterdayList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nYesterdayList = function YesterdayList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function yesterday\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayContext}\n   */\n  /* jshint ignore:end */\n  function YesterdayListInstance(sid) {\n    return YesterdayListInstance.get(sid);\n  }\n\n  YesterdayListInstance._version = version;\n  // Path Solution\n  YesterdayListInstance._solution = {accountSid: accountSid};\n  YesterdayListInstance._uri = `/Accounts/${accountSid}/Usage/Records/Yesterday.json`;\n  /* jshint ignore:start */\n  /**\n   * Streams YesterdayInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {yesterday.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  YesterdayListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists YesterdayInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {yesterday.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  YesterdayListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of YesterdayInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {yesterday.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  YesterdayListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Category': _.get(opts, 'category'),\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new YesterdayPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of YesterdayInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  YesterdayListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new YesterdayPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  YesterdayListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  YesterdayListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return YesterdayListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the YesterdayPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {YesterdaySolution} solution - Path solution\n *\n * @returns YesterdayPage\n */\n/* jshint ignore:end */\nYesterdayPage = function YesterdayPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(YesterdayPage.prototype, Page.prototype);\nYesterdayPage.prototype.constructor = YesterdayPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of YesterdayInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayPage#\n *\n * @param {YesterdayPayload} payload - Payload response from the API\n *\n * @returns YesterdayInstance\n */\n/* jshint ignore:end */\nYesterdayPage.prototype.getInstance = function getInstance(payload) {\n  return new YesterdayInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nYesterdayPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nYesterdayPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the YesterdayContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayInstance\n *\n * @property {string} accountSid - The SID of the Account accrued the usage\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} asOf - Usage records up to date as of this timestamp\n * @property {yesterday.category} category - The category of usage\n * @property {string} count - The number of usage events\n * @property {string} countUnit - The units in which count is measured\n * @property {string} description -\n *          A plain-language description of the usage category\n * @property {Date} endDate -\n *          The last date for which usage is included in the UsageRecord\n * @property {number} price - The total price of the usage\n * @property {string} priceUnit - The currency in which `price` is measured\n * @property {Date} startDate -\n *          The first date for which usage is included in this UsageRecord\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} usage - The amount of usage\n * @property {string} usageUnit - The units in which usage is measured\n *\n * @param {V2010} version - Version of the resource\n * @param {YesterdayPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nYesterdayInstance = function YesterdayInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.asOf = payload.as_of; // jshint ignore:line\n  this.category = payload.category; // jshint ignore:line\n  this.count = payload.count; // jshint ignore:line\n  this.countUnit = payload.count_unit; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usage = payload.usage; // jshint ignore:line\n  this.usageUnit = payload.usage_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordContext.YesterdayInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nYesterdayInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nYesterdayInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  YesterdayList: YesterdayList,\n  YesterdayPage: YesterdayPage,\n  YesterdayInstance: YesterdayInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AllTimeList = require('./record/allTime').AllTimeList;\nvar DailyList = require('./record/daily').DailyList;\nvar LastMonthList = require('./record/lastMonth').LastMonthList;\nvar MonthlyList = require('./record/monthly').MonthlyList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar ThisMonthList = require('./record/thisMonth').ThisMonthList;\nvar TodayList = require('./record/today').TodayList;\nvar YearlyList = require('./record/yearly').YearlyList;\nvar YesterdayList = require('./record/yesterday').YesterdayList;\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar RecordList;\nvar RecordPage;\nvar RecordInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nRecordList = function RecordList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function records\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.RecordContext}\n   */\n  /* jshint ignore:end */\n  function RecordListInstance(sid) {\n    return RecordListInstance.get(sid);\n  }\n\n  RecordListInstance._version = version;\n  // Path Solution\n  RecordListInstance._solution = {accountSid: accountSid};\n  RecordListInstance._uri = `/Accounts/${accountSid}/Usage/Records.json`;\n\n  // Components\n  RecordListInstance._allTime = undefined;\n  RecordListInstance._daily = undefined;\n  RecordListInstance._lastMonth = undefined;\n  RecordListInstance._monthly = undefined;\n  RecordListInstance._thisMonth = undefined;\n  RecordListInstance._today = undefined;\n  RecordListInstance._yearly = undefined;\n  RecordListInstance._yesterday = undefined;\n\n  /* jshint ignore:start */\n  /**\n   * Streams RecordInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {record.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RecordListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RecordInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {record.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {record.category} [opts.category] -\n   *          The usage category of the UsageRecord resources to read\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {boolean} [opts.includeSubaccounts] -\n   *          Whether to include usage from the master account and all its subaccounts\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Category': _.get(opts, 'category'),\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  Object.defineProperty(RecordListInstance,\n    'allTime', {\n      get: function allTime() {\n        if (!this._allTime) {\n          this._allTime = new AllTimeList(this._version, this._solution.accountSid);\n        }\n\n        return this._allTime;\n      }\n  });\n\n  Object.defineProperty(RecordListInstance,\n    'daily', {\n      get: function daily() {\n        if (!this._daily) {\n          this._daily = new DailyList(this._version, this._solution.accountSid);\n        }\n\n        return this._daily;\n      }\n  });\n\n  Object.defineProperty(RecordListInstance,\n    'lastMonth', {\n      get: function lastMonth() {\n        if (!this._lastMonth) {\n          this._lastMonth = new LastMonthList(this._version, this._solution.accountSid);\n        }\n\n        return this._lastMonth;\n      }\n  });\n\n  Object.defineProperty(RecordListInstance,\n    'monthly', {\n      get: function monthly() {\n        if (!this._monthly) {\n          this._monthly = new MonthlyList(this._version, this._solution.accountSid);\n        }\n\n        return this._monthly;\n      }\n  });\n\n  Object.defineProperty(RecordListInstance,\n    'thisMonth', {\n      get: function thisMonth() {\n        if (!this._thisMonth) {\n          this._thisMonth = new ThisMonthList(this._version, this._solution.accountSid);\n        }\n\n        return this._thisMonth;\n      }\n  });\n\n  Object.defineProperty(RecordListInstance,\n    'today', {\n      get: function today() {\n        if (!this._today) {\n          this._today = new TodayList(this._version, this._solution.accountSid);\n        }\n\n        return this._today;\n      }\n  });\n\n  Object.defineProperty(RecordListInstance,\n    'yearly', {\n      get: function yearly() {\n        if (!this._yearly) {\n          this._yearly = new YearlyList(this._version, this._solution.accountSid);\n        }\n\n        return this._yearly;\n      }\n  });\n\n  Object.defineProperty(RecordListInstance,\n    'yesterday', {\n      get: function yesterday() {\n        if (!this._yesterday) {\n          this._yesterday = new YesterdayList(this._version, this._solution.accountSid);\n        }\n\n        return this._yesterday;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RecordListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RecordListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RecordListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RecordSolution} solution - Path solution\n *\n * @returns RecordPage\n */\n/* jshint ignore:end */\nRecordPage = function RecordPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RecordPage.prototype, Page.prototype);\nRecordPage.prototype.constructor = RecordPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RecordInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordPage#\n *\n * @param {RecordPayload} payload - Payload response from the API\n *\n * @returns RecordInstance\n */\n/* jshint ignore:end */\nRecordPage.prototype.getInstance = function getInstance(payload) {\n  return new RecordInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.RecordInstance\n *\n * @property {string} accountSid - The SID of the Account accrued the usage\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} asOf - Usage records up to date as of this timestamp\n * @property {record.category} category - The category of usage\n * @property {string} count - The number of usage events\n * @property {string} countUnit - The units in which count is measured\n * @property {string} description -\n *          A plain-language description of the usage category\n * @property {Date} endDate -\n *          The last date for which usage is included in the UsageRecord\n * @property {number} price - The total price of the usage\n * @property {string} priceUnit - The currency in which `price` is measured\n * @property {Date} startDate -\n *          The first date for which usage is included in this UsageRecord\n * @property {string} subresourceUris -\n *          A list of related resources identified by their relative URIs\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {string} usage - The amount of usage\n * @property {string} usageUnit - The units in which usage is measured\n *\n * @param {V2010} version - Version of the resource\n * @param {RecordPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nRecordInstance = function RecordInstance(version, payload, accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.asOf = payload.as_of; // jshint ignore:line\n  this.category = payload.category; // jshint ignore:line\n  this.count = payload.count; // jshint ignore:line\n  this.countUnit = payload.count_unit; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.endDate = deserialize.iso8601Date(payload.end_date); // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.startDate = deserialize.iso8601Date(payload.start_date); // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usage = payload.usage; // jshint ignore:line\n  this.usageUnit = payload.usage_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.RecordInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RecordList: RecordList,\n  RecordPage: RecordPage,\n  RecordInstance: RecordInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TriggerList;\nvar TriggerPage;\nvar TriggerInstance;\nvar TriggerContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TriggerList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.TriggerList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nTriggerList = function TriggerList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function triggers\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.TriggerContext}\n   */\n  /* jshint ignore:end */\n  function TriggerListInstance(sid) {\n    return TriggerListInstance.get(sid);\n  }\n\n  TriggerListInstance._version = version;\n  // Path Solution\n  TriggerListInstance._solution = {accountSid: accountSid};\n  TriggerListInstance._uri = `/Accounts/${accountSid}/Usage/Triggers.json`;\n  /* jshint ignore:start */\n  /**\n   * create a TriggerInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.callbackUrl - The URL we call when the trigger fires\n   * @param {string} opts.triggerValue -\n   *          The usage value at which the trigger should fire\n   * @param {trigger.usage_category} opts.usageCategory -\n   *          The usage category the trigger watches\n   * @param {string} [opts.callbackMethod] -\n   *          The HTTP method to use to call callback_url\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {trigger.recurring} [opts.recurring] -\n   *          The frequency of a recurring UsageTrigger\n   * @param {trigger.trigger_field} [opts.triggerBy] -\n   *          The field in the UsageRecord resource that fires the trigger\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TriggerInstance\n   */\n  /* jshint ignore:end */\n  TriggerListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['callbackUrl'])) {\n      throw new Error('Required parameter \"opts[\\'callbackUrl\\']\" missing.');\n    }\n    if (_.isUndefined(opts['triggerValue'])) {\n      throw new Error('Required parameter \"opts[\\'triggerValue\\']\" missing.');\n    }\n    if (_.isUndefined(opts['usageCategory'])) {\n      throw new Error('Required parameter \"opts[\\'usageCategory\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'CallbackUrl': _.get(opts, 'callbackUrl'),\n      'TriggerValue': _.get(opts, 'triggerValue'),\n      'UsageCategory': _.get(opts, 'usageCategory'),\n      'CallbackMethod': _.get(opts, 'callbackMethod'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Recurring': _.get(opts, 'recurring'),\n      'TriggerBy': _.get(opts, 'triggerBy')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TriggerInstance(\n        this._version,\n        payload,\n        this._solution.accountSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams TriggerInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {trigger.recurring} [opts.recurring] -\n   *          The frequency of recurring UsageTriggers to read\n   * @param {trigger.trigger_field} [opts.triggerBy] -\n   *          The trigger field of the UsageTriggers to read\n   * @param {trigger.usage_category} [opts.usageCategory] -\n   *          The usage category of the UsageTriggers to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TriggerListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TriggerInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {trigger.recurring} [opts.recurring] -\n   *          The frequency of recurring UsageTriggers to read\n   * @param {trigger.trigger_field} [opts.triggerBy] -\n   *          The trigger field of the UsageTriggers to read\n   * @param {trigger.usage_category} [opts.usageCategory] -\n   *          The usage category of the UsageTriggers to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TriggerListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TriggerInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {trigger.recurring} [opts.recurring] -\n   *          The frequency of recurring UsageTriggers to read\n   * @param {trigger.trigger_field} [opts.triggerBy] -\n   *          The trigger field of the UsageTriggers to read\n   * @param {trigger.usage_category} [opts.usageCategory] -\n   *          The usage category of the UsageTriggers to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TriggerListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Recurring': _.get(opts, 'recurring'),\n      'TriggerBy': _.get(opts, 'triggerBy'),\n      'UsageCategory': _.get(opts, 'usageCategory'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TriggerPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TriggerInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TriggerListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TriggerPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a trigger\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext.TriggerContext}\n   */\n  /* jshint ignore:end */\n  TriggerListInstance.get = function get(sid) {\n    return new TriggerContext(this._version, this._solution.accountSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TriggerListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TriggerListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TriggerListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TriggerPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.TriggerPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TriggerSolution} solution - Path solution\n *\n * @returns TriggerPage\n */\n/* jshint ignore:end */\nTriggerPage = function TriggerPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TriggerPage.prototype, Page.prototype);\nTriggerPage.prototype.constructor = TriggerPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TriggerInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerPage#\n *\n * @param {TriggerPayload} payload - Payload response from the API\n *\n * @returns TriggerInstance\n */\n/* jshint ignore:end */\nTriggerPage.prototype.getInstance = function getInstance(payload) {\n  return new TriggerInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTriggerPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTriggerPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TriggerContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.TriggerInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that this trigger monitors\n * @property {string} apiVersion - The API version used to create the resource\n * @property {string} callbackMethod - The HTTP method we use to call callback_url\n * @property {string} callbackUrl - he URL we call when the trigger fires\n * @property {string} currentValue -\n *          The current value of the field the trigger is watching\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateFired -\n *          The RFC 2822 date and time in GMT that the trigger was last fired\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the trigger\n * @property {trigger.recurring} recurring -\n *          The frequency of a recurring UsageTrigger\n * @property {string} sid - The unique string that identifies the resource\n * @property {trigger.trigger_field} triggerBy -\n *          The field in the UsageRecord resource that fires the trigger\n * @property {string} triggerValue - The value at which the trigger will fire\n * @property {string} uri -\n *          The URI of the resource, relative to `https://api.twilio.com`\n * @property {trigger.usage_category} usageCategory -\n *          The usage category the trigger watches\n * @property {string} usageRecordUri -\n *          The URI of the UsageRecord resource this trigger watches\n *\n * @param {V2010} version - Version of the resource\n * @param {TriggerPayload} payload - The instance payload\n * @param {sid} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTriggerInstance = function TriggerInstance(version, payload, accountSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.callbackMethod = payload.callback_method; // jshint ignore:line\n  this.callbackUrl = payload.callback_url; // jshint ignore:line\n  this.currentValue = payload.current_value; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateFired = deserialize.rfc2822DateTime(payload.date_fired); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.recurring = payload.recurring; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.triggerBy = payload.trigger_by; // jshint ignore:line\n  this.triggerValue = payload.trigger_value; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n  this.usageCategory = payload.usage_category; // jshint ignore:line\n  this.usageRecordUri = payload.usage_record_uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TriggerInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TriggerContext(this._version, this._solution.accountSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TriggerInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TriggerInstance\n */\n/* jshint ignore:end */\nTriggerInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TriggerInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.callbackMethod] -\n *          The HTTP method to use to call callback_url\n * @param {string} [opts.callbackUrl] - The URL we call when the trigger fires\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TriggerInstance\n */\n/* jshint ignore:end */\nTriggerInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TriggerInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TriggerInstance\n */\n/* jshint ignore:end */\nTriggerInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTriggerInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTriggerInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TriggerContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageContext.TriggerContext\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} accountSid -\n *          The SID of the Account that created the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTriggerContext = function TriggerContext(version, accountSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {accountSid: accountSid, sid: sid, };\n  this._uri = `/Accounts/${accountSid}/Usage/Triggers/${sid}.json`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TriggerInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TriggerInstance\n */\n/* jshint ignore:end */\nTriggerContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TriggerInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TriggerInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.callbackMethod] -\n *          The HTTP method to use to call callback_url\n * @param {string} [opts.callbackUrl] - The URL we call when the trigger fires\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TriggerInstance\n */\n/* jshint ignore:end */\nTriggerContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'CallbackMethod': _.get(opts, 'callbackMethod'),\n    'CallbackUrl': _.get(opts, 'callbackUrl'),\n    'FriendlyName': _.get(opts, 'friendlyName')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TriggerInstance(\n      this._version,\n      payload,\n      this._solution.accountSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TriggerInstance\n *\n * @function remove\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TriggerInstance\n */\n/* jshint ignore:end */\nTriggerContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.UsageContext.TriggerContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTriggerContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTriggerContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TriggerList: TriggerList,\n  TriggerPage: TriggerPage,\n  TriggerInstance: TriggerInstance,\n  TriggerContext: TriggerContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar RecordList = require('./usage/record').RecordList;\nvar TriggerList = require('./usage/trigger').TriggerList;\n\nvar UsageList;\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageList\n *\n * @constructor Twilio.Api.V2010.AccountContext.UsageList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nUsageList = function UsageList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function usage\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.UsageContext}\n   */\n  /* jshint ignore:end */\n  function UsageListInstance(sid) {\n    return UsageListInstance.get(sid);\n  }\n\n  UsageListInstance._version = version;\n  // Path Solution\n  UsageListInstance._solution = {accountSid: accountSid};\n\n  // Components\n  UsageListInstance._records = undefined;\n  UsageListInstance._triggers = undefined;\n\n  Object.defineProperty(UsageListInstance,\n    'records', {\n      get: function records() {\n        if (!this._records) {\n          this._records = new RecordList(this._version, this._solution.accountSid);\n        }\n\n        return this._records;\n      }\n  });\n\n  Object.defineProperty(UsageListInstance,\n    'triggers', {\n      get: function triggers() {\n        if (!this._triggers) {\n          this._triggers = new TriggerList(this._version, this._solution.accountSid);\n        }\n\n        return this._triggers;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.UsageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UsageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UsageListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UsageListInstance;\n};\n\nmodule.exports = {\n  UsageList: UsageList\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ValidationRequestList;\nvar ValidationRequestPage;\nvar ValidationRequestInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the ValidationRequestList\n *\n * @constructor Twilio.Api.V2010.AccountContext.ValidationRequestList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n * @param {string} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nValidationRequestList = function ValidationRequestList(version, accountSid) {\n  /* jshint ignore:start */\n  /**\n   * @function validationRequests\n   * @memberof Twilio.Api.V2010.AccountContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext.ValidationRequestContext}\n   */\n  /* jshint ignore:end */\n  function ValidationRequestListInstance(sid) {\n    return ValidationRequestListInstance.get(sid);\n  }\n\n  ValidationRequestListInstance._version = version;\n  // Path Solution\n  ValidationRequestListInstance._solution = {accountSid: accountSid};\n  ValidationRequestListInstance._uri = `/Accounts/${accountSid}/OutgoingCallerIds.json`;\n  /* jshint ignore:start */\n  /**\n   * create a ValidationRequestInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountContext.ValidationRequestList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.phoneNumber - The phone number to verify in E.164 format\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {number} [opts.callDelay] -\n   *          The number of seconds to delay before initiating the verification call\n   * @param {string} [opts.extension] -\n   *          The digits to dial after connecting the verification call\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method we should use to call status_callback\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ValidationRequestInstance\n   */\n  /* jshint ignore:end */\n  ValidationRequestListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['phoneNumber'])) {\n      throw new Error('Required parameter \"opts[\\'phoneNumber\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'CallDelay': _.get(opts, 'callDelay'),\n      'Extension': _.get(opts, 'extension'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ValidationRequestInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountContext.ValidationRequestList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ValidationRequestListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ValidationRequestListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ValidationRequestListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ValidationRequestPage\n *\n * @constructor Twilio.Api.V2010.AccountContext.ValidationRequestPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ValidationRequestSolution} solution - Path solution\n *\n * @returns ValidationRequestPage\n */\n/* jshint ignore:end */\nValidationRequestPage = function ValidationRequestPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ValidationRequestPage.prototype, Page.prototype);\nValidationRequestPage.prototype.constructor = ValidationRequestPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ValidationRequestInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountContext.ValidationRequestPage#\n *\n * @param {ValidationRequestPayload} payload - Payload response from the API\n *\n * @returns ValidationRequestInstance\n */\n/* jshint ignore:end */\nValidationRequestPage.prototype.getInstance = function getInstance(payload) {\n  return new ValidationRequestInstance(this._version, payload, this._solution.accountSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ValidationRequestPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nValidationRequestPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nValidationRequestPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ValidationRequestContext\n *\n * @constructor Twilio.Api.V2010.AccountContext.ValidationRequestInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} callSid - The SID of the Call the resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} phoneNumber - The phone number to verify in E.164 format\n * @property {string} validationCode -\n *          The 6 digit validation code that someone must enter to validate the Caller ID  when `phone_number` is called\n *\n * @param {V2010} version - Version of the resource\n * @param {ValidationRequestPayload} payload - The instance payload\n * @param {sid} accountSid - The SID of the Account that created the resource\n */\n/* jshint ignore:end */\nValidationRequestInstance = function ValidationRequestInstance(version, payload,\n    accountSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.validationCode = payload.validation_code; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {accountSid: accountSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext.ValidationRequestInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nValidationRequestInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nValidationRequestInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ValidationRequestList: ValidationRequestList,\n  ValidationRequestPage: ValidationRequestPage,\n  ValidationRequestInstance: ValidationRequestInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AddressList = require('./account/address').AddressList;\nvar ApplicationList = require('./account/application').ApplicationList;\nvar AuthorizedConnectAppList = require(\n    './account/authorizedConnectApp').AuthorizedConnectAppList;\nvar AvailablePhoneNumberCountryList = require(\n    './account/availablePhoneNumber').AvailablePhoneNumberCountryList;\nvar BalanceList = require('./account/balance').BalanceList;\nvar CallList = require('./account/call').CallList;\nvar ConferenceList = require('./account/conference').ConferenceList;\nvar ConnectAppList = require('./account/connectApp').ConnectAppList;\nvar IncomingPhoneNumberList = require(\n    './account/incomingPhoneNumber').IncomingPhoneNumberList;\nvar KeyList = require('./account/key').KeyList;\nvar MessageList = require('./account/message').MessageList;\nvar NewKeyList = require('./account/newKey').NewKeyList;\nvar NewSigningKeyList = require('./account/newSigningKey').NewSigningKeyList;\nvar NotificationList = require('./account/notification').NotificationList;\nvar OutgoingCallerIdList = require(\n    './account/outgoingCallerId').OutgoingCallerIdList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar QueueList = require('./account/queue').QueueList;\nvar RecordingList = require('./account/recording').RecordingList;\nvar ShortCodeList = require('./account/shortCode').ShortCodeList;\nvar SigningKeyList = require('./account/signingKey').SigningKeyList;\nvar SipList = require('./account/sip').SipList;\nvar TokenList = require('./account/token').TokenList;\nvar TranscriptionList = require('./account/transcription').TranscriptionList;\nvar UsageList = require('./account/usage').UsageList;\nvar ValidationRequestList = require(\n    './account/validationRequest').ValidationRequestList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar AccountList;\nvar AccountPage;\nvar AccountInstance;\nvar AccountContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AccountList\n *\n * @constructor Twilio.Api.V2010.AccountList\n *\n * @param {Twilio.Api.V2010} version - Version of the resource\n */\n/* jshint ignore:end */\nAccountList = function AccountList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function accounts\n   * @memberof Twilio.Api.V2010#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Api.V2010.AccountContext}\n   */\n  /* jshint ignore:end */\n  function AccountListInstance(sid) {\n    return AccountListInstance.get(sid);\n  }\n\n  AccountListInstance._version = version;\n  // Path Solution\n  AccountListInstance._solution = {};\n  AccountListInstance._uri = `/Accounts.json`;\n  /* jshint ignore:start */\n  /**\n   * create a AccountInstance\n   *\n   * @function create\n   * @memberof Twilio.Api.V2010.AccountList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description of the account\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AccountInstance\n   */\n  /* jshint ignore:end */\n  AccountListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AccountInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams AccountInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Api.V2010.AccountList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - FriendlyName to filter on\n   * @param {account.status} [opts.status] - Status to filter on\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AccountListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AccountInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Api.V2010.AccountList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - FriendlyName to filter on\n   * @param {account.status} [opts.status] - Status to filter on\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AccountListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AccountInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Api.V2010.AccountList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - FriendlyName to filter on\n   * @param {account.status} [opts.status] - Status to filter on\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AccountListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Status': _.get(opts, 'status'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AccountPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AccountInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Api.V2010.AccountList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AccountListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AccountPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a account\n   *\n   * @function get\n   * @memberof Twilio.Api.V2010.AccountList#\n   *\n   * @param {string} sid - Fetch by unique Account Sid\n   *\n   * @returns {Twilio.Api.V2010.AccountContext}\n   */\n  /* jshint ignore:end */\n  AccountListInstance.get = function get(sid) {\n    return new AccountContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Api.V2010.AccountList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AccountListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AccountListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AccountListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AccountPage\n *\n * @constructor Twilio.Api.V2010.AccountPage\n *\n * @param {V2010} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AccountSolution} solution - Path solution\n *\n * @returns AccountPage\n */\n/* jshint ignore:end */\nAccountPage = function AccountPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AccountPage.prototype, Page.prototype);\nAccountPage.prototype.constructor = AccountPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AccountInstance\n *\n * @function getInstance\n * @memberof Twilio.Api.V2010.AccountPage#\n *\n * @param {AccountPayload} payload - Payload response from the API\n *\n * @returns AccountInstance\n */\n/* jshint ignore:end */\nAccountPage.prototype.getInstance = function getInstance(payload) {\n  return new AccountInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAccountPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAccountPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AccountContext\n *\n * @constructor Twilio.Api.V2010.AccountInstance\n *\n * @property {string} authToken - The authorization token for this account\n * @property {Date} dateCreated - The date this account was created\n * @property {Date} dateUpdated - The date this account was last updated\n * @property {string} friendlyName - A human readable description of this account\n * @property {string} ownerAccountSid -\n *          The unique 34 character id representing the parent of this account\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {account.status} status - The status of this account\n * @property {string} subresourceUris - Account Instance Subresources\n * @property {account.type} type - The type of this account\n * @property {string} uri -\n *          The URI for this resource, relative to `https://api.twilio.com`\n *\n * @param {V2010} version - Version of the resource\n * @param {AccountPayload} payload - The instance payload\n * @param {sid} sid - Fetch by unique Account Sid\n */\n/* jshint ignore:end */\nAccountInstance = function AccountInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.authToken = payload.auth_token; // jshint ignore:line\n  this.dateCreated = deserialize.rfc2822DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.rfc2822DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.ownerAccountSid = payload.owner_account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.subresourceUris = payload.subresource_uris; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.uri = payload.uri; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(AccountInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AccountContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AccountInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AccountInstance\n */\n/* jshint ignore:end */\nAccountInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AccountInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - FriendlyName to update\n * @param {account.status} [opts.status] - Status to update the Account with\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AccountInstance\n */\n/* jshint ignore:end */\nAccountInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the addresses\n *\n * @function addresses\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AddressList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.addresses = function addresses() {\n  return this._proxy.addresses;\n};\n\n/* jshint ignore:start */\n/**\n * Access the applications\n *\n * @function applications\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.ApplicationList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.applications = function applications() {\n  return this._proxy.applications;\n};\n\n/* jshint ignore:start */\n/**\n * Access the authorizedConnectApps\n *\n * @function authorizedConnectApps\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.authorizedConnectApps = function\n    authorizedConnectApps() {\n  return this._proxy.authorizedConnectApps;\n};\n\n/* jshint ignore:start */\n/**\n * Access the availablePhoneNumbers\n *\n * @function availablePhoneNumbers\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.availablePhoneNumbers = function\n    availablePhoneNumbers() {\n  return this._proxy.availablePhoneNumbers;\n};\n\n/* jshint ignore:start */\n/**\n * Access the balance\n *\n * @function balance\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.BalanceList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.balance = function balance() {\n  return this._proxy.balance;\n};\n\n/* jshint ignore:start */\n/**\n * Access the calls\n *\n * @function calls\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.CallList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.calls = function calls() {\n  return this._proxy.calls;\n};\n\n/* jshint ignore:start */\n/**\n * Access the conferences\n *\n * @function conferences\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.ConferenceList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.conferences = function conferences() {\n  return this._proxy.conferences;\n};\n\n/* jshint ignore:start */\n/**\n * Access the connectApps\n *\n * @function connectApps\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.ConnectAppList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.connectApps = function connectApps() {\n  return this._proxy.connectApps;\n};\n\n/* jshint ignore:start */\n/**\n * Access the incomingPhoneNumbers\n *\n * @function incomingPhoneNumbers\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.incomingPhoneNumbers = function incomingPhoneNumbers()\n    {\n  return this._proxy.incomingPhoneNumbers;\n};\n\n/* jshint ignore:start */\n/**\n * Access the keys\n *\n * @function keys\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.KeyList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.keys = function keys() {\n  return this._proxy.keys;\n};\n\n/* jshint ignore:start */\n/**\n * Access the messages\n *\n * @function messages\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.MessageList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.messages = function messages() {\n  return this._proxy.messages;\n};\n\n/* jshint ignore:start */\n/**\n * Access the newKeys\n *\n * @function newKeys\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.NewKeyList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.newKeys = function newKeys() {\n  return this._proxy.newKeys;\n};\n\n/* jshint ignore:start */\n/**\n * Access the newSigningKeys\n *\n * @function newSigningKeys\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.NewSigningKeyList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.newSigningKeys = function newSigningKeys() {\n  return this._proxy.newSigningKeys;\n};\n\n/* jshint ignore:start */\n/**\n * Access the notifications\n *\n * @function notifications\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.NotificationList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.notifications = function notifications() {\n  return this._proxy.notifications;\n};\n\n/* jshint ignore:start */\n/**\n * Access the outgoingCallerIds\n *\n * @function outgoingCallerIds\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.OutgoingCallerIdList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.outgoingCallerIds = function outgoingCallerIds() {\n  return this._proxy.outgoingCallerIds;\n};\n\n/* jshint ignore:start */\n/**\n * Access the queues\n *\n * @function queues\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.QueueList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.queues = function queues() {\n  return this._proxy.queues;\n};\n\n/* jshint ignore:start */\n/**\n * Access the recordings\n *\n * @function recordings\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.RecordingList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.recordings = function recordings() {\n  return this._proxy.recordings;\n};\n\n/* jshint ignore:start */\n/**\n * Access the signingKeys\n *\n * @function signingKeys\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.SigningKeyList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.signingKeys = function signingKeys() {\n  return this._proxy.signingKeys;\n};\n\n/* jshint ignore:start */\n/**\n * Access the sip\n *\n * @function sip\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.SipList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.sip = function sip() {\n  return this._proxy.sip;\n};\n\n/* jshint ignore:start */\n/**\n * Access the shortCodes\n *\n * @function shortCodes\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.ShortCodeList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.shortCodes = function shortCodes() {\n  return this._proxy.shortCodes;\n};\n\n/* jshint ignore:start */\n/**\n * Access the tokens\n *\n * @function tokens\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.TokenList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.tokens = function tokens() {\n  return this._proxy.tokens;\n};\n\n/* jshint ignore:start */\n/**\n * Access the transcriptions\n *\n * @function transcriptions\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.TranscriptionList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.transcriptions = function transcriptions() {\n  return this._proxy.transcriptions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the usage\n *\n * @function usage\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.UsageList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.usage = function usage() {\n  return this._proxy.usage;\n};\n\n/* jshint ignore:start */\n/**\n * Access the validationRequests\n *\n * @function validationRequests\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns {Twilio.Api.V2010.AccountContext.ValidationRequestList}\n */\n/* jshint ignore:end */\nAccountInstance.prototype.validationRequests = function validationRequests() {\n  return this._proxy.validationRequests;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAccountInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAccountInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AccountContext\n *\n * @constructor Twilio.Api.V2010.AccountContext\n *\n * @property {Twilio.Api.V2010.AccountContext.AddressList} addresses -\n *          addresses resource\n * @property {Twilio.Api.V2010.AccountContext.ApplicationList} applications -\n *          applications resource\n * @property {Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList} authorizedConnectApps -\n *          authorizedConnectApps resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList} availablePhoneNumbers -\n *          availablePhoneNumbers resource\n * @property {Twilio.Api.V2010.AccountContext.BalanceList} balance -\n *          balance resource\n * @property {Twilio.Api.V2010.AccountContext.CallList} calls - calls resource\n * @property {Twilio.Api.V2010.AccountContext.ConferenceList} conferences -\n *          conferences resource\n * @property {Twilio.Api.V2010.AccountContext.ConnectAppList} connectApps -\n *          connectApps resource\n * @property {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList} incomingPhoneNumbers -\n *          incomingPhoneNumbers resource\n * @property {Twilio.Api.V2010.AccountContext.KeyList} keys - keys resource\n * @property {Twilio.Api.V2010.AccountContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.Api.V2010.AccountContext.NewKeyList} newKeys -\n *          newKeys resource\n * @property {Twilio.Api.V2010.AccountContext.NewSigningKeyList} newSigningKeys -\n *          newSigningKeys resource\n * @property {Twilio.Api.V2010.AccountContext.NotificationList} notifications -\n *          notifications resource\n * @property {Twilio.Api.V2010.AccountContext.OutgoingCallerIdList} outgoingCallerIds -\n *          outgoingCallerIds resource\n * @property {Twilio.Api.V2010.AccountContext.QueueList} queues - queues resource\n * @property {Twilio.Api.V2010.AccountContext.RecordingList} recordings -\n *          recordings resource\n * @property {Twilio.Api.V2010.AccountContext.SigningKeyList} signingKeys -\n *          signingKeys resource\n * @property {Twilio.Api.V2010.AccountContext.SipList} sip - sip resource\n * @property {Twilio.Api.V2010.AccountContext.ShortCodeList} shortCodes -\n *          shortCodes resource\n * @property {Twilio.Api.V2010.AccountContext.TokenList} tokens - tokens resource\n * @property {Twilio.Api.V2010.AccountContext.TranscriptionList} transcriptions -\n *          transcriptions resource\n * @property {Twilio.Api.V2010.AccountContext.UsageList} usage - usage resource\n * @property {Twilio.Api.V2010.AccountContext.ValidationRequestList} validationRequests -\n *          validationRequests resource\n *\n * @param {V2010} version - Version of the resource\n * @param {sid} sid - Fetch by unique Account Sid\n */\n/* jshint ignore:end */\nAccountContext = function AccountContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Accounts/${sid}.json`;\n\n  // Dependents\n  this._addresses = undefined;\n  this._applications = undefined;\n  this._authorizedConnectApps = undefined;\n  this._availablePhoneNumbers = undefined;\n  this._balance = undefined;\n  this._calls = undefined;\n  this._conferences = undefined;\n  this._connectApps = undefined;\n  this._incomingPhoneNumbers = undefined;\n  this._keys = undefined;\n  this._messages = undefined;\n  this._newKeys = undefined;\n  this._newSigningKeys = undefined;\n  this._notifications = undefined;\n  this._outgoingCallerIds = undefined;\n  this._queues = undefined;\n  this._recordings = undefined;\n  this._signingKeys = undefined;\n  this._sip = undefined;\n  this._shortCodes = undefined;\n  this._tokens = undefined;\n  this._transcriptions = undefined;\n  this._usage = undefined;\n  this._validationRequests = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AccountInstance\n *\n * @function fetch\n * @memberof Twilio.Api.V2010.AccountContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AccountInstance\n */\n/* jshint ignore:end */\nAccountContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AccountInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AccountInstance\n *\n * @function update\n * @memberof Twilio.Api.V2010.AccountContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - FriendlyName to update\n * @param {account.status} [opts.status] - Status to update the Account with\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AccountInstance\n */\n/* jshint ignore:end */\nAccountContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Status': _.get(opts, 'status')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AccountInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AccountContext.prototype,\n  'addresses', {\n    get: function() {\n      if (!this._addresses) {\n        this._addresses = new AddressList(this._version, this._solution.sid);\n      }\n      return this._addresses;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'applications', {\n    get: function() {\n      if (!this._applications) {\n        this._applications = new ApplicationList(this._version, this._solution.sid);\n      }\n      return this._applications;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'authorizedConnectApps', {\n    get: function() {\n      if (!this._authorizedConnectApps) {\n        this._authorizedConnectApps = new AuthorizedConnectAppList(this._version, this._solution.sid);\n      }\n      return this._authorizedConnectApps;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'availablePhoneNumbers', {\n    get: function() {\n      if (!this._availablePhoneNumbers) {\n        this._availablePhoneNumbers = new AvailablePhoneNumberCountryList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._availablePhoneNumbers;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'balance', {\n    get: function() {\n      if (!this._balance) {\n        this._balance = new BalanceList(this._version, this._solution.sid);\n      }\n      return this._balance;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'calls', {\n    get: function() {\n      if (!this._calls) {\n        this._calls = new CallList(this._version, this._solution.sid);\n      }\n      return this._calls;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'conferences', {\n    get: function() {\n      if (!this._conferences) {\n        this._conferences = new ConferenceList(this._version, this._solution.sid);\n      }\n      return this._conferences;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'connectApps', {\n    get: function() {\n      if (!this._connectApps) {\n        this._connectApps = new ConnectAppList(this._version, this._solution.sid);\n      }\n      return this._connectApps;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'incomingPhoneNumbers', {\n    get: function() {\n      if (!this._incomingPhoneNumbers) {\n        this._incomingPhoneNumbers = new IncomingPhoneNumberList(this._version, this._solution.sid);\n      }\n      return this._incomingPhoneNumbers;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'keys', {\n    get: function() {\n      if (!this._keys) {\n        this._keys = new KeyList(this._version, this._solution.sid);\n      }\n      return this._keys;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'messages', {\n    get: function() {\n      if (!this._messages) {\n        this._messages = new MessageList(this._version, this._solution.sid);\n      }\n      return this._messages;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'newKeys', {\n    get: function() {\n      if (!this._newKeys) {\n        this._newKeys = new NewKeyList(this._version, this._solution.sid);\n      }\n      return this._newKeys;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'newSigningKeys', {\n    get: function() {\n      if (!this._newSigningKeys) {\n        this._newSigningKeys = new NewSigningKeyList(this._version, this._solution.sid);\n      }\n      return this._newSigningKeys;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'notifications', {\n    get: function() {\n      if (!this._notifications) {\n        this._notifications = new NotificationList(this._version, this._solution.sid);\n      }\n      return this._notifications;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'outgoingCallerIds', {\n    get: function() {\n      if (!this._outgoingCallerIds) {\n        this._outgoingCallerIds = new OutgoingCallerIdList(this._version, this._solution.sid);\n      }\n      return this._outgoingCallerIds;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'queues', {\n    get: function() {\n      if (!this._queues) {\n        this._queues = new QueueList(this._version, this._solution.sid);\n      }\n      return this._queues;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'recordings', {\n    get: function() {\n      if (!this._recordings) {\n        this._recordings = new RecordingList(this._version, this._solution.sid);\n      }\n      return this._recordings;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'signingKeys', {\n    get: function() {\n      if (!this._signingKeys) {\n        this._signingKeys = new SigningKeyList(this._version, this._solution.sid);\n      }\n      return this._signingKeys;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'sip', {\n    get: function() {\n      if (!this._sip) {\n        this._sip = new SipList(this._version, this._solution.sid);\n      }\n      return this._sip;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'shortCodes', {\n    get: function() {\n      if (!this._shortCodes) {\n        this._shortCodes = new ShortCodeList(this._version, this._solution.sid);\n      }\n      return this._shortCodes;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'tokens', {\n    get: function() {\n      if (!this._tokens) {\n        this._tokens = new TokenList(this._version, this._solution.sid);\n      }\n      return this._tokens;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'transcriptions', {\n    get: function() {\n      if (!this._transcriptions) {\n        this._transcriptions = new TranscriptionList(this._version, this._solution.sid);\n      }\n      return this._transcriptions;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'usage', {\n    get: function() {\n      if (!this._usage) {\n        this._usage = new UsageList(this._version, this._solution.sid);\n      }\n      return this._usage;\n    }\n});\n\nObject.defineProperty(AccountContext.prototype,\n  'validationRequests', {\n    get: function() {\n      if (!this._validationRequests) {\n        this._validationRequests = new ValidationRequestList(this._version, this._solution.sid);\n      }\n      return this._validationRequests;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Api.V2010.AccountContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAccountContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAccountContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AccountList: AccountList,\n  AccountPage: AccountPage,\n  AccountInstance: AccountInstance,\n  AccountContext: AccountContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar AccountContext = require('./v2010/account').AccountContext;\nvar AccountList = require('./v2010/account').AccountList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V2010 version of Api\n *\n * @constructor Twilio.Api.V2010\n *\n * @property {Twilio.Api.V2010.AccountList} accounts - accounts resource\n * @property {Twilio.Api.V2010.AccountContext} account - account resource\n * @property {Twilio.Api.V2010.AccountContext.AddressList} addresses -\n *          addresses resource\n * @property {Twilio.Api.V2010.AccountContext.ApplicationList} applications -\n *          applications resource\n * @property {Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList} authorizedConnectApps -\n *          authorizedConnectApps resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList} availablePhoneNumbers -\n *          availablePhoneNumbers resource\n * @property {Twilio.Api.V2010.AccountContext.BalanceList} balance -\n *          balance resource\n * @property {Twilio.Api.V2010.AccountContext.CallList} calls - calls resource\n * @property {Twilio.Api.V2010.AccountContext.ConferenceList} conferences -\n *          conferences resource\n * @property {Twilio.Api.V2010.AccountContext.ConnectAppList} connectApps -\n *          connectApps resource\n * @property {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList} incomingPhoneNumbers -\n *          incomingPhoneNumbers resource\n * @property {Twilio.Api.V2010.AccountContext.KeyList} keys - keys resource\n * @property {Twilio.Api.V2010.AccountContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.Api.V2010.AccountContext.NewKeyList} newKeys -\n *          newKeys resource\n * @property {Twilio.Api.V2010.AccountContext.NewSigningKeyList} newSigningKeys -\n *          newSigningKeys resource\n * @property {Twilio.Api.V2010.AccountContext.NotificationList} notifications -\n *          notifications resource\n * @property {Twilio.Api.V2010.AccountContext.OutgoingCallerIdList} outgoingCallerIds -\n *          outgoingCallerIds resource\n * @property {Twilio.Api.V2010.AccountContext.QueueList} queues - queues resource\n * @property {Twilio.Api.V2010.AccountContext.RecordingList} recordings -\n *          recordings resource\n * @property {Twilio.Api.V2010.AccountContext.SigningKeyList} signingKeys -\n *          signingKeys resource\n * @property {Twilio.Api.V2010.AccountContext.SipList} sip - sip resource\n * @property {Twilio.Api.V2010.AccountContext.ShortCodeList} shortCodes -\n *          shortCodes resource\n * @property {Twilio.Api.V2010.AccountContext.TokenList} tokens - tokens resource\n * @property {Twilio.Api.V2010.AccountContext.TranscriptionList} transcriptions -\n *          transcriptions resource\n * @property {Twilio.Api.V2010.AccountContext.UsageList} usage - usage resource\n * @property {Twilio.Api.V2010.AccountContext.ValidationRequestList} validationRequests -\n *          validationRequests resource\n *\n * @param {Twilio.Api} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V2010(domain) {\n  Version.prototype.constructor.call(this, domain, '2010-04-01');\n\n  // Resources\n  this._accounts = undefined;\n  this._account = undefined;\n}\n\n_.extend(V2010.prototype, Version.prototype);\nV2010.prototype.constructor = V2010;\n\nObject.defineProperty(V2010.prototype,\n  'accounts', {\n    get: function() {\n      this._accounts = this._accounts || new AccountList(this);\n      return this._accounts;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'account', {\n    get: function() {\n      if (!this._account) {\n        this._account = new AccountContext(this, this._domain.twilio.accountSid);\n      }\n\n      return this._account;\n    },\n\n    set: function(accountContext) {\n      this._account = accountContext;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'addresses', {\n    get: function() {\n      return this.account.addresses;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'applications', {\n    get: function() {\n      return this.account.applications;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'authorizedConnectApps', {\n    get: function() {\n      return this.account.authorizedConnectApps;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'availablePhoneNumbers', {\n    get: function() {\n      return this.account.availablePhoneNumbers;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'balance', {\n    get: function() {\n      return this.account.balance;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'calls', {\n    get: function() {\n      return this.account.calls;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'conferences', {\n    get: function() {\n      return this.account.conferences;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'connectApps', {\n    get: function() {\n      return this.account.connectApps;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'incomingPhoneNumbers', {\n    get: function() {\n      return this.account.incomingPhoneNumbers;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'keys', {\n    get: function() {\n      return this.account.keys;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'messages', {\n    get: function() {\n      return this.account.messages;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'newKeys', {\n    get: function() {\n      return this.account.newKeys;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'newSigningKeys', {\n    get: function() {\n      return this.account.newSigningKeys;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'notifications', {\n    get: function() {\n      return this.account.notifications;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'outgoingCallerIds', {\n    get: function() {\n      return this.account.outgoingCallerIds;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'queues', {\n    get: function() {\n      return this.account.queues;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'recordings', {\n    get: function() {\n      return this.account.recordings;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'signingKeys', {\n    get: function() {\n      return this.account.signingKeys;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'sip', {\n    get: function() {\n      return this.account.sip;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'shortCodes', {\n    get: function() {\n      return this.account.shortCodes;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'tokens', {\n    get: function() {\n      return this.account.tokens;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'transcriptions', {\n    get: function() {\n      return this.account.transcriptions;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'usage', {\n    get: function() {\n      return this.account.usage;\n    }\n});\n\nObject.defineProperty(V2010.prototype,\n  'validationRequests', {\n    get: function() {\n      return this.account.validationRequests;\n    }\n});\n\nmodule.exports = V2010;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V2010 = require('./api/V2010');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize api domain\n *\n * @constructor Twilio.Api\n *\n * @property {Twilio.Api.V2010} v2010 - v2010 version\n * @property {Twilio.Api.V2010.AccountContext} account - Main account resource\n * @property {Twilio.Api.V2010.AccountList} accounts - accounts resource\n * @property {Twilio.Api.V2010.AccountContext.AddressList} addresses -\n *          addresses resource\n * @property {Twilio.Api.V2010.AccountContext.ApplicationList} applications -\n *          applications resource\n * @property {Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList} authorizedConnectApps -\n *          authorizedConnectApps resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList} availablePhoneNumbers -\n *          availablePhoneNumbers resource\n * @property {Twilio.Api.V2010.AccountContext.BalanceList} balance -\n *          balance resource\n * @property {Twilio.Api.V2010.AccountContext.CallList} calls - calls resource\n * @property {Twilio.Api.V2010.AccountContext.ConferenceList} conferences -\n *          conferences resource\n * @property {Twilio.Api.V2010.AccountContext.ConnectAppList} connectApps -\n *          connectApps resource\n * @property {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList} incomingPhoneNumbers -\n *          incomingPhoneNumbers resource\n * @property {Twilio.Api.V2010.AccountContext.KeyList} keys - keys resource\n * @property {Twilio.Api.V2010.AccountContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.Api.V2010.AccountContext.NewKeyList} newKeys -\n *          newKeys resource\n * @property {Twilio.Api.V2010.AccountContext.NewSigningKeyList} newSigningKeys -\n *          newSigningKeys resource\n * @property {Twilio.Api.V2010.AccountContext.NotificationList} notifications -\n *          notifications resource\n * @property {Twilio.Api.V2010.AccountContext.OutgoingCallerIdList} outgoingCallerIds -\n *          outgoingCallerIds resource\n * @property {Twilio.Api.V2010.AccountContext.QueueList} queues - queues resource\n * @property {Twilio.Api.V2010.AccountContext.RecordingList} recordings -\n *          recordings resource\n * @property {Twilio.Api.V2010.AccountContext.SigningKeyList} signingKeys -\n *          signingKeys resource\n * @property {Twilio.Api.V2010.AccountContext.SipList} sip - sip resource\n * @property {Twilio.Api.V2010.AccountContext.ShortCodeList} shortCodes -\n *          shortCodes resource\n * @property {Twilio.Api.V2010.AccountContext.TokenList} tokens - tokens resource\n * @property {Twilio.Api.V2010.AccountContext.TranscriptionList} transcriptions -\n *          transcriptions resource\n * @property {Twilio.Api.V2010.AccountContext.UsageList} usage - usage resource\n * @property {Twilio.Api.V2010.AccountContext.ValidationRequestList} validationRequests -\n *          validationRequests resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Api(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://api.twilio.com');\n\n  // Versions\n  this._v2010 = undefined;\n}\n\n_.extend(Api.prototype, Domain.prototype);\nApi.prototype.constructor = Api;\n\nObject.defineProperty(Api.prototype,\n  'v2010', {\n    get: function() {\n      this._v2010 = this._v2010 || new V2010(this);\n      return this._v2010;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'account', {\n    get: function() {\n      return this.v2010.account;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'accounts', {\n    get: function() {\n      return this.v2010.accounts;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'addresses', {\n    get: function() {\n      return this.account.addresses;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'applications', {\n    get: function() {\n      return this.account.applications;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'authorizedConnectApps', {\n    get: function() {\n      return this.account.authorizedConnectApps;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'availablePhoneNumbers', {\n    get: function() {\n      return this.account.availablePhoneNumbers;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'balance', {\n    get: function() {\n      return this.account.balance;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'calls', {\n    get: function() {\n      return this.account.calls;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'conferences', {\n    get: function() {\n      return this.account.conferences;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'connectApps', {\n    get: function() {\n      return this.account.connectApps;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'incomingPhoneNumbers', {\n    get: function() {\n      return this.account.incomingPhoneNumbers;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'keys', {\n    get: function() {\n      return this.account.keys;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'messages', {\n    get: function() {\n      return this.account.messages;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'newKeys', {\n    get: function() {\n      return this.account.newKeys;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'newSigningKeys', {\n    get: function() {\n      return this.account.newSigningKeys;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'notifications', {\n    get: function() {\n      return this.account.notifications;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'outgoingCallerIds', {\n    get: function() {\n      return this.account.outgoingCallerIds;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'queues', {\n    get: function() {\n      return this.account.queues;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'recordings', {\n    get: function() {\n      return this.account.recordings;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'signingKeys', {\n    get: function() {\n      return this.account.signingKeys;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'sip', {\n    get: function() {\n      return this.account.sip;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'shortCodes', {\n    get: function() {\n      return this.account.shortCodes;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'tokens', {\n    get: function() {\n      return this.account.tokens;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'transcriptions', {\n    get: function() {\n      return this.account.transcriptions;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'usage', {\n    get: function() {\n      return this.account.usage;\n    }\n});\n\nObject.defineProperty(Api.prototype,\n  'validationRequests', {\n    get: function() {\n      return this.account.validationRequests;\n    }\n});\n\nmodule.exports = Api;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DefaultsList;\nvar DefaultsPage;\nvar DefaultsInstance;\nvar DefaultsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DefaultsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.DefaultsList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nDefaultsList = function DefaultsList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function defaults\n   * @memberof Twilio.Autopilot.V1.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.DefaultsContext}\n   */\n  /* jshint ignore:end */\n  function DefaultsListInstance(sid) {\n    return DefaultsListInstance.get(sid);\n  }\n\n  DefaultsListInstance._version = version;\n  // Path Solution\n  DefaultsListInstance._solution = {assistantSid: assistantSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a defaults\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsList#\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.DefaultsContext}\n   */\n  /* jshint ignore:end */\n  DefaultsListInstance.get = function get() {\n    return new DefaultsContext(this._version, this._solution.assistantSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DefaultsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DefaultsListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DefaultsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DefaultsPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.DefaultsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DefaultsSolution} solution - Path solution\n *\n * @returns DefaultsPage\n */\n/* jshint ignore:end */\nDefaultsPage = function DefaultsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DefaultsPage.prototype, Page.prototype);\nDefaultsPage.prototype.constructor = DefaultsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DefaultsInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsPage#\n *\n * @param {DefaultsPayload} payload - Payload response from the API\n *\n * @returns DefaultsInstance\n */\n/* jshint ignore:end */\nDefaultsPage.prototype.getInstance = function getInstance(payload) {\n  return new DefaultsInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDefaultsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDefaultsPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DefaultsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.DefaultsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @property {string} url - The absolute URL of the Defaults resource\n * @property {object} data - The JSON string that describes the default task links\n *\n * @param {V1} version - Version of the resource\n * @param {DefaultsPayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nDefaultsInstance = function DefaultsInstance(version, payload, assistantSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, };\n};\n\nObject.defineProperty(DefaultsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DefaultsContext(this._version, this._solution.assistantSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DefaultsInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DefaultsInstance\n */\n/* jshint ignore:end */\nDefaultsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a DefaultsInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.defaults] -\n *          A JSON string that describes the default task links.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DefaultsInstance\n */\n/* jshint ignore:end */\nDefaultsInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDefaultsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDefaultsInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DefaultsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.DefaultsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the resource to fetch\n */\n/* jshint ignore:end */\nDefaultsContext = function DefaultsContext(version, assistantSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, };\n  this._uri = `/Assistants/${assistantSid}/Defaults`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DefaultsInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DefaultsInstance\n */\n/* jshint ignore:end */\nDefaultsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DefaultsInstance(this._version, payload, this._solution.assistantSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a DefaultsInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.defaults] -\n *          A JSON string that describes the default task links.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DefaultsInstance\n */\n/* jshint ignore:end */\nDefaultsContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Defaults': serialize.object(_.get(opts, 'defaults'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DefaultsInstance(this._version, payload, this._solution.assistantSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.DefaultsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDefaultsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDefaultsContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DefaultsList: DefaultsList,\n  DefaultsPage: DefaultsPage,\n  DefaultsInstance: DefaultsInstance,\n  DefaultsContext: DefaultsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DialogueList;\nvar DialoguePage;\nvar DialogueInstance;\nvar DialogueContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DialogueList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.DialogueList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nDialogueList = function DialogueList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function dialogues\n   * @memberof Twilio.Autopilot.V1.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.DialogueContext}\n   */\n  /* jshint ignore:end */\n  function DialogueListInstance(sid) {\n    return DialogueListInstance.get(sid);\n  }\n\n  DialogueListInstance._version = version;\n  // Path Solution\n  DialogueListInstance._solution = {assistantSid: assistantSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a dialogue\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.DialogueList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.DialogueContext}\n   */\n  /* jshint ignore:end */\n  DialogueListInstance.get = function get(sid) {\n    return new DialogueContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.DialogueList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DialogueListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DialogueListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DialogueListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DialoguePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.DialoguePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DialogueSolution} solution - Path solution\n *\n * @returns DialoguePage\n */\n/* jshint ignore:end */\nDialoguePage = function DialoguePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DialoguePage.prototype, Page.prototype);\nDialoguePage.prototype.constructor = DialoguePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DialogueInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.DialoguePage#\n *\n * @param {DialoguePayload} payload - Payload response from the API\n *\n * @returns DialogueInstance\n */\n/* jshint ignore:end */\nDialoguePage.prototype.getInstance = function getInstance(payload) {\n  return new DialogueInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.DialoguePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDialoguePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDialoguePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DialogueContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.DialogueInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {object} data -\n *          The JSON string that describes the dialogue session object\n * @property {string} url - The absolute URL of the Dialogue resource\n *\n * @param {V1} version - Version of the resource\n * @param {DialoguePayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nDialogueInstance = function DialogueInstance(version, payload, assistantSid,\n                                              sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(DialogueInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DialogueContext(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DialogueInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.DialogueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DialogueInstance\n */\n/* jshint ignore:end */\nDialogueInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.DialogueInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDialogueInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDialogueInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DialogueContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.DialogueContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the resource to fetch\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nDialogueContext = function DialogueContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Dialogues/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DialogueInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.DialogueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DialogueInstance\n */\n/* jshint ignore:end */\nDialogueContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DialogueInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.DialogueContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDialogueContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDialogueContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DialogueList: DialogueList,\n  DialoguePage: DialoguePage,\n  DialogueInstance: DialogueInstance,\n  DialogueContext: DialogueContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar FieldValueList;\nvar FieldValuePage;\nvar FieldValueInstance;\nvar FieldValueContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldValueList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the FieldType associated with the resource\n * @param {string} fieldTypeSid -\n *          The SID of the Field Type associated with the Field Value\n */\n/* jshint ignore:end */\nFieldValueList = function FieldValueList(version, assistantSid, fieldTypeSid) {\n  /* jshint ignore:start */\n  /**\n   * @function fieldValues\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueContext}\n   */\n  /* jshint ignore:end */\n  function FieldValueListInstance(sid) {\n    return FieldValueListInstance.get(sid);\n  }\n\n  FieldValueListInstance._version = version;\n  // Path Solution\n  FieldValueListInstance._solution = {assistantSid: assistantSid, fieldTypeSid: fieldTypeSid};\n  FieldValueListInstance._uri = `/Assistants/${assistantSid}/FieldTypes/${fieldTypeSid}/FieldValues`;\n  /* jshint ignore:start */\n  /**\n   * Streams FieldValueInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          The ISO language-country tag that identifies the language of the value\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FieldValueInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          The ISO language-country tag that identifies the language of the value\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FieldValueInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          The ISO language-country tag that identifies the language of the value\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldValuePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FieldValueInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldValuePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a FieldValueInstance\n   *\n   * @function create\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.language -\n   *          The ISO language-country tag that identifies the language of the value\n   * @param {string} opts.value - The Field Value data\n   * @param {string} [opts.synonymOf] -\n   *          The string value that indicates which word the field value is a synonym of\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FieldValueInstance\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['language'])) {\n      throw new Error('Required parameter \"opts[\\'language\\']\" missing.');\n    }\n    if (_.isUndefined(opts['value'])) {\n      throw new Error('Required parameter \"opts[\\'value\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'Value': _.get(opts, 'value'),\n      'SynonymOf': _.get(opts, 'synonymOf')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldValueInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.fieldTypeSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a field_value\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueContext}\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.get = function get(sid) {\n    return new FieldValueContext(\n      this._version,\n      this._solution.assistantSid,\n      this._solution.fieldTypeSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FieldValueListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FieldValueListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldValuePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValuePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FieldValueSolution} solution - Path solution\n *\n * @returns FieldValuePage\n */\n/* jshint ignore:end */\nFieldValuePage = function FieldValuePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FieldValuePage.prototype, Page.prototype);\nFieldValuePage.prototype.constructor = FieldValuePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FieldValueInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValuePage#\n *\n * @param {FieldValuePayload} payload - Payload response from the API\n *\n * @returns FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValuePage.prototype.getInstance = function getInstance(payload) {\n  return new FieldValueInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.fieldTypeSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValuePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldValuePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldValuePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldValueContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} fieldTypeSid -\n *          The SID of the Field Type associated with the Field Value\n * @property {string} language -\n *          The ISO language-country tag that identifies the language of the value\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the FieldType associated with the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} value - The Field Value data\n * @property {string} url - The absolute URL of the FieldValue resource\n * @property {string} synonymOf -\n *          The word for which the field value is a synonym of\n *\n * @param {V1} version - Version of the resource\n * @param {FieldValuePayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the FieldType associated with the resource\n * @param {sid} fieldTypeSid -\n *          The SID of the Field Type associated with the Field Value\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nFieldValueInstance = function FieldValueInstance(version, payload, assistantSid,\n                                                  fieldTypeSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.fieldTypeSid = payload.field_type_sid; // jshint ignore:line\n  this.language = payload.language; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.value = payload.value; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.synonymOf = payload.synonym_of; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, fieldTypeSid: fieldTypeSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FieldValueInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FieldValueContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.fieldTypeSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FieldValueInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValueInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldValueInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValueInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldValueInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldValueInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldValueContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the FieldType associated with the resource to fetch\n * @param {sid_like} fieldTypeSid -\n *          The SID of the Field Type associated with  the Field Value to fetch\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nFieldValueContext = function FieldValueContext(version, assistantSid,\n                                                fieldTypeSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, fieldTypeSid: fieldTypeSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/FieldTypes/${fieldTypeSid}/FieldValues/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FieldValueInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValueContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FieldValueInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.fieldTypeSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldValueInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValueContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldValueContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFieldValueContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FieldValueList: FieldValueList,\n  FieldValuePage: FieldValuePage,\n  FieldValueInstance: FieldValueInstance,\n  FieldValueContext: FieldValueContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar FieldValueList = require('./fieldType/fieldValue').FieldValueList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar FieldTypeList;\nvar FieldTypePage;\nvar FieldTypeInstance;\nvar FieldTypeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldTypeList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.FieldTypeList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nFieldTypeList = function FieldTypeList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function fieldTypes\n   * @memberof Twilio.Autopilot.V1.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.FieldTypeContext}\n   */\n  /* jshint ignore:end */\n  function FieldTypeListInstance(sid) {\n    return FieldTypeListInstance.get(sid);\n  }\n\n  FieldTypeListInstance._version = version;\n  // Path Solution\n  FieldTypeListInstance._solution = {assistantSid: assistantSid};\n  FieldTypeListInstance._uri = `/Assistants/${assistantSid}/FieldTypes`;\n  /* jshint ignore:start */\n  /**\n   * Streams FieldTypeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FieldTypeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FieldTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FieldTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a FieldTypeInstance\n   *\n   * @function create\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.uniqueName -\n   *          An application-defined string that uniquely identifies the new resource\n   * @param {string} [opts.friendlyName] - A string to describe the new resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FieldTypeInstance\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'FriendlyName': _.get(opts, 'friendlyName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldTypeInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a field_type\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.FieldTypeContext}\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.get = function get(sid) {\n    return new FieldTypeContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FieldTypeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FieldTypeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldTypePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.FieldTypePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FieldTypeSolution} solution - Path solution\n *\n * @returns FieldTypePage\n */\n/* jshint ignore:end */\nFieldTypePage = function FieldTypePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FieldTypePage.prototype, Page.prototype);\nFieldTypePage.prototype.constructor = FieldTypePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FieldTypeInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypePage#\n *\n * @param {FieldTypePayload} payload - Payload response from the API\n *\n * @returns FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypePage.prototype.getInstance = function getInstance(payload) {\n  return new FieldTypeInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldTypePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldTypePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldTypeContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.FieldTypeInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} links - A list of the URLs of related resources\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} url - The absolute URL of the FieldType resource\n *\n * @param {V1} version - Version of the resource\n * @param {FieldTypePayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nFieldTypeInstance = function FieldTypeInstance(version, payload, assistantSid,\n                                                sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FieldTypeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FieldTypeContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FieldTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FieldTypeInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldTypeInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the fieldValues\n *\n * @function fieldValues\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList}\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.fieldValues = function fieldValues() {\n  return this._proxy.fieldValues;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldTypeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldTypeContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.FieldTypeContext\n *\n * @property {Twilio.Autopilot.V1.AssistantContext.FieldTypeContext.FieldValueList} fieldValues -\n *          fieldValues resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the resource to fetch\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nFieldTypeContext = function FieldTypeContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/FieldTypes/${sid}`;\n\n  // Dependents\n  this._fieldValues = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FieldTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FieldTypeInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FieldTypeInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UniqueName': _.get(opts, 'uniqueName')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FieldTypeInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldTypeInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(FieldTypeContext.prototype,\n  'fieldValues', {\n    get: function() {\n      if (!this._fieldValues) {\n        this._fieldValues = new FieldValueList(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n      return this._fieldValues;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.FieldTypeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldTypeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFieldTypeContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FieldTypeList: FieldTypeList,\n  FieldTypePage: FieldTypePage,\n  FieldTypeInstance: FieldTypeInstance,\n  FieldTypeContext: FieldTypeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ModelBuildList;\nvar ModelBuildPage;\nvar ModelBuildInstance;\nvar ModelBuildContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ModelBuildList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.ModelBuildList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nModelBuildList = function ModelBuildList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function modelBuilds\n   * @memberof Twilio.Autopilot.V1.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.ModelBuildContext}\n   */\n  /* jshint ignore:end */\n  function ModelBuildListInstance(sid) {\n    return ModelBuildListInstance.get(sid);\n  }\n\n  ModelBuildListInstance._version = version;\n  // Path Solution\n  ModelBuildListInstance._solution = {assistantSid: assistantSid};\n  ModelBuildListInstance._uri = `/Assistants/${assistantSid}/ModelBuilds`;\n  /* jshint ignore:start */\n  /**\n   * Streams ModelBuildInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ModelBuildInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ModelBuildInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ModelBuildPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ModelBuildInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ModelBuildPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ModelBuildInstance\n   *\n   * @function create\n   * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call using a POST method to send status information to your application\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the new resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ModelBuildInstance\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'UniqueName': _.get(opts, 'uniqueName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ModelBuildInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a model_build\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.ModelBuildContext}\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.get = function get(sid) {\n    return new ModelBuildContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ModelBuildListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ModelBuildListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ModelBuildPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.ModelBuildPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ModelBuildSolution} solution - Path solution\n *\n * @returns ModelBuildPage\n */\n/* jshint ignore:end */\nModelBuildPage = function ModelBuildPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ModelBuildPage.prototype, Page.prototype);\nModelBuildPage.prototype.constructor = ModelBuildPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ModelBuildInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildPage#\n *\n * @param {ModelBuildPayload} payload - Payload response from the API\n *\n * @returns ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildPage.prototype.getInstance = function getInstance(payload) {\n  return new ModelBuildInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nModelBuildPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nModelBuildPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ModelBuildContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.ModelBuildInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {model_build.status} status - The status of the model build process\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} url - The absolute URL of the ModelBuild resource\n * @property {number} buildDuration -\n *          The time in seconds it took to build the model\n * @property {number} errorCode -\n *          More information about why the model build failed, if `status` is `failed`\n *\n * @param {V1} version - Version of the resource\n * @param {ModelBuildPayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nModelBuildInstance = function ModelBuildInstance(version, payload, assistantSid,\n                                                  sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.buildDuration = deserialize.integer(payload.build_duration); // jshint ignore:line\n  this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ModelBuildInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ModelBuildContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ModelBuildInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ModelBuildInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ModelBuildInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nModelBuildInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nModelBuildInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ModelBuildContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.ModelBuildContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the resource to fetch\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nModelBuildContext = function ModelBuildContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/ModelBuilds/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ModelBuildInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ModelBuildInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ModelBuildInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'UniqueName': _.get(opts, 'uniqueName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ModelBuildInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ModelBuildInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.ModelBuildContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nModelBuildContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nModelBuildContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ModelBuildList: ModelBuildList,\n  ModelBuildPage: ModelBuildPage,\n  ModelBuildInstance: ModelBuildInstance,\n  ModelBuildContext: ModelBuildContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar QueryList;\nvar QueryPage;\nvar QueryInstance;\nvar QueryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the QueryList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.QueryList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nQueryList = function QueryList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function queries\n   * @memberof Twilio.Autopilot.V1.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.QueryContext}\n   */\n  /* jshint ignore:end */\n  function QueryListInstance(sid) {\n    return QueryListInstance.get(sid);\n  }\n\n  QueryListInstance._version = version;\n  // Path Solution\n  QueryListInstance._solution = {assistantSid: assistantSid};\n  QueryListInstance._uri = `/Assistants/${assistantSid}/Queries`;\n  /* jshint ignore:start */\n  /**\n   * Streams QueryInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Autopilot.V1.AssistantContext.QueryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          The ISO language-country string that specifies the language used by the Query resources to read\n   * @param {string} [opts.modelBuild] -\n   *          The SID or unique name of the Model Build to be queried\n   * @param {string} [opts.status] - The status of the resources to read\n   * @param {string} [opts.dialogueSid] -\n   *          The SID of the {@link https://www.twilio.com/docs/autopilot/api/dialogue|Dialogue}.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  QueryListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists QueryInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Autopilot.V1.AssistantContext.QueryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          The ISO language-country string that specifies the language used by the Query resources to read\n   * @param {string} [opts.modelBuild] -\n   *          The SID or unique name of the Model Build to be queried\n   * @param {string} [opts.status] - The status of the resources to read\n   * @param {string} [opts.dialogueSid] -\n   *          The SID of the {@link https://www.twilio.com/docs/autopilot/api/dialogue|Dialogue}.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  QueryListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of QueryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Autopilot.V1.AssistantContext.QueryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          The ISO language-country string that specifies the language used by the Query resources to read\n   * @param {string} [opts.modelBuild] -\n   *          The SID or unique name of the Model Build to be queried\n   * @param {string} [opts.status] - The status of the resources to read\n   * @param {string} [opts.dialogueSid] -\n   *          The SID of the {@link https://www.twilio.com/docs/autopilot/api/dialogue|Dialogue}.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  QueryListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'ModelBuild': _.get(opts, 'modelBuild'),\n      'Status': _.get(opts, 'status'),\n      'DialogueSid': _.get(opts, 'dialogueSid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new QueryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of QueryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Autopilot.V1.AssistantContext.QueryList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  QueryListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new QueryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a QueryInstance\n   *\n   * @function create\n   * @memberof Twilio.Autopilot.V1.AssistantContext.QueryList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.language -\n   *          The ISO language-country string that specifies the language used for the new query\n   * @param {string} opts.query - The end-user's natural language input\n   * @param {string} [opts.tasks] - The list of tasks to limit the new query to\n   * @param {string} [opts.modelBuild] -\n   *          The SID or unique name of the Model Build to be queried\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed QueryInstance\n   */\n  /* jshint ignore:end */\n  QueryListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['language'])) {\n      throw new Error('Required parameter \"opts[\\'language\\']\" missing.');\n    }\n    if (_.isUndefined(opts['query'])) {\n      throw new Error('Required parameter \"opts[\\'query\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'Query': _.get(opts, 'query'),\n      'Tasks': _.get(opts, 'tasks'),\n      'ModelBuild': _.get(opts, 'modelBuild')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new QueryInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a query\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.QueryList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.QueryContext}\n   */\n  /* jshint ignore:end */\n  QueryListInstance.get = function get(sid) {\n    return new QueryContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.QueryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  QueryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  QueryListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return QueryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the QueryPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.QueryPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {QuerySolution} solution - Path solution\n *\n * @returns QueryPage\n */\n/* jshint ignore:end */\nQueryPage = function QueryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(QueryPage.prototype, Page.prototype);\nQueryPage.prototype.constructor = QueryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of QueryInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryPage#\n *\n * @param {QueryPayload} payload - Payload response from the API\n *\n * @returns QueryInstance\n */\n/* jshint ignore:end */\nQueryPage.prototype.getInstance = function getInstance(payload) {\n  return new QueryInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nQueryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nQueryPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the QueryContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.QueryInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {object} results -\n *          The natural language analysis results that include the Task recognized and a list of identified Fields\n * @property {string} language -\n *          The ISO language-country string that specifies the language used by the Query\n * @property {string} modelBuildSid -\n *          The SID of the {@link https://www.twilio.com/docs/autopilot/api/model-build|Model Build} queried\n * @property {string} query - The end-user's natural language input\n * @property {string} sampleSid -\n *          The SID of an optional reference to the Sample created from the query\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} status - The status of the Query\n * @property {string} url - The absolute URL of the Query resource\n * @property {string} sourceChannel -\n *          The communication channel from where the end-user input came\n * @property {string} dialogueSid -\n *          The SID of the {@link https://www.twilio.com/docs/autopilot/api/dialogue|Dialogue}.\n *\n * @param {V1} version - Version of the resource\n * @param {QueryPayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nQueryInstance = function QueryInstance(version, payload, assistantSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.results = payload.results; // jshint ignore:line\n  this.language = payload.language; // jshint ignore:line\n  this.modelBuildSid = payload.model_build_sid; // jshint ignore:line\n  this.query = payload.query; // jshint ignore:line\n  this.sampleSid = payload.sample_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.sourceChannel = payload.source_channel; // jshint ignore:line\n  this.dialogueSid = payload.dialogue_sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(QueryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new QueryContext(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a QueryInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a QueryInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.sampleSid] -\n *          The SID of an optional reference to the Sample created from the query\n * @param {string} [opts.status] - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a QueryInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nQueryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nQueryInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the QueryContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.QueryContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the resource to fetch\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nQueryContext = function QueryContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Queries/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a QueryInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new QueryInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a QueryInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.sampleSid] -\n *          The SID of an optional reference to the Sample created from the query\n * @param {string} [opts.status] - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'SampleSid': _.get(opts, 'sampleSid'), 'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new QueryInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a QueryInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.QueryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nQueryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nQueryContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  QueryList: QueryList,\n  QueryPage: QueryPage,\n  QueryInstance: QueryInstance,\n  QueryContext: QueryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar StyleSheetList;\nvar StyleSheetPage;\nvar StyleSheetInstance;\nvar StyleSheetContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the StyleSheetList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.StyleSheetList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nStyleSheetList = function StyleSheetList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function styleSheet\n   * @memberof Twilio.Autopilot.V1.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.StyleSheetContext}\n   */\n  /* jshint ignore:end */\n  function StyleSheetListInstance(sid) {\n    return StyleSheetListInstance.get(sid);\n  }\n\n  StyleSheetListInstance._version = version;\n  // Path Solution\n  StyleSheetListInstance._solution = {assistantSid: assistantSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a style_sheet\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetList#\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.StyleSheetContext}\n   */\n  /* jshint ignore:end */\n  StyleSheetListInstance.get = function get() {\n    return new StyleSheetContext(this._version, this._solution.assistantSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  StyleSheetListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  StyleSheetListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return StyleSheetListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StyleSheetPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.StyleSheetPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {StyleSheetSolution} solution - Path solution\n *\n * @returns StyleSheetPage\n */\n/* jshint ignore:end */\nStyleSheetPage = function StyleSheetPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(StyleSheetPage.prototype, Page.prototype);\nStyleSheetPage.prototype.constructor = StyleSheetPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of StyleSheetInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetPage#\n *\n * @param {StyleSheetPayload} payload - Payload response from the API\n *\n * @returns StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetPage.prototype.getInstance = function getInstance(payload) {\n  return new StyleSheetInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStyleSheetPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStyleSheetPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StyleSheetContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.StyleSheetInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @property {string} url - The absolute URL of the StyleSheet resource\n * @property {object} data - The JSON string that describes the style sheet object\n *\n * @param {V1} version - Version of the resource\n * @param {StyleSheetPayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nStyleSheetInstance = function StyleSheetInstance(version, payload, assistantSid)\n                                                  {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, };\n};\n\nObject.defineProperty(StyleSheetInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new StyleSheetContext(this._version, this._solution.assistantSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a StyleSheetInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a StyleSheetInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.styleSheet] -\n *          The JSON string that describes the style sheet object\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStyleSheetInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStyleSheetInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StyleSheetContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.StyleSheetContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant with the StyleSheet resource to fetch\n */\n/* jshint ignore:end */\nStyleSheetContext = function StyleSheetContext(version, assistantSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, };\n  this._uri = `/Assistants/${assistantSid}/StyleSheet`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a StyleSheetInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new StyleSheetInstance(this._version, payload, this._solution.assistantSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a StyleSheetInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.styleSheet] -\n *          The JSON string that describes the style sheet object\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'StyleSheet': serialize.object(_.get(opts, 'styleSheet'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new StyleSheetInstance(this._version, payload, this._solution.assistantSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.StyleSheetContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStyleSheetContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nStyleSheetContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  StyleSheetList: StyleSheetList,\n  StyleSheetPage: StyleSheetPage,\n  StyleSheetInstance: StyleSheetInstance,\n  StyleSheetContext: StyleSheetContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar FieldList;\nvar FieldPage;\nvar FieldInstance;\nvar FieldContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @param {string} taskSid -\n *          The SID of the {@link https://www.twilio.com/docs/autopilot/api/task|Task} resource associated with this Field\n */\n/* jshint ignore:end */\nFieldList = function FieldList(version, assistantSid, taskSid) {\n  /* jshint ignore:start */\n  /**\n   * @function fields\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldContext}\n   */\n  /* jshint ignore:end */\n  function FieldListInstance(sid) {\n    return FieldListInstance.get(sid);\n  }\n\n  FieldListInstance._version = version;\n  // Path Solution\n  FieldListInstance._solution = {assistantSid: assistantSid, taskSid: taskSid};\n  FieldListInstance._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Fields`;\n  /* jshint ignore:start */\n  /**\n   * Streams FieldInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FieldListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FieldInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FieldInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FieldInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a FieldInstance\n   *\n   * @function create\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.fieldType - The Field Type of this field\n   * @param {string} opts.uniqueName -\n   *          An application-defined string that uniquely identifies the new resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FieldInstance\n   */\n  /* jshint ignore:end */\n  FieldListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['fieldType'])) {\n      throw new Error('Required parameter \"opts[\\'fieldType\\']\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FieldType': _.get(opts, 'fieldType'),\n      'UniqueName': _.get(opts, 'uniqueName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.taskSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a field\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldContext}\n   */\n  /* jshint ignore:end */\n  FieldListInstance.get = function get(sid) {\n    return new FieldContext(this._version, this._solution.assistantSid, this._solution.taskSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FieldListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FieldListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FieldListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FieldSolution} solution - Path solution\n *\n * @returns FieldPage\n */\n/* jshint ignore:end */\nFieldPage = function FieldPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FieldPage.prototype, Page.prototype);\nFieldPage.prototype.constructor = FieldPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FieldInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldPage#\n *\n * @param {FieldPayload} payload - Payload response from the API\n *\n * @returns FieldInstance\n */\n/* jshint ignore:end */\nFieldPage.prototype.getInstance = function getInstance(payload) {\n  return new FieldInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.taskSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} fieldType - The Field Type of the field\n * @property {string} taskSid -\n *          The SID of the {@link https://www.twilio.com/docs/autopilot/api/task|Task} resource associated with this Field\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} url - The absolute URL of the Field resource\n *\n * @param {V1} version - Version of the resource\n * @param {FieldPayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @param {sid} taskSid -\n *          The SID of the {@link https://www.twilio.com/docs/autopilot/api/task|Task} resource associated with this Field\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nFieldInstance = function FieldInstance(version, payload, assistantSid, taskSid,\n                                        sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.fieldType = payload.field_type; // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FieldInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FieldContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.taskSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FieldInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldInstance\n */\n/* jshint ignore:end */\nFieldInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldInstance\n */\n/* jshint ignore:end */\nFieldInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource to fetch\n * @param {sid_like} taskSid -\n *          The SID of the {@link https://www.twilio.com/docs/autopilot/api/task|Task} resource associated with the Field resource to fetch\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nFieldContext = function FieldContext(version, assistantSid, taskSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Fields/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FieldInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldInstance\n */\n/* jshint ignore:end */\nFieldContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FieldInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldInstance\n */\n/* jshint ignore:end */\nFieldContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFieldContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FieldList: FieldList,\n  FieldPage: FieldPage,\n  FieldInstance: FieldInstance,\n  FieldContext: FieldContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SampleList;\nvar SamplePage;\nvar SampleInstance;\nvar SampleContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SampleList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @param {string} taskSid - The SID of the Task associated with the resource\n */\n/* jshint ignore:end */\nSampleList = function SampleList(version, assistantSid, taskSid) {\n  /* jshint ignore:start */\n  /**\n   * @function samples\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleContext}\n   */\n  /* jshint ignore:end */\n  function SampleListInstance(sid) {\n    return SampleListInstance.get(sid);\n  }\n\n  SampleListInstance._version = version;\n  // Path Solution\n  SampleListInstance._solution = {assistantSid: assistantSid, taskSid: taskSid};\n  SampleListInstance._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Samples`;\n  /* jshint ignore:start */\n  /**\n   * Streams SampleInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          The ISO language-country string that specifies the language used for the sample\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SampleListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SampleInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          The ISO language-country string that specifies the language used for the sample\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SampleListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SampleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          The ISO language-country string that specifies the language used for the sample\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SampleListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SamplePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SampleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SampleListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SamplePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a SampleInstance\n   *\n   * @function create\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.language -\n   *          The ISO language-country string that specifies the language used for the new sample\n   * @param {string} opts.taggedText -\n   *          The text example of how end users might express the task\n   * @param {string} [opts.sourceChannel] -\n   *          The communication channel from which the new sample was captured\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SampleInstance\n   */\n  /* jshint ignore:end */\n  SampleListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['language'])) {\n      throw new Error('Required parameter \"opts[\\'language\\']\" missing.');\n    }\n    if (_.isUndefined(opts['taggedText'])) {\n      throw new Error('Required parameter \"opts[\\'taggedText\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'TaggedText': _.get(opts, 'taggedText'),\n      'SourceChannel': _.get(opts, 'sourceChannel')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SampleInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.taskSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sample\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleContext}\n   */\n  /* jshint ignore:end */\n  SampleListInstance.get = function get(sid) {\n    return new SampleContext(this._version, this._solution.assistantSid, this._solution.taskSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SampleListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SampleListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SampleListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SamplePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.SamplePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SampleSolution} solution - Path solution\n *\n * @returns SamplePage\n */\n/* jshint ignore:end */\nSamplePage = function SamplePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SamplePage.prototype, Page.prototype);\nSamplePage.prototype.constructor = SamplePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SampleInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SamplePage#\n *\n * @param {SamplePayload} payload - Payload response from the API\n *\n * @returns SampleInstance\n */\n/* jshint ignore:end */\nSamplePage.prototype.getInstance = function getInstance(payload) {\n  return new SampleInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.taskSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SamplePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSamplePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSamplePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SampleContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} taskSid - The SID of the Task associated with the resource\n * @property {string} language -\n *          An ISO language-country string that specifies the language used for the sample\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} taggedText -\n *          The text example of how end users might express the task\n * @property {string} url - The absolute URL of the Sample resource\n * @property {string} sourceChannel -\n *          The communication channel from which the sample was captured\n *\n * @param {V1} version - Version of the resource\n * @param {SamplePayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @param {sid} taskSid - The SID of the Task associated with the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSampleInstance = function SampleInstance(version, payload, assistantSid,\n                                          taskSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.language = payload.language; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.taggedText = payload.tagged_text; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.sourceChannel = payload.source_channel; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SampleInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SampleContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.taskSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SampleInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SampleInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.language] -\n *          The ISO language-country string that specifies the language used for the sample\n * @param {string} [opts.taggedText] -\n *          The text example of how end users might express the task\n * @param {string} [opts.sourceChannel] -\n *          The communication channel from which the sample was captured\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SampleInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSampleInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSampleInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SampleContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource to fetch\n * @param {sid_like} taskSid -\n *          The SID of the Task associated with the Sample resource to create\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSampleContext = function SampleContext(version, assistantSid, taskSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Samples/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SampleInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SampleInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SampleInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.language] -\n *          The ISO language-country string that specifies the language used for the sample\n * @param {string} [opts.taggedText] -\n *          The text example of how end users might express the task\n * @param {string} [opts.sourceChannel] -\n *          The communication channel from which the sample was captured\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Language': _.get(opts, 'language'),\n    'TaggedText': _.get(opts, 'taggedText'),\n    'SourceChannel': _.get(opts, 'sourceChannel')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SampleInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SampleInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSampleContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSampleContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SampleList: SampleList,\n  SamplePage: SamplePage,\n  SampleInstance: SampleInstance,\n  SampleContext: SampleContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TaskActionsList;\nvar TaskActionsPage;\nvar TaskActionsInstance;\nvar TaskActionsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskActionsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @param {string} taskSid - The SID of the Task associated with the resource\n */\n/* jshint ignore:end */\nTaskActionsList = function TaskActionsList(version, assistantSid, taskSid) {\n  /* jshint ignore:start */\n  /**\n   * @function taskActions\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsContext}\n   */\n  /* jshint ignore:end */\n  function TaskActionsListInstance(sid) {\n    return TaskActionsListInstance.get(sid);\n  }\n\n  TaskActionsListInstance._version = version;\n  // Path Solution\n  TaskActionsListInstance._solution = {assistantSid: assistantSid, taskSid: taskSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a task_actions\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsList#\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsContext}\n   */\n  /* jshint ignore:end */\n  TaskActionsListInstance.get = function get() {\n    return new TaskActionsContext(this._version, this._solution.assistantSid, this._solution.taskSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskActionsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskActionsListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskActionsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskActionsPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskActionsSolution} solution - Path solution\n *\n * @returns TaskActionsPage\n */\n/* jshint ignore:end */\nTaskActionsPage = function TaskActionsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskActionsPage.prototype, Page.prototype);\nTaskActionsPage.prototype.constructor = TaskActionsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskActionsInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsPage#\n *\n * @param {TaskActionsPayload} payload - Payload response from the API\n *\n * @returns TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskActionsInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.taskSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskActionsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskActionsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskActionsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @property {string} taskSid - The SID of the Task associated with the resource\n * @property {string} url - The absolute URL of the TaskActions resource\n * @property {object} data -\n *          The JSON string that specifies the actions that instruct the Assistant on how to perform the task\n *\n * @param {V1} version - Version of the resource\n * @param {TaskActionsPayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @param {sid} taskSid - The SID of the Task associated with the resource\n */\n/* jshint ignore:end */\nTaskActionsInstance = function TaskActionsInstance(version, payload,\n                                                    assistantSid, taskSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, };\n};\n\nObject.defineProperty(TaskActionsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskActionsContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.taskSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskActionsInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskActionsInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.actions] -\n *          The JSON string that specifies the actions that instruct the Assistant on how to perform the task\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskActionsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskActionsInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskActionsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the Task for which the task actions to fetch were defined\n * @param {sid_like} taskSid -\n *          The SID of the Task for which the task actions to fetch were defined\n */\n/* jshint ignore:end */\nTaskActionsContext = function TaskActionsContext(version, assistantSid, taskSid)\n                                                  {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Actions`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskActionsInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskActionsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskActionsInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.actions] -\n *          The JSON string that specifies the actions that instruct the Assistant on how to perform the task\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Actions': serialize.object(_.get(opts, 'actions'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskActionsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskActionsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskActionsContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskActionsList: TaskActionsList,\n  TaskActionsPage: TaskActionsPage,\n  TaskActionsInstance: TaskActionsInstance,\n  TaskActionsContext: TaskActionsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TaskStatisticsList;\nvar TaskStatisticsPage;\nvar TaskStatisticsInstance;\nvar TaskStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskStatisticsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @param {string} taskSid -\n *          The SID of the Task for which the statistics were collected\n */\n/* jshint ignore:end */\nTaskStatisticsList = function TaskStatisticsList(version, assistantSid, taskSid)\n                                                  {\n  /* jshint ignore:start */\n  /**\n   * @function statistics\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function TaskStatisticsListInstance(sid) {\n    return TaskStatisticsListInstance.get(sid);\n  }\n\n  TaskStatisticsListInstance._version = version;\n  // Path Solution\n  TaskStatisticsListInstance._solution = {assistantSid: assistantSid, taskSid: taskSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a task_statistics\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsList#\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsContext}\n   */\n  /* jshint ignore:end */\n  TaskStatisticsListInstance.get = function get() {\n    return new TaskStatisticsContext(\n      this._version,\n      this._solution.assistantSid,\n      this._solution.taskSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskStatisticsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskStatisticsPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskStatisticsSolution} solution - Path solution\n *\n * @returns TaskStatisticsPage\n */\n/* jshint ignore:end */\nTaskStatisticsPage = function TaskStatisticsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskStatisticsPage.prototype, Page.prototype);\nTaskStatisticsPage.prototype.constructor = TaskStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsPage#\n *\n * @param {TaskStatisticsPayload} payload - Payload response from the API\n *\n * @returns TaskStatisticsInstance\n */\n/* jshint ignore:end */\nTaskStatisticsPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.taskSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskStatisticsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskStatisticsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @property {string} taskSid -\n *          The SID of the Task for which the statistics were collected\n * @property {number} samplesCount -\n *          The total number of Samples associated with the Task\n * @property {number} fieldsCount -\n *          The total number of Fields associated with the Task\n * @property {string} url - The absolute URL of the TaskStatistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {TaskStatisticsPayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the Task associated with the resource\n * @param {sid} taskSid -\n *          The SID of the Task for which the statistics were collected\n */\n/* jshint ignore:end */\nTaskStatisticsInstance = function TaskStatisticsInstance(version, payload,\n                                                          assistantSid, taskSid)\n                                                          {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.samplesCount = deserialize.integer(payload.samples_count); // jshint ignore:line\n  this.fieldsCount = deserialize.integer(payload.fields_count); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, };\n};\n\nObject.defineProperty(TaskStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskStatisticsContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.taskSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskStatisticsInstance\n */\n/* jshint ignore:end */\nTaskStatisticsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskStatisticsInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskStatisticsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the resource to fetch\n * @param {sid_like} taskSid -\n *          The SID of the Task that is associated with the resource to fetch\n */\n/* jshint ignore:end */\nTaskStatisticsContext = function TaskStatisticsContext(version, assistantSid,\n                                                        taskSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Statistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskStatisticsInstance\n */\n/* jshint ignore:end */\nTaskStatisticsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskStatisticsContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskStatisticsList: TaskStatisticsList,\n  TaskStatisticsPage: TaskStatisticsPage,\n  TaskStatisticsInstance: TaskStatisticsInstance,\n  TaskStatisticsContext: TaskStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar FieldList = require('./task/field').FieldList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar SampleList = require('./task/sample').SampleList;\nvar TaskActionsList = require('./task/taskActions').TaskActionsList;\nvar TaskStatisticsList = require('./task/taskStatistics').TaskStatisticsList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TaskList;\nvar TaskPage;\nvar TaskInstance;\nvar TaskContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nTaskList = function TaskList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function tasks\n   * @memberof Twilio.Autopilot.V1.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext}\n   */\n  /* jshint ignore:end */\n  function TaskListInstance(sid) {\n    return TaskListInstance.get(sid);\n  }\n\n  TaskListInstance._version = version;\n  // Path Solution\n  TaskListInstance._solution = {assistantSid: assistantSid};\n  TaskListInstance._uri = `/Assistants/${assistantSid}/Tasks`;\n  /* jshint ignore:start */\n  /**\n   * Streams TaskInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TaskListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TaskInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TaskInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TaskInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a TaskInstance\n   *\n   * @function create\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.uniqueName -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {string} [opts.friendlyName] -\n   *         descriptive string that you create to describe the new resource\n   * @param {object} [opts.actions] -\n   *          The JSON string that specifies the actions that instruct the Assistant on how to perform the task\n   * @param {string} [opts.actionsUrl] -\n   *          The URL from which the Assistant can fetch actions\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TaskInstance\n   */\n  /* jshint ignore:end */\n  TaskListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Actions': serialize.object(_.get(opts, 'actions')),\n      'ActionsUrl': _.get(opts, 'actionsUrl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a task\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskList#\n   *\n   * @param {string} sid - The unique string that identifies the resource to fetch\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext}\n   */\n  /* jshint ignore:end */\n  TaskListInstance.get = function get(sid) {\n    return new TaskContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.TaskList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskSolution} solution - Path solution\n *\n * @returns TaskPage\n */\n/* jshint ignore:end */\nTaskPage = function TaskPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskPage.prototype, Page.prototype);\nTaskPage.prototype.constructor = TaskPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskPage#\n *\n * @param {TaskPayload} payload - Payload response from the API\n *\n * @returns TaskInstance\n */\n/* jshint ignore:end */\nTaskPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} links - A list of the URLs of related resources\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} actionsUrl -\n *          The URL from which the Assistant can fetch actions\n * @property {string} url - The absolute URL of the Task resource\n *\n * @param {V1} version - Version of the resource\n * @param {TaskPayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @param {sid_like} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nTaskInstance = function TaskInstance(version, payload, assistantSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.actionsUrl = payload.actions_url; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TaskInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskContext(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {object} [opts.actions] -\n *          The JSON string that specifies the actions that instruct the Assistant on how to perform the task\n * @param {string} [opts.actionsUrl] -\n *          The URL from which the Assistant can fetch actions\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the fields\n *\n * @function fields\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList}\n */\n/* jshint ignore:end */\nTaskInstance.prototype.fields = function fields() {\n  return this._proxy.fields;\n};\n\n/* jshint ignore:start */\n/**\n * Access the samples\n *\n * @function samples\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList}\n */\n/* jshint ignore:end */\nTaskInstance.prototype.samples = function samples() {\n  return this._proxy.samples;\n};\n\n/* jshint ignore:start */\n/**\n * Access the taskActions\n *\n * @function taskActions\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsList}\n */\n/* jshint ignore:end */\nTaskInstance.prototype.taskActions = function taskActions() {\n  return this._proxy.taskActions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the statistics\n *\n * @function statistics\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsList}\n */\n/* jshint ignore:end */\nTaskInstance.prototype.statistics = function statistics() {\n  return this._proxy.statistics;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.TaskContext\n *\n * @property {Twilio.Autopilot.V1.AssistantContext.TaskContext.FieldList} fields -\n *          fields resource\n * @property {Twilio.Autopilot.V1.AssistantContext.TaskContext.SampleList} samples -\n *          samples resource\n * @property {Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskActionsList} taskActions -\n *          taskActions resource\n * @property {Twilio.Autopilot.V1.AssistantContext.TaskContext.TaskStatisticsList} statistics -\n *          statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the resource to fetch\n * @param {sid_like} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nTaskContext = function TaskContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${sid}`;\n\n  // Dependents\n  this._fields = undefined;\n  this._samples = undefined;\n  this._taskActions = undefined;\n  this._statistics = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {object} [opts.actions] -\n *          The JSON string that specifies the actions that instruct the Assistant on how to perform the task\n * @param {string} [opts.actionsUrl] -\n *          The URL from which the Assistant can fetch actions\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'Actions': serialize.object(_.get(opts, 'actions')),\n    'ActionsUrl': _.get(opts, 'actionsUrl')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(TaskContext.prototype,\n  'fields', {\n    get: function() {\n      if (!this._fields) {\n        this._fields = new FieldList(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n      return this._fields;\n    }\n});\n\nObject.defineProperty(TaskContext.prototype,\n  'samples', {\n    get: function() {\n      if (!this._samples) {\n        this._samples = new SampleList(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n      return this._samples;\n    }\n});\n\nObject.defineProperty(TaskContext.prototype,\n  'taskActions', {\n    get: function() {\n      if (!this._taskActions) {\n        this._taskActions = new TaskActionsList(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n      return this._taskActions;\n    }\n});\n\nObject.defineProperty(TaskContext.prototype,\n  'statistics', {\n    get: function() {\n      if (!this._statistics) {\n        this._statistics = new TaskStatisticsList(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n      return this._statistics;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.TaskContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskList: TaskList,\n  TaskPage: TaskPage,\n  TaskInstance: TaskInstance,\n  TaskContext: TaskContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar WebhookList;\nvar WebhookPage;\nvar WebhookInstance;\nvar WebhookContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.WebhookList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n * @param {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n */\n/* jshint ignore:end */\nWebhookList = function WebhookList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function webhooks\n   * @memberof Twilio.Autopilot.V1.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  function WebhookListInstance(sid) {\n    return WebhookListInstance.get(sid);\n  }\n\n  WebhookListInstance._version = version;\n  // Path Solution\n  WebhookListInstance._solution = {assistantSid: assistantSid};\n  WebhookListInstance._uri = `/Assistants/${assistantSid}/Webhooks`;\n  /* jshint ignore:start */\n  /**\n   * Streams WebhookInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WebhookInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a WebhookInstance\n   *\n   * @function create\n   * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.uniqueName -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {string} opts.events -\n   *          The list of space-separated events that this Webhook will subscribe to.\n   * @param {string} opts.webhookUrl - The URL associated with this Webhook.\n   * @param {string} [opts.webhookMethod] -\n   *          The method to be used when calling the webhook's URL.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WebhookInstance\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['events'])) {\n      throw new Error('Required parameter \"opts[\\'events\\']\" missing.');\n    }\n    if (_.isUndefined(opts['webhookUrl'])) {\n      throw new Error('Required parameter \"opts[\\'webhookUrl\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Events': _.get(opts, 'events'),\n      'WebhookUrl': _.get(opts, 'webhookUrl'),\n      'WebhookMethod': _.get(opts, 'webhookMethod')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a webhook\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookList#\n   *\n   * @param {string} sid - The unique string that identifies the resource to fetch\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.get = function get(sid) {\n    return new WebhookContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WebhookListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WebhookListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.WebhookPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WebhookSolution} solution - Path solution\n *\n * @returns WebhookPage\n */\n/* jshint ignore:end */\nWebhookPage = function WebhookPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WebhookPage.prototype, Page.prototype);\nWebhookPage.prototype.constructor = WebhookPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WebhookInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookPage#\n *\n * @param {WebhookPayload} payload - Payload response from the API\n *\n * @returns WebhookInstance\n */\n/* jshint ignore:end */\nWebhookPage.prototype.getInstance = function getInstance(payload) {\n  return new WebhookInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.WebhookInstance\n *\n * @property {string} url - The absolute URL of the Webhook resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} events -\n *          The list of space-separated events that this Webhook is subscribed to.\n * @property {string} webhookUrl - The URL associated with this Webhook.\n * @property {string} webhookMethod -\n *          The method used when calling the webhook's URL.\n *\n * @param {V1} version - Version of the resource\n * @param {WebhookPayload} payload - The instance payload\n * @param {sid} assistantSid -\n *          The SID of the Assistant that is the parent of the resource\n * @param {sid_like} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nWebhookInstance = function WebhookInstance(version, payload, assistantSid, sid)\n                                            {\n  this._version = version;\n\n  // Marshaled Properties\n  this.url = payload.url; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.events = payload.events; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(WebhookInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WebhookContext(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.events] -\n *          The list of space-separated events that this Webhook will subscribe to.\n * @param {string} [opts.webhookUrl] - The URL associated with this Webhook.\n * @param {string} [opts.webhookMethod] -\n *          The method to be used when calling the webhook's URL.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext.WebhookContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} assistantSid -\n *          The SID of the Assistant that is the parent of the resource to fetch\n * @param {sid_like} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nWebhookContext = function WebhookContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Webhooks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.events] -\n *          The list of space-separated events that this Webhook will subscribe to.\n * @param {string} [opts.webhookUrl] - The URL associated with this Webhook.\n * @param {string} [opts.webhookMethod] -\n *          The method to be used when calling the webhook's URL.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'Events': _.get(opts, 'events'),\n    'WebhookUrl': _.get(opts, 'webhookUrl'),\n    'WebhookMethod': _.get(opts, 'webhookMethod')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext.WebhookContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWebhookContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WebhookList: WebhookList,\n  WebhookPage: WebhookPage,\n  WebhookInstance: WebhookInstance,\n  WebhookContext: WebhookContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DefaultsList = require('./assistant/defaults').DefaultsList;\nvar DialogueList = require('./assistant/dialogue').DialogueList;\nvar FieldTypeList = require('./assistant/fieldType').FieldTypeList;\nvar ModelBuildList = require('./assistant/modelBuild').ModelBuildList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar QueryList = require('./assistant/query').QueryList;\nvar StyleSheetList = require('./assistant/styleSheet').StyleSheetList;\nvar TaskList = require('./assistant/task').TaskList;\nvar WebhookList = require('./assistant/webhook').WebhookList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar AssistantList;\nvar AssistantPage;\nvar AssistantInstance;\nvar AssistantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nAssistantList = function AssistantList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function assistants\n   * @memberof Twilio.Autopilot.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext}\n   */\n  /* jshint ignore:end */\n  function AssistantListInstance(sid) {\n    return AssistantListInstance.get(sid);\n  }\n\n  AssistantListInstance._version = version;\n  // Path Solution\n  AssistantListInstance._solution = {};\n  AssistantListInstance._uri = `/Assistants`;\n  /* jshint ignore:start */\n  /**\n   * Streams AssistantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Autopilot.V1.AssistantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AssistantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Autopilot.V1.AssistantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AssistantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Autopilot.V1.AssistantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssistantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AssistantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Autopilot.V1.AssistantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssistantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a AssistantInstance\n   *\n   * @function create\n   * @memberof Twilio.Autopilot.V1.AssistantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - A string to describe the new resource\n   * @param {boolean} [opts.logQueries] -\n   *          Whether queries should be logged and kept after training\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the new resource\n   * @param {string} [opts.callbackUrl] - Reserved\n   * @param {string} [opts.callbackEvents] - Reserved\n   * @param {object} [opts.styleSheet] -\n   *          A JSON string that defines the Assistant's style sheet\n   * @param {object} [opts.defaults] -\n   *          A JSON object that defines the Assistant's default tasks for various scenarios\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AssistantInstance\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'LogQueries': serialize.bool(_.get(opts, 'logQueries')),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'CallbackUrl': _.get(opts, 'callbackUrl'),\n      'CallbackEvents': _.get(opts, 'callbackEvents'),\n      'StyleSheet': serialize.object(_.get(opts, 'styleSheet')),\n      'Defaults': serialize.object(_.get(opts, 'defaults'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssistantInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a assistant\n   *\n   * @function get\n   * @memberof Twilio.Autopilot.V1.AssistantList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Autopilot.V1.AssistantContext}\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.get = function get(sid) {\n    return new AssistantContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.AssistantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AssistantListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AssistantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AssistantSolution} solution - Path solution\n *\n * @returns AssistantPage\n */\n/* jshint ignore:end */\nAssistantPage = function AssistantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AssistantPage.prototype, Page.prototype);\nAssistantPage.prototype.constructor = AssistantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AssistantInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.AssistantPage#\n *\n * @param {AssistantPayload} payload - Payload response from the API\n *\n * @returns AssistantInstance\n */\n/* jshint ignore:end */\nAssistantPage.prototype.getInstance = function getInstance(payload) {\n  return new AssistantInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssistantPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} latestModelBuildSid - Reserved\n * @property {string} links -\n *          A list of the URLs of the Assistant's related resources\n * @property {boolean} logQueries -\n *          Whether queries should be logged and kept after training\n * @property {string} developmentStage -\n *          A string describing the state of the assistant.\n * @property {boolean} needsModelBuild - Whether model needs to be rebuilt\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} url - The absolute URL of the Assistant resource\n * @property {string} callbackUrl - Reserved\n * @property {string} callbackEvents - Reserved\n *\n * @param {V1} version - Version of the resource\n * @param {AssistantPayload} payload - The instance payload\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAssistantInstance = function AssistantInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.latestModelBuildSid = payload.latest_model_build_sid; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.logQueries = payload.log_queries; // jshint ignore:line\n  this.developmentStage = payload.development_stage; // jshint ignore:line\n  this.needsModelBuild = payload.needs_model_build; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.callbackUrl = payload.callback_url; // jshint ignore:line\n  this.callbackEvents = payload.callback_events; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(AssistantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AssistantContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AssistantInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AssistantInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {boolean} [opts.logQueries] -\n *          Whether queries should be logged and kept after training\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.callbackUrl] - Reserved\n * @param {string} [opts.callbackEvents] - Reserved\n * @param {object} [opts.styleSheet] -\n *          A JSON string that defines the Assistant's style sheet\n * @param {object} [opts.defaults] -\n *          A JSON object that defines the Assistant's {@link https://www.twilio.com/docs/autopilot/api/assistant/defaults|default tasks} for various scenarios\n * @param {string} [opts.developmentStage] -\n *          A string describing the state of the assistant.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AssistantInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the fieldTypes\n *\n * @function fieldTypes\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.FieldTypeList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.fieldTypes = function fieldTypes() {\n  return this._proxy.fieldTypes;\n};\n\n/* jshint ignore:start */\n/**\n * Access the tasks\n *\n * @function tasks\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.TaskList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.tasks = function tasks() {\n  return this._proxy.tasks;\n};\n\n/* jshint ignore:start */\n/**\n * Access the modelBuilds\n *\n * @function modelBuilds\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.ModelBuildList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.modelBuilds = function modelBuilds() {\n  return this._proxy.modelBuilds;\n};\n\n/* jshint ignore:start */\n/**\n * Access the queries\n *\n * @function queries\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.QueryList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.queries = function queries() {\n  return this._proxy.queries;\n};\n\n/* jshint ignore:start */\n/**\n * Access the styleSheet\n *\n * @function styleSheet\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.StyleSheetList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.styleSheet = function styleSheet() {\n  return this._proxy.styleSheet;\n};\n\n/* jshint ignore:start */\n/**\n * Access the defaults\n *\n * @function defaults\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.DefaultsList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.defaults = function defaults() {\n  return this._proxy.defaults;\n};\n\n/* jshint ignore:start */\n/**\n * Access the dialogues\n *\n * @function dialogues\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.DialogueList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.dialogues = function dialogues() {\n  return this._proxy.dialogues;\n};\n\n/* jshint ignore:start */\n/**\n * Access the webhooks\n *\n * @function webhooks\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @returns {Twilio.Autopilot.V1.AssistantContext.WebhookList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.webhooks = function webhooks() {\n  return this._proxy.webhooks;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssistantInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.AssistantContext\n *\n * @property {Twilio.Autopilot.V1.AssistantContext.FieldTypeList} fieldTypes -\n *          fieldTypes resource\n * @property {Twilio.Autopilot.V1.AssistantContext.TaskList} tasks - tasks resource\n * @property {Twilio.Autopilot.V1.AssistantContext.ModelBuildList} modelBuilds -\n *          modelBuilds resource\n * @property {Twilio.Autopilot.V1.AssistantContext.QueryList} queries -\n *          queries resource\n * @property {Twilio.Autopilot.V1.AssistantContext.StyleSheetList} styleSheet -\n *          styleSheet resource\n * @property {Twilio.Autopilot.V1.AssistantContext.DefaultsList} defaults -\n *          defaults resource\n * @property {Twilio.Autopilot.V1.AssistantContext.DialogueList} dialogues -\n *          dialogues resource\n * @property {Twilio.Autopilot.V1.AssistantContext.WebhookList} webhooks -\n *          webhooks resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nAssistantContext = function AssistantContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Assistants/${sid}`;\n\n  // Dependents\n  this._fieldTypes = undefined;\n  this._tasks = undefined;\n  this._modelBuilds = undefined;\n  this._queries = undefined;\n  this._styleSheet = undefined;\n  this._defaults = undefined;\n  this._dialogues = undefined;\n  this._webhooks = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AssistantInstance\n *\n * @function fetch\n * @memberof Twilio.Autopilot.V1.AssistantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssistantInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AssistantInstance\n *\n * @function update\n * @memberof Twilio.Autopilot.V1.AssistantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {boolean} [opts.logQueries] -\n *          Whether queries should be logged and kept after training\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.callbackUrl] - Reserved\n * @param {string} [opts.callbackEvents] - Reserved\n * @param {object} [opts.styleSheet] -\n *          A JSON string that defines the Assistant's style sheet\n * @param {object} [opts.defaults] -\n *          A JSON object that defines the Assistant's {@link https://www.twilio.com/docs/autopilot/api/assistant/defaults|default tasks} for various scenarios\n * @param {string} [opts.developmentStage] -\n *          A string describing the state of the assistant.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'LogQueries': serialize.bool(_.get(opts, 'logQueries')),\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'CallbackUrl': _.get(opts, 'callbackUrl'),\n    'CallbackEvents': _.get(opts, 'callbackEvents'),\n    'StyleSheet': serialize.object(_.get(opts, 'styleSheet')),\n    'Defaults': serialize.object(_.get(opts, 'defaults')),\n    'DevelopmentStage': _.get(opts, 'developmentStage')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssistantInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AssistantInstance\n *\n * @function remove\n * @memberof Twilio.Autopilot.V1.AssistantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AssistantContext.prototype,\n  'fieldTypes', {\n    get: function() {\n      if (!this._fieldTypes) {\n        this._fieldTypes = new FieldTypeList(this._version, this._solution.sid);\n      }\n      return this._fieldTypes;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'tasks', {\n    get: function() {\n      if (!this._tasks) {\n        this._tasks = new TaskList(this._version, this._solution.sid);\n      }\n      return this._tasks;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'modelBuilds', {\n    get: function() {\n      if (!this._modelBuilds) {\n        this._modelBuilds = new ModelBuildList(this._version, this._solution.sid);\n      }\n      return this._modelBuilds;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'queries', {\n    get: function() {\n      if (!this._queries) {\n        this._queries = new QueryList(this._version, this._solution.sid);\n      }\n      return this._queries;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'styleSheet', {\n    get: function() {\n      if (!this._styleSheet) {\n        this._styleSheet = new StyleSheetList(this._version, this._solution.sid);\n      }\n      return this._styleSheet;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'defaults', {\n    get: function() {\n      if (!this._defaults) {\n        this._defaults = new DefaultsList(this._version, this._solution.sid);\n      }\n      return this._defaults;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'dialogues', {\n    get: function() {\n      if (!this._dialogues) {\n        this._dialogues = new DialogueList(this._version, this._solution.sid);\n      }\n      return this._dialogues;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'webhooks', {\n    get: function() {\n      if (!this._webhooks) {\n        this._webhooks = new WebhookList(this._version, this._solution.sid);\n      }\n      return this._webhooks;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.AssistantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAssistantContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AssistantList: AssistantList,\n  AssistantPage: AssistantPage,\n  AssistantInstance: AssistantInstance,\n  AssistantContext: AssistantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar RestoreAssistantList;\nvar RestoreAssistantPage;\nvar RestoreAssistantInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the RestoreAssistantList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.RestoreAssistantList\n *\n * @param {Twilio.Autopilot.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nRestoreAssistantList = function RestoreAssistantList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function restoreAssistant\n   * @memberof Twilio.Autopilot.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Autopilot.V1.RestoreAssistantContext}\n   */\n  /* jshint ignore:end */\n  function RestoreAssistantListInstance(sid) {\n    return RestoreAssistantListInstance.get(sid);\n  }\n\n  RestoreAssistantListInstance._version = version;\n  // Path Solution\n  RestoreAssistantListInstance._solution = {};\n  RestoreAssistantListInstance._uri = `/Assistants/Restore`;\n  /* jshint ignore:start */\n  /**\n   * update a RestoreAssistantInstance\n   *\n   * @function update\n   * @memberof Twilio.Autopilot.V1.RestoreAssistantList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.assistant - The unique string that identifies the resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RestoreAssistantInstance\n   */\n  /* jshint ignore:end */\n  RestoreAssistantListInstance.update = function update(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['assistant'])) {\n      throw new Error('Required parameter \"opts[\\'assistant\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Assistant': _.get(opts, 'assistant')});\n\n    var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RestoreAssistantInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Autopilot.V1.RestoreAssistantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RestoreAssistantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RestoreAssistantListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RestoreAssistantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RestoreAssistantPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.RestoreAssistantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RestoreAssistantSolution} solution - Path solution\n *\n * @returns RestoreAssistantPage\n */\n/* jshint ignore:end */\nRestoreAssistantPage = function RestoreAssistantPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RestoreAssistantPage.prototype, Page.prototype);\nRestoreAssistantPage.prototype.constructor = RestoreAssistantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RestoreAssistantInstance\n *\n * @function getInstance\n * @memberof Twilio.Autopilot.V1.RestoreAssistantPage#\n *\n * @param {RestoreAssistantPayload} payload - Payload response from the API\n *\n * @returns RestoreAssistantInstance\n */\n/* jshint ignore:end */\nRestoreAssistantPage.prototype.getInstance = function getInstance(payload) {\n  return new RestoreAssistantInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.RestoreAssistantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRestoreAssistantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRestoreAssistantPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RestoreAssistantContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Autopilot.V1.RestoreAssistantInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {boolean} needsModelBuild - Whether model needs to be rebuilt\n * @property {string} latestModelBuildSid - Reserved\n * @property {boolean} logQueries -\n *          Whether queries should be logged and kept after training\n * @property {string} developmentStage -\n *          A string describing the state of the assistant.\n * @property {string} callbackUrl - Reserved\n * @property {string} callbackEvents - Reserved\n *\n * @param {V1} version - Version of the resource\n * @param {RestoreAssistantPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nRestoreAssistantInstance = function RestoreAssistantInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.needsModelBuild = payload.needs_model_build; // jshint ignore:line\n  this.latestModelBuildSid = payload.latest_model_build_sid; // jshint ignore:line\n  this.logQueries = payload.log_queries; // jshint ignore:line\n  this.developmentStage = payload.development_stage; // jshint ignore:line\n  this.callbackUrl = payload.callback_url; // jshint ignore:line\n  this.callbackEvents = payload.callback_events; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Autopilot.V1.RestoreAssistantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRestoreAssistantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRestoreAssistantInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RestoreAssistantList: RestoreAssistantList,\n  RestoreAssistantPage: RestoreAssistantPage,\n  RestoreAssistantInstance: RestoreAssistantInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar AssistantList = require('./v1/assistant').AssistantList;\nvar RestoreAssistantList = require(\n    './v1/restoreAssistant').RestoreAssistantList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Autopilot\n *\n * @constructor Twilio.Autopilot.V1\n *\n * @property {Twilio.Autopilot.V1.AssistantList} assistants - assistants resource\n * @property {Twilio.Autopilot.V1.RestoreAssistantList} restoreAssistant -\n *          restoreAssistant resource\n *\n * @param {Twilio.Autopilot} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._assistants = undefined;\n  this._restoreAssistant = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'assistants', {\n    get: function() {\n      this._assistants = this._assistants || new AssistantList(this);\n      return this._assistants;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'restoreAssistant', {\n    get: function() {\n      this._restoreAssistant = this._restoreAssistant || new RestoreAssistantList(this);\n      return this._restoreAssistant;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./autopilot/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize autopilot domain\n *\n * @constructor Twilio.Autopilot\n *\n * @property {Twilio.Autopilot.V1} v1 - v1 version\n * @property {Twilio.Autopilot.V1.AssistantList} assistants - assistants resource\n * @property {Twilio.Autopilot.V1.RestoreAssistantList} restoreAssistant -\n *          restoreAssistant resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Autopilot(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://autopilot.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Autopilot.prototype, Domain.prototype);\nAutopilot.prototype.constructor = Autopilot;\n\nObject.defineProperty(Autopilot.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Autopilot.prototype,\n  'assistants', {\n    get: function() {\n      return this.v1.assistants;\n    }\n});\n\nObject.defineProperty(Autopilot.prototype,\n  'restoreAssistant', {\n    get: function() {\n      return this.v1.restoreAssistant;\n    }\n});\n\nmodule.exports = Autopilot;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CredentialList;\nvar CredentialPage;\nvar CredentialInstance;\nvar CredentialContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialList\n *\n * @constructor Twilio.Chat.V1.CredentialList\n *\n * @param {Twilio.Chat.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCredentialList = function CredentialList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function credentials\n   * @memberof Twilio.Chat.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V1.CredentialContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListInstance(sid) {\n    return CredentialListInstance.get(sid);\n  }\n\n  CredentialListInstance._version = version;\n  // Path Solution\n  CredentialListInstance._solution = {};\n  CredentialListInstance._uri = `/Credentials`;\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V1.CredentialList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CredentialInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V1.CredentialList#\n   *\n   * @param {object} opts - Options for request\n   * @param {credential.push_service} opts.type -\n   *          The type of push-notification service the credential is for\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.certificate] -\n   *          [APN only] The URL encoded representation of the certificate\n   * @param {string} [opts.privateKey] -\n   *          [APN only] The URL encoded representation of the private key\n   * @param {boolean} [opts.sandbox] -\n   *          [APN only] Whether to send the credential to sandbox APNs\n   * @param {string} [opts.apiKey] -\n   *          [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential\n   * @param {string} [opts.secret] -\n   *          [FCM only] The Server key of your project from Firebase console\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialInstance\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Certificate': _.get(opts, 'certificate'),\n      'PrivateKey': _.get(opts, 'privateKey'),\n      'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n      'ApiKey': _.get(opts, 'apiKey'),\n      'Secret': _.get(opts, 'secret')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential\n   *\n   * @function get\n   * @memberof Twilio.Chat.V1.CredentialList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Chat.V1.CredentialContext}\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.get = function get(sid) {\n    return new CredentialContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V1.CredentialList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialPage\n *\n * @constructor Twilio.Chat.V1.CredentialPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialSolution} solution - Path solution\n *\n * @returns CredentialPage\n */\n/* jshint ignore:end */\nCredentialPage = function CredentialPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialPage.prototype, Page.prototype);\nCredentialPage.prototype.constructor = CredentialPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V1.CredentialPage#\n *\n * @param {CredentialPayload} payload - Payload response from the API\n *\n * @returns CredentialInstance\n */\n/* jshint ignore:end */\nCredentialPage.prototype.getInstance = function getInstance(payload) {\n  return new CredentialInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.CredentialPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.Chat.V1.CredentialInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {credential.push_service} type -\n *          The type of push-notification service the credential is for\n * @property {string} sandbox -\n *          [APN only] Whether to send the credential to sandbox APNs\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Credential resource\n *\n * @param {V1} version - Version of the resource\n * @param {CredentialPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCredentialInstance = function CredentialInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.sandbox = payload.sandbox; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CredentialInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.CredentialInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.certificate] -\n *          [APN only] The URL encoded representation of the certificate\n * @param {string} [opts.privateKey] -\n *          [APN only] The URL encoded representation of the private key\n * @param {boolean} [opts.sandbox] -\n *          [APN only] Whether to send the credential to sandbox APNs\n * @param {string} [opts.apiKey] -\n *          [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential\n * @param {string} [opts.secret] -\n *          [FCM only] The Server key of your project from Firebase console\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.CredentialInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.Chat.V1.CredentialContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCredentialContext = function CredentialContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Credentials/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.CredentialContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.certificate] -\n *          [APN only] The URL encoded representation of the certificate\n * @param {string} [opts.privateKey] -\n *          [APN only] The URL encoded representation of the private key\n * @param {boolean} [opts.sandbox] -\n *          [APN only] Whether to send the credential to sandbox APNs\n * @param {string} [opts.apiKey] -\n *          [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential\n * @param {string} [opts.secret] -\n *          [FCM only] The Server key of your project from Firebase console\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Certificate': _.get(opts, 'certificate'),\n    'PrivateKey': _.get(opts, 'privateKey'),\n    'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n    'ApiKey': _.get(opts, 'apiKey'),\n    'Secret': _.get(opts, 'secret')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.CredentialContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialList: CredentialList,\n  CredentialPage: CredentialPage,\n  CredentialInstance: CredentialInstance,\n  CredentialContext: CredentialContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar InviteList;\nvar InvitePage;\nvar InviteInstance;\nvar InviteContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteList\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList\n *\n * @param {Twilio.Chat.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} channelSid - The SID of the Channel the new resource belongs to\n */\n/* jshint ignore:end */\nInviteList = function InviteList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function invites\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext.InviteContext}\n   */\n  /* jshint ignore:end */\n  function InviteListInstance(sid) {\n    return InviteListInstance.get(sid);\n  }\n\n  InviteListInstance._version = version;\n  // Path Solution\n  InviteListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  InviteListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Invites`;\n  /* jshint ignore:start */\n  /**\n   * create a InviteInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity -\n   *          The `identity` value that identifies the new resource's User\n   * @param {string} [opts.roleSid] - The Role assigned to the new member\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed InviteInstance\n   */\n  /* jshint ignore:end */\n  InviteListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Identity': _.get(opts, 'identity'), 'RoleSid': _.get(opts, 'roleSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InviteInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams InviteInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InviteListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InviteInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InviteInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InviteInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a invite\n   *\n   * @function get\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext.InviteContext}\n   */\n  /* jshint ignore:end */\n  InviteListInstance.get = function get(sid) {\n    return new InviteContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InviteListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InviteListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InviteListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InvitePage\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.InvitePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InviteSolution} solution - Path solution\n *\n * @returns InvitePage\n */\n/* jshint ignore:end */\nInvitePage = function InvitePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InvitePage.prototype, Page.prototype);\nInvitePage.prototype.constructor = InvitePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InviteInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InvitePage#\n *\n * @param {InvitePayload} payload - Payload response from the API\n *\n * @returns InviteInstance\n */\n/* jshint ignore:end */\nInvitePage.prototype.getInstance = function getInstance(payload) {\n  return new InviteInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InvitePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInvitePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInvitePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.InviteInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} channelSid -\n *          The SID of the Channel the new resource belongs to\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} identity - The string that identifies the resource's User\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} roleSid - The SID of the Role assigned to the member\n * @property {string} createdBy - The identity of the User that created the invite\n * @property {string} url - The absolute URL of the Invite resource\n *\n * @param {V1} version - Version of the resource\n * @param {InvitePayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} channelSid - The SID of the Channel the new resource belongs to\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nInviteInstance = function InviteInstance(version, payload, serviceSid,\n                                          channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(InviteInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InviteContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a InviteInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a InviteInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInviteInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInviteInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.InviteContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} channelSid -\n *          The SID of the Channel the resource to fetch belongs to\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nInviteContext = function InviteContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Invites/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InviteInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InviteInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a InviteInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.InviteContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInviteContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInviteContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InviteList: InviteList,\n  InvitePage: InvitePage,\n  InviteInstance: InviteInstance,\n  InviteContext: InviteContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MemberList;\nvar MemberPage;\nvar MemberInstance;\nvar MemberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberList\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList\n *\n * @param {Twilio.Chat.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} channelSid - The unique ID of the Channel for the member\n */\n/* jshint ignore:end */\nMemberList = function MemberList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function members\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  function MemberListInstance(sid) {\n    return MemberListInstance.get(sid);\n  }\n\n  MemberListInstance._version = version;\n  // Path Solution\n  MemberListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  MemberListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Members`;\n  /* jshint ignore:start */\n  /**\n   * create a MemberInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity -\n   *          The `identity` value that identifies the new resource's User\n   * @param {string} [opts.roleSid] - The SID of the Role to assign to the member\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MemberInstance\n   */\n  /* jshint ignore:end */\n  MemberListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Identity': _.get(opts, 'identity'), 'RoleSid': _.get(opts, 'roleSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MemberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MemberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MemberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a member\n   *\n   * @function get\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  MemberListInstance.get = function get(sid) {\n    return new MemberContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MemberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MemberListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MemberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberPage\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.MemberPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MemberSolution} solution - Path solution\n *\n * @returns MemberPage\n */\n/* jshint ignore:end */\nMemberPage = function MemberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MemberPage.prototype, Page.prototype);\nMemberPage.prototype.constructor = MemberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MemberInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberPage#\n *\n * @param {MemberPayload} payload - Payload response from the API\n *\n * @returns MemberInstance\n */\n/* jshint ignore:end */\nMemberPage.prototype.getInstance = function getInstance(payload) {\n  return new MemberInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.MemberInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} channelSid - The unique ID of the Channel for the member\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} identity - The string that identifies the resource's User\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} roleSid - The SID of the Role assigned to the member\n * @property {number} lastConsumedMessageIndex -\n *          The index of the last Message that the Member has read within the Channel\n * @property {Date} lastConsumptionTimestamp -\n *          The ISO 8601 based timestamp string that represents the date-time of the last Message read event for the Member within the Channel\n * @property {string} url - The absolute URL of the Member resource\n *\n * @param {V1} version - Version of the resource\n * @param {MemberPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} channelSid - The unique ID of the Channel for the member\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nMemberInstance = function MemberInstance(version, payload, serviceSid,\n                                          channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line\n  this.lastConsumptionTimestamp = deserialize.iso8601DateTime(payload.last_consumption_timestamp); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MemberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MemberContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MemberInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The SID of the Role to assign to the member\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The index of the last consumed Message for the Channel for the Member\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.MemberContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} channelSid -\n *          The unique ID of the channel the member belongs to\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nMemberContext = function MemberContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Members/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MemberInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The SID of the Role to assign to the member\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The index of the last consumed Message for the Channel for the Member\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'RoleSid': _.get(opts, 'roleSid'),\n    'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MemberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMemberContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MemberList: MemberList,\n  MemberPage: MemberPage,\n  MemberInstance: MemberInstance,\n  MemberContext: MemberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MessageList;\nvar MessagePage;\nvar MessageInstance;\nvar MessageContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageList\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList\n *\n * @param {Twilio.Chat.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} channelSid -\n *          The unique ID of the Channel the Message resource belongs to\n */\n/* jshint ignore:end */\nMessageList = function MessageList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function messages\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  function MessageListInstance(sid) {\n    return MessageListInstance.get(sid);\n  }\n\n  MessageListInstance._version = version;\n  // Path Solution\n  MessageListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  MessageListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Messages`;\n  /* jshint ignore:start */\n  /**\n   * create a MessageInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.body - The message to send to the channel\n   * @param {string} [opts.from] - The identity of the new message's author\n   * @param {string} [opts.attributes] -\n   *          A valid JSON string that contains application-specific data\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MessageInstance\n   */\n  /* jshint ignore:end */\n  MessageListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['body'])) {\n      throw new Error('Required parameter \"opts[\\'body\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Body': _.get(opts, 'body'),\n      'From': _.get(opts, 'from'),\n      'Attributes': _.get(opts, 'attributes')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MessageInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MessageListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MessageInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a message\n   *\n   * @function get\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  MessageListInstance.get = function get(sid) {\n    return new MessageContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessageListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessageListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagePage\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.MessagePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessageSolution} solution - Path solution\n *\n * @returns MessagePage\n */\n/* jshint ignore:end */\nMessagePage = function MessagePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessagePage.prototype, Page.prototype);\nMessagePage.prototype.constructor = MessagePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessageInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessagePage#\n *\n * @param {MessagePayload} payload - Payload response from the API\n *\n * @returns MessageInstance\n */\n/* jshint ignore:end */\nMessagePage.prototype.getInstance = function getInstance(payload) {\n  return new MessageInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessagePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.MessageInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} attributes -\n *          The JSON string that stores application-specific data\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} to - The SID of the Channel that the message was sent to\n * @property {string} channelSid -\n *          The unique ID of the Channel the Message resource belongs to\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {boolean} wasEdited -\n *          Whether the message has been edited since  it was created\n * @property {string} from - The identity of the message's author\n * @property {string} body - The content of the message\n * @property {number} index - The index of the message within the Channel\n * @property {string} url - The absolute URL of the Message resource\n *\n * @param {V1} version - Version of the resource\n * @param {MessagePayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} channelSid -\n *          The unique ID of the Channel the Message resource belongs to\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nMessageInstance = function MessageInstance(version, payload, serviceSid,\n                                            channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.wasEdited = payload.was_edited; // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.body = payload.body; // jshint ignore:line\n  this.index = deserialize.integer(payload.index); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MessageInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MessageContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The message to send to the channel\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessageInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext.MessageContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid} channelSid -\n *          The unique ID of the Channel the message to fetch belongs to\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nMessageContext = function MessageContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Messages/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The message to send to the channel\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Body': _.get(opts, 'body'), 'Attributes': _.get(opts, 'attributes')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext.MessageContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMessageContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessageList: MessageList,\n  MessagePage: MessagePage,\n  MessageInstance: MessageInstance,\n  MessageContext: MessageContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar InviteList = require('./channel/invite').InviteList;\nvar MemberList = require('./channel/member').MemberList;\nvar MessageList = require('./channel/message').MessageList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ChannelList;\nvar ChannelPage;\nvar ChannelInstance;\nvar ChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelList\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelList\n *\n * @param {Twilio.Chat.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nChannelList = function ChannelList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function channels\n   * @memberof Twilio.Chat.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext}\n   */\n  /* jshint ignore:end */\n  function ChannelListInstance(sid) {\n    return ChannelListInstance.get(sid);\n  }\n\n  ChannelListInstance._version = version;\n  // Path Solution\n  ChannelListInstance._solution = {serviceSid: serviceSid};\n  ChannelListInstance._uri = `/Services/${serviceSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * create a ChannelInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - A string to describe the new resource\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {string} [opts.attributes] -\n   *          A valid JSON string that contains application-specific data\n   * @param {channel.channel_type} [opts.type] - The visibility of the channel\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ChannelInstance\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Attributes': _.get(opts, 'attributes'),\n      'Type': _.get(opts, 'type')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] -\n   *          The visibility of the channel to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] -\n   *          The visibility of the channel to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] -\n   *          The visibility of the channel to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': serialize.map(_.get(opts, 'type'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a channel\n   *\n   * @function get\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext}\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.get = function get(sid) {\n    return new ChannelContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V1.ServiceContext.ChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ChannelListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelPage\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ChannelSolution} solution - Path solution\n *\n * @returns ChannelPage\n */\n/* jshint ignore:end */\nChannelPage = function ChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ChannelPage.prototype, Page.prototype);\nChannelPage.prototype.constructor = ChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelPage#\n *\n * @param {ChannelPayload} payload - Payload response from the API\n *\n * @returns ChannelInstance\n */\n/* jshint ignore:end */\nChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new ChannelInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} attributes -\n *          The JSON string that stores application-specific data\n * @property {channel.channel_type} type -\n *          The visibility of the channel. Can be: `public` or `private`\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} createdBy - The identity of the User that created the channel\n * @property {number} membersCount - The number of Members in the Channel\n * @property {number} messagesCount - The number of Messages in the Channel\n * @property {string} url - The absolute URL of the Channel resource\n * @property {string} links -\n *          Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel\n *\n * @param {V1} version - Version of the resource\n * @param {ChannelPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.membersCount = deserialize.integer(payload.members_count); // jshint ignore:line\n  this.messagesCount = deserialize.integer(payload.messages_count); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the members\n *\n * @function members\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.members = function members() {\n  return this._proxy.members;\n};\n\n/* jshint ignore:start */\n/**\n * Access the messages\n *\n * @function messages\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.messages = function messages() {\n  return this._proxy.messages;\n};\n\n/* jshint ignore:start */\n/**\n * Access the invites\n *\n * @function invites\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.invites = function invites() {\n  return this._proxy.invites;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.ChannelContext\n *\n * @property {Twilio.Chat.V1.ServiceContext.ChannelContext.MemberList} members -\n *          members resource\n * @property {Twilio.Chat.V1.ServiceContext.ChannelContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.Chat.V1.ServiceContext.ChannelContext.InviteList} invites -\n *          invites resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nChannelContext = function ChannelContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${sid}`;\n\n  // Dependents\n  this._members = undefined;\n  this._messages = undefined;\n  this._invites = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'Attributes': _.get(opts, 'attributes')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ChannelContext.prototype,\n  'members', {\n    get: function() {\n      if (!this._members) {\n        this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._members;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'messages', {\n    get: function() {\n      if (!this._messages) {\n        this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._messages;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'invites', {\n    get: function() {\n      if (!this._invites) {\n        this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._invites;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.ChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nChannelContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ChannelList: ChannelList,\n  ChannelPage: ChannelPage,\n  ChannelInstance: ChannelInstance,\n  ChannelContext: ChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RoleList;\nvar RolePage;\nvar RoleInstance;\nvar RoleContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleList\n *\n * @constructor Twilio.Chat.V1.ServiceContext.RoleList\n *\n * @param {Twilio.Chat.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nRoleList = function RoleList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function roles\n   * @memberof Twilio.Chat.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  function RoleListInstance(sid) {\n    return RoleListInstance.get(sid);\n  }\n\n  RoleListInstance._version = version;\n  // Path Solution\n  RoleListInstance._solution = {serviceSid: serviceSid};\n  RoleListInstance._uri = `/Services/${serviceSid}/Roles`;\n  /* jshint ignore:start */\n  /**\n   * create a RoleInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V1.ServiceContext.RoleList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the new resource\n   * @param {role.role_type} opts.type - The type of role\n   * @param {string|list} opts.permission - A permission the role should have\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RoleInstance\n   */\n  /* jshint ignore:end */\n  RoleListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n    if (_.isUndefined(opts['permission'])) {\n      throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoleInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams RoleInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V1.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RoleListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RoleInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V1.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V1.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V1.ServiceContext.RoleList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a role\n   *\n   * @function get\n   * @memberof Twilio.Chat.V1.ServiceContext.RoleList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  RoleListInstance.get = function get(sid) {\n    return new RoleContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V1.ServiceContext.RoleList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RoleListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RoleListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RoleListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RolePage\n *\n * @constructor Twilio.Chat.V1.ServiceContext.RolePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RoleSolution} solution - Path solution\n *\n * @returns RolePage\n */\n/* jshint ignore:end */\nRolePage = function RolePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RolePage.prototype, Page.prototype);\nRolePage.prototype.constructor = RolePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RoleInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V1.ServiceContext.RolePage#\n *\n * @param {RolePayload} payload - Payload response from the API\n *\n * @returns RoleInstance\n */\n/* jshint ignore:end */\nRolePage.prototype.getInstance = function getInstance(payload) {\n  return new RoleInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.RolePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRolePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRolePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.RoleInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {role.role_type} type - The type of role\n * @property {string} permissions -\n *          An array of the permissions the role has been granted\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Role resource\n *\n * @param {V1} version - Version of the resource\n * @param {RolePayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRoleInstance = function RoleInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.permissions = payload.permissions; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RoleInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.RoleInstance#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - A permission the role should have\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.RoleInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoleInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.RoleContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRoleContext = function RoleContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Roles/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.RoleContext#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - A permission the role should have\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['permission'])) {\n    throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.RoleContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRoleContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RoleList: RoleList,\n  RolePage: RolePage,\n  RoleInstance: RoleInstance,\n  RoleContext: RoleContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar UserChannelList;\nvar UserChannelPage;\nvar UserChannelInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelList\n *\n * @constructor Twilio.Chat.V1.ServiceContext.UserContext.UserChannelList\n *\n * @param {Twilio.Chat.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} userSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nUserChannelList = function UserChannelList(version, serviceSid, userSid) {\n  /* jshint ignore:start */\n  /**\n   * @function userChannels\n   * @memberof Twilio.Chat.V1.ServiceContext.UserContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.UserContext.UserChannelContext}\n   */\n  /* jshint ignore:end */\n  function UserChannelListInstance(sid) {\n    return UserChannelListInstance.get(sid);\n  }\n\n  UserChannelListInstance._version = version;\n  // Path Solution\n  UserChannelListInstance._solution = {serviceSid: serviceSid, userSid: userSid};\n  UserChannelListInstance._uri = `/Services/${serviceSid}/Users/${userSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * Streams UserChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserChannelListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelPage\n *\n * @constructor Twilio.Chat.V1.ServiceContext.UserContext.UserChannelPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserChannelSolution} solution - Path solution\n *\n * @returns UserChannelPage\n */\n/* jshint ignore:end */\nUserChannelPage = function UserChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserChannelPage.prototype, Page.prototype);\nUserChannelPage.prototype.constructor = UserChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V1.ServiceContext.UserContext.UserChannelPage#\n *\n * @param {UserChannelPayload} payload - Payload response from the API\n *\n * @returns UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new UserChannelInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.userSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.UserContext.UserChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserChannelPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.UserContext.UserChannelInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} channelSid - The SID of the Channel the resource belongs to\n * @property {string} memberSid - The SID of the User as a Member in the Channel\n * @property {user_channel.channel_status} status -\n *          The status of the User on the Channel\n * @property {number} lastConsumedMessageIndex -\n *          The index of the last Message in the Channel the Member has read\n * @property {number} unreadMessagesCount -\n *          The number of unread Messages in the Channel for the User\n * @property {string} links -\n *          Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel\n *\n * @param {V1} version - Version of the resource\n * @param {UserChannelPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} userSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nUserChannelInstance = function UserChannelInstance(version, payload, serviceSid,\n                                                    userSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.memberSid = payload.member_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line\n  this.unreadMessagesCount = deserialize.integer(payload.unread_messages_count); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, userSid: userSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.UserContext.UserChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserChannelList: UserChannelList,\n  UserChannelPage: UserChannelPage,\n  UserChannelInstance: UserChannelInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar UserChannelList = require('./user/userChannel').UserChannelList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UserList;\nvar UserPage;\nvar UserInstance;\nvar UserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserList\n *\n * @constructor Twilio.Chat.V1.ServiceContext.UserList\n *\n * @param {Twilio.Chat.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nUserList = function UserList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function users\n   * @memberof Twilio.Chat.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  function UserListInstance(sid) {\n    return UserListInstance.get(sid);\n  }\n\n  UserListInstance._version = version;\n  // Path Solution\n  UserListInstance._solution = {serviceSid: serviceSid};\n  UserListInstance._uri = `/Services/${serviceSid}/Users`;\n  /* jshint ignore:start */\n  /**\n   * create a UserInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V1.ServiceContext.UserList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity -\n   *          The `identity` value that identifies the new resource's User\n   * @param {string} [opts.roleSid] - The SID of the Role assigned to this user\n   * @param {string} [opts.attributes] -\n   *          A valid JSON string that contains application-specific data\n   * @param {string} [opts.friendlyName] - A string to describe the new resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed UserInstance\n   */\n  /* jshint ignore:end */\n  UserListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'RoleSid': _.get(opts, 'roleSid'),\n      'Attributes': _.get(opts, 'attributes'),\n      'FriendlyName': _.get(opts, 'friendlyName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams UserInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V1.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V1.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V1.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V1.ServiceContext.UserList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user\n   *\n   * @function get\n   * @memberof Twilio.Chat.V1.ServiceContext.UserList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  UserListInstance.get = function get(sid) {\n    return new UserContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V1.ServiceContext.UserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserPage\n *\n * @constructor Twilio.Chat.V1.ServiceContext.UserPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserSolution} solution - Path solution\n *\n * @returns UserPage\n */\n/* jshint ignore:end */\nUserPage = function UserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserPage.prototype, Page.prototype);\nUserPage.prototype.constructor = UserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V1.ServiceContext.UserPage#\n *\n * @param {UserPayload} payload - Payload response from the API\n *\n * @returns UserInstance\n */\n/* jshint ignore:end */\nUserPage.prototype.getInstance = function getInstance(payload) {\n  return new UserInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.UserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.UserInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} attributes -\n *          The JSON string that stores application-specific data\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} roleSid - The SID of the assigned to the user\n * @property {string} identity - The string that identifies the resource's User\n * @property {boolean} isOnline -\n *          Whether the User is actively connected to the Service instance and online\n * @property {boolean} isNotifiable -\n *          Whether the User has a potentially valid Push Notification registration for the Service instance\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {number} joinedChannelsCount -\n *          The number of Channels this User is a Member of\n * @property {string} links -\n *          The absolute URLs of the Channel and Binding resources related to the user\n * @property {string} url - The absolute URL of the User resource\n *\n * @param {V1} version - Version of the resource\n * @param {UserPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nUserInstance = function UserInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.isOnline = payload.is_online; // jshint ignore:line\n  this.isNotifiable = payload.is_notifiable; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.joinedChannelsCount = deserialize.integer(payload.joined_channels_count); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(UserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.UserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The SID id of the Role assigned to this user\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the userChannels\n *\n * @function userChannels\n * @memberof Twilio.Chat.V1.ServiceContext.UserInstance#\n *\n * @returns {Twilio.Chat.V1.ServiceContext.UserContext.UserChannelList}\n */\n/* jshint ignore:end */\nUserInstance.prototype.userChannels = function userChannels() {\n  return this._proxy.userChannels;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.UserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext.UserContext\n *\n * @property {Twilio.Chat.V1.ServiceContext.UserContext.UserChannelList} userChannels -\n *          userChannels resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nUserContext = function UserContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Users/${sid}`;\n\n  // Dependents\n  this._userChannels = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext.UserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The SID id of the Role assigned to this user\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'RoleSid': _.get(opts, 'roleSid'),\n    'Attributes': _.get(opts, 'attributes'),\n    'FriendlyName': _.get(opts, 'friendlyName')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(UserContext.prototype,\n  'userChannels', {\n    get: function() {\n      if (!this._userChannels) {\n        this._userChannels = new UserChannelList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._userChannels;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext.UserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserList: UserList,\n  UserPage: UserPage,\n  UserInstance: UserInstance,\n  UserContext: UserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ChannelList = require('./service/channel').ChannelList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar RoleList = require('./service/role').RoleList;\nvar UserList = require('./service/user').UserList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * @constructor Twilio.Chat.V1.ServiceList\n *\n * @param {Twilio.Chat.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Chat.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V1.ServiceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V1.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Chat.V1.ServiceList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Chat.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V1.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * @constructor Twilio.Chat.V1.ServicePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V1.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Chat.V1.ServiceInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} defaultServiceRoleSid -\n *          The service role assigned to users when they are added to the service\n * @property {string} defaultChannelRoleSid -\n *          The channel role assigned to users when they are added to a channel\n * @property {string} defaultChannelCreatorRoleSid -\n *          The channel role assigned to a channel creator when they join a new channel\n * @property {boolean} readStatusEnabled -\n *          Whether the Message Consumption Horizon feature is enabled\n * @property {boolean} reachabilityEnabled -\n *          Whether the Reachability Indicator feature is enabled for this Service instance\n * @property {number} typingIndicatorTimeout -\n *          How long in seconds to wait before assuming the user is no longer typing\n * @property {number} consumptionReportInterval - DEPRECATED\n * @property {object} limits -\n *          An object that describes the limits of the service instance\n * @property {object} webhooks -\n *          An object that contains information about the webhooks configured for this service\n * @property {string} preWebhookUrl - The webhook URL for pre-event webhooks\n * @property {string} postWebhookUrl - The URL for post-event webhooks\n * @property {string} webhookMethod -\n *          The HTTP method  to use for both PRE and POST webhooks\n * @property {string} webhookFilters -\n *          The list of WebHook events that are enabled for this Service instance\n * @property {object} notifications -\n *          The notification configuration for the Service instance\n * @property {string} url - The absolute URL of the Service resource\n * @property {string} links -\n *          The absolute URLs of the Service's Channels, Roles, and Users\n *\n * @param {V1} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.defaultServiceRoleSid = payload.default_service_role_sid; // jshint ignore:line\n  this.defaultChannelRoleSid = payload.default_channel_role_sid; // jshint ignore:line\n  this.defaultChannelCreatorRoleSid = payload.default_channel_creator_role_sid; // jshint ignore:line\n  this.readStatusEnabled = payload.read_status_enabled; // jshint ignore:line\n  this.reachabilityEnabled = payload.reachability_enabled; // jshint ignore:line\n  this.typingIndicatorTimeout = deserialize.integer(payload.typing_indicator_timeout); // jshint ignore:line\n  this.consumptionReportInterval = deserialize.integer(payload.consumption_report_interval); // jshint ignore:line\n  this.limits = payload.limits; // jshint ignore:line\n  this.webhooks = payload.webhooks; // jshint ignore:line\n  this.preWebhookUrl = payload.pre_webhook_url; // jshint ignore:line\n  this.postWebhookUrl = payload.post_webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.webhookFilters = payload.webhook_filters; // jshint ignore:line\n  this.notifications = payload.notifications; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.defaultServiceRoleSid] -\n *          The service role assigned to users when they are added to the service\n * @param {string} [opts.defaultChannelRoleSid] -\n *          The channel role assigned to users when they are added to a channel\n * @param {string} [opts.defaultChannelCreatorRoleSid] -\n *          The channel role assigned to a channel creator when they join a new channel\n * @param {boolean} [opts.readStatusEnabled] -\n *          Whether to enable the Message Consumption Horizon feature\n * @param {boolean} [opts.reachabilityEnabled] -\n *          Whether to enable the Reachability Indicator feature for this Service instance\n * @param {number} [opts.typingIndicatorTimeout] -\n *          How long in seconds to wait before assuming the user is no longer typing\n * @param {number} [opts.consumptionReportInterval] - DEPRECATED\n * @param {boolean} [opts.notifications.newMessage.enabled] -\n *          Whether to send a notification when a new message is added to a channel\n * @param {string} [opts.notifications.newMessage.template] -\n *          The template to use to create the notification text displayed when a new message is added to a channel\n * @param {boolean} [opts.notifications.addedToChannel.enabled] -\n *          Whether to send a notification when a member is added to a channel\n * @param {string} [opts.notifications.addedToChannel.template] -\n *          The template to use to create the notification text displayed when a member is added to a channel\n * @param {boolean} [opts.notifications.removedFromChannel.enabled] -\n *          Whether to send a notification to a user when they are removed from a channel\n * @param {string} [opts.notifications.removedFromChannel.template] -\n *          The template to use to create the notification text displayed to a user when they are removed\n * @param {boolean} [opts.notifications.invitedToChannel.enabled] -\n *          Whether to send a notification when a user is invited to a channel\n * @param {string} [opts.notifications.invitedToChannel.template] -\n *          The template to use to create the notification text displayed when a user is invited to a channel\n * @param {string} [opts.preWebhookUrl] - The webhook URL for pre-event webhooks\n * @param {string} [opts.postWebhookUrl] - The URL for post-event webhooks\n * @param {string} [opts.webhookMethod] -\n *          The HTTP method  to use for both PRE and POST webhooks\n * @param {string|list} [opts.webhookFilters] -\n *          The list of WebHook events that are enabled for this Service instance\n * @param {string} [opts.webhooks.onMessageSend.url] -\n *          The URL of the webhook to call in response to the on_message_send event\n * @param {string} [opts.webhooks.onMessageSend.method] -\n *          The HTTP method to use when calling the webhooks.on_message_send.url\n * @param {string} [opts.webhooks.onMessageUpdate.url] -\n *          The URL of the webhook to call in response to the on_message_update event\n * @param {string} [opts.webhooks.onMessageUpdate.method] -\n *          The HTTP method to use when calling the webhooks.on_message_update.url\n * @param {string} [opts.webhooks.onMessageRemove.url] -\n *          The URL of the webhook to call in response to the on_message_remove event\n * @param {string} [opts.webhooks.onMessageRemove.method] -\n *          The HTTP method to use when calling the webhooks.on_message_remove.url\n * @param {string} [opts.webhooks.onChannelAdd.url] -\n *          The URL of the webhook to call in response to the on_channel_add event\n * @param {string} [opts.webhooks.onChannelAdd.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_add.url\n * @param {string} [opts.webhooks.onChannelDestroy.url] -\n *          The URL of the webhook to call in response to the on_channel_destroy event\n * @param {string} [opts.webhooks.onChannelDestroy.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_destroy.url\n * @param {string} [opts.webhooks.onChannelUpdate.url] -\n *          The URL of the webhook to call in response to the on_channel_update event\n * @param {string} [opts.webhooks.onChannelUpdate.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_update.url\n * @param {string} [opts.webhooks.onMemberAdd.url] -\n *          The URL of the webhook to call in response to the on_member_add event\n * @param {string} [opts.webhooks.onMemberAdd.method] -\n *          The HTTP method to use when calling the webhooks.on_member_add.url\n * @param {string} [opts.webhooks.onMemberRemove.url] -\n *          The URL of the webhook to call in response to the on_member_remove event\n * @param {string} [opts.webhooks.onMemberRemove.method] -\n *          The HTTP method to use when calling the webhooks.on_member_remove.url\n * @param {string} [opts.webhooks.onMessageSent.url] -\n *          The URL of the webhook to call in response to the on_message_sent event\n * @param {string} [opts.webhooks.onMessageSent.method] -\n *          The URL of the webhook to call in response to the on_message_sent event\n * @param {string} [opts.webhooks.onMessageUpdated.url] -\n *          The URL of the webhook to call in response to the on_message_updated event\n * @param {string} [opts.webhooks.onMessageUpdated.method] -\n *          The HTTP method to use when calling the webhooks.on_message_updated.url\n * @param {string} [opts.webhooks.onMessageRemoved.url] -\n *          The URL of the webhook to call in response to the on_message_removed event\n * @param {string} [opts.webhooks.onMessageRemoved.method] -\n *          The HTTP method to use when calling the webhooks.on_message_removed.url\n * @param {string} [opts.webhooks.onChannelAdded.url] -\n *          The URL of the webhook to call in response to the on_channel_added event\n * @param {string} [opts.webhooks.onChannelAdded.method] -\n *          The URL of the webhook to call in response to the on_channel_added event\n * @param {string} [opts.webhooks.onChannelDestroyed.url] -\n *          The URL of the webhook to call in response to the on_channel_added event\n * @param {string} [opts.webhooks.onChannelDestroyed.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_destroyed.url\n * @param {string} [opts.webhooks.onChannelUpdated.url] -\n *          he URL of the webhook to call in response to the on_channel_updated event\n * @param {string} [opts.webhooks.onChannelUpdated.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_updated.url\n * @param {string} [opts.webhooks.onMemberAdded.url] -\n *          The URL of the webhook to call in response to the on_channel_updated event\n * @param {string} [opts.webhooks.onMemberAdded.method] -\n *          he HTTP method to use when calling the webhooks.on_channel_updated.url\n * @param {string} [opts.webhooks.onMemberRemoved.url] -\n *          The URL of the webhook to call in response to the on_member_removed event\n * @param {string} [opts.webhooks.onMemberRemoved.method] -\n *          The HTTP method to use when calling the webhooks.on_member_removed.url\n * @param {number} [opts.limits.channelMembers] -\n *          The maximum number of Members that can be added to Channels within this Service\n * @param {number} [opts.limits.userChannels] -\n *          The maximum number of Channels Users can be a Member of within this Service\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the channels\n *\n * @function channels\n * @memberof Twilio.Chat.V1.ServiceInstance#\n *\n * @returns {Twilio.Chat.V1.ServiceContext.ChannelList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.channels = function channels() {\n  return this._proxy.channels;\n};\n\n/* jshint ignore:start */\n/**\n * Access the roles\n *\n * @function roles\n * @memberof Twilio.Chat.V1.ServiceInstance#\n *\n * @returns {Twilio.Chat.V1.ServiceContext.RoleList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.roles = function roles() {\n  return this._proxy.roles;\n};\n\n/* jshint ignore:start */\n/**\n * Access the users\n *\n * @function users\n * @memberof Twilio.Chat.V1.ServiceInstance#\n *\n * @returns {Twilio.Chat.V1.ServiceContext.UserList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.users = function users() {\n  return this._proxy.users;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Chat.V1.ServiceContext\n *\n * @property {Twilio.Chat.V1.ServiceContext.ChannelList} channels -\n *          channels resource\n * @property {Twilio.Chat.V1.ServiceContext.RoleList} roles - roles resource\n * @property {Twilio.Chat.V1.ServiceContext.UserList} users - users resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._channels = undefined;\n  this._roles = undefined;\n  this._users = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Chat.V1.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.defaultServiceRoleSid] -\n *          The service role assigned to users when they are added to the service\n * @param {string} [opts.defaultChannelRoleSid] -\n *          The channel role assigned to users when they are added to a channel\n * @param {string} [opts.defaultChannelCreatorRoleSid] -\n *          The channel role assigned to a channel creator when they join a new channel\n * @param {boolean} [opts.readStatusEnabled] -\n *          Whether to enable the Message Consumption Horizon feature\n * @param {boolean} [opts.reachabilityEnabled] -\n *          Whether to enable the Reachability Indicator feature for this Service instance\n * @param {number} [opts.typingIndicatorTimeout] -\n *          How long in seconds to wait before assuming the user is no longer typing\n * @param {number} [opts.consumptionReportInterval] - DEPRECATED\n * @param {boolean} [opts.notifications.newMessage.enabled] -\n *          Whether to send a notification when a new message is added to a channel\n * @param {string} [opts.notifications.newMessage.template] -\n *          The template to use to create the notification text displayed when a new message is added to a channel\n * @param {boolean} [opts.notifications.addedToChannel.enabled] -\n *          Whether to send a notification when a member is added to a channel\n * @param {string} [opts.notifications.addedToChannel.template] -\n *          The template to use to create the notification text displayed when a member is added to a channel\n * @param {boolean} [opts.notifications.removedFromChannel.enabled] -\n *          Whether to send a notification to a user when they are removed from a channel\n * @param {string} [opts.notifications.removedFromChannel.template] -\n *          The template to use to create the notification text displayed to a user when they are removed\n * @param {boolean} [opts.notifications.invitedToChannel.enabled] -\n *          Whether to send a notification when a user is invited to a channel\n * @param {string} [opts.notifications.invitedToChannel.template] -\n *          The template to use to create the notification text displayed when a user is invited to a channel\n * @param {string} [opts.preWebhookUrl] - The webhook URL for pre-event webhooks\n * @param {string} [opts.postWebhookUrl] - The URL for post-event webhooks\n * @param {string} [opts.webhookMethod] -\n *          The HTTP method  to use for both PRE and POST webhooks\n * @param {string|list} [opts.webhookFilters] -\n *          The list of WebHook events that are enabled for this Service instance\n * @param {string} [opts.webhooks.onMessageSend.url] -\n *          The URL of the webhook to call in response to the on_message_send event\n * @param {string} [opts.webhooks.onMessageSend.method] -\n *          The HTTP method to use when calling the webhooks.on_message_send.url\n * @param {string} [opts.webhooks.onMessageUpdate.url] -\n *          The URL of the webhook to call in response to the on_message_update event\n * @param {string} [opts.webhooks.onMessageUpdate.method] -\n *          The HTTP method to use when calling the webhooks.on_message_update.url\n * @param {string} [opts.webhooks.onMessageRemove.url] -\n *          The URL of the webhook to call in response to the on_message_remove event\n * @param {string} [opts.webhooks.onMessageRemove.method] -\n *          The HTTP method to use when calling the webhooks.on_message_remove.url\n * @param {string} [opts.webhooks.onChannelAdd.url] -\n *          The URL of the webhook to call in response to the on_channel_add event\n * @param {string} [opts.webhooks.onChannelAdd.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_add.url\n * @param {string} [opts.webhooks.onChannelDestroy.url] -\n *          The URL of the webhook to call in response to the on_channel_destroy event\n * @param {string} [opts.webhooks.onChannelDestroy.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_destroy.url\n * @param {string} [opts.webhooks.onChannelUpdate.url] -\n *          The URL of the webhook to call in response to the on_channel_update event\n * @param {string} [opts.webhooks.onChannelUpdate.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_update.url\n * @param {string} [opts.webhooks.onMemberAdd.url] -\n *          The URL of the webhook to call in response to the on_member_add event\n * @param {string} [opts.webhooks.onMemberAdd.method] -\n *          The HTTP method to use when calling the webhooks.on_member_add.url\n * @param {string} [opts.webhooks.onMemberRemove.url] -\n *          The URL of the webhook to call in response to the on_member_remove event\n * @param {string} [opts.webhooks.onMemberRemove.method] -\n *          The HTTP method to use when calling the webhooks.on_member_remove.url\n * @param {string} [opts.webhooks.onMessageSent.url] -\n *          The URL of the webhook to call in response to the on_message_sent event\n * @param {string} [opts.webhooks.onMessageSent.method] -\n *          The URL of the webhook to call in response to the on_message_sent event\n * @param {string} [opts.webhooks.onMessageUpdated.url] -\n *          The URL of the webhook to call in response to the on_message_updated event\n * @param {string} [opts.webhooks.onMessageUpdated.method] -\n *          The HTTP method to use when calling the webhooks.on_message_updated.url\n * @param {string} [opts.webhooks.onMessageRemoved.url] -\n *          The URL of the webhook to call in response to the on_message_removed event\n * @param {string} [opts.webhooks.onMessageRemoved.method] -\n *          The HTTP method to use when calling the webhooks.on_message_removed.url\n * @param {string} [opts.webhooks.onChannelAdded.url] -\n *          The URL of the webhook to call in response to the on_channel_added event\n * @param {string} [opts.webhooks.onChannelAdded.method] -\n *          The URL of the webhook to call in response to the on_channel_added event\n * @param {string} [opts.webhooks.onChannelDestroyed.url] -\n *          The URL of the webhook to call in response to the on_channel_added event\n * @param {string} [opts.webhooks.onChannelDestroyed.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_destroyed.url\n * @param {string} [opts.webhooks.onChannelUpdated.url] -\n *          he URL of the webhook to call in response to the on_channel_updated event\n * @param {string} [opts.webhooks.onChannelUpdated.method] -\n *          The HTTP method to use when calling the webhooks.on_channel_updated.url\n * @param {string} [opts.webhooks.onMemberAdded.url] -\n *          The URL of the webhook to call in response to the on_channel_updated event\n * @param {string} [opts.webhooks.onMemberAdded.method] -\n *          he HTTP method to use when calling the webhooks.on_channel_updated.url\n * @param {string} [opts.webhooks.onMemberRemoved.url] -\n *          The URL of the webhook to call in response to the on_member_removed event\n * @param {string} [opts.webhooks.onMemberRemoved.method] -\n *          The HTTP method to use when calling the webhooks.on_member_removed.url\n * @param {number} [opts.limits.channelMembers] -\n *          The maximum number of Members that can be added to Channels within this Service\n * @param {number} [opts.limits.userChannels] -\n *          The maximum number of Channels Users can be a Member of within this Service\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DefaultServiceRoleSid': _.get(opts, 'defaultServiceRoleSid'),\n    'DefaultChannelRoleSid': _.get(opts, 'defaultChannelRoleSid'),\n    'DefaultChannelCreatorRoleSid': _.get(opts, 'defaultChannelCreatorRoleSid'),\n    'ReadStatusEnabled': serialize.bool(_.get(opts, 'readStatusEnabled')),\n    'ReachabilityEnabled': serialize.bool(_.get(opts, 'reachabilityEnabled')),\n    'TypingIndicatorTimeout': _.get(opts, 'typingIndicatorTimeout'),\n    'ConsumptionReportInterval': _.get(opts, 'consumptionReportInterval'),\n    'Notifications.NewMessage.Enabled': serialize.bool(_.get(opts, 'notifications.newMessage.enabled')),\n    'Notifications.NewMessage.Template': _.get(opts, 'notifications.newMessage.template'),\n    'Notifications.AddedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.addedToChannel.enabled')),\n    'Notifications.AddedToChannel.Template': _.get(opts, 'notifications.addedToChannel.template'),\n    'Notifications.RemovedFromChannel.Enabled': serialize.bool(_.get(opts, 'notifications.removedFromChannel.enabled')),\n    'Notifications.RemovedFromChannel.Template': _.get(opts, 'notifications.removedFromChannel.template'),\n    'Notifications.InvitedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.invitedToChannel.enabled')),\n    'Notifications.InvitedToChannel.Template': _.get(opts, 'notifications.invitedToChannel.template'),\n    'PreWebhookUrl': _.get(opts, 'preWebhookUrl'),\n    'PostWebhookUrl': _.get(opts, 'postWebhookUrl'),\n    'WebhookMethod': _.get(opts, 'webhookMethod'),\n    'WebhookFilters': serialize.map(_.get(opts, 'webhookFilters'), function(e) { return e; }),\n    'Webhooks.OnMessageSend.Url': _.get(opts, 'webhooks.onMessageSend.url'),\n    'Webhooks.OnMessageSend.Method': _.get(opts, 'webhooks.onMessageSend.method'),\n    'Webhooks.OnMessageUpdate.Url': _.get(opts, 'webhooks.onMessageUpdate.url'),\n    'Webhooks.OnMessageUpdate.Method': _.get(opts, 'webhooks.onMessageUpdate.method'),\n    'Webhooks.OnMessageRemove.Url': _.get(opts, 'webhooks.onMessageRemove.url'),\n    'Webhooks.OnMessageRemove.Method': _.get(opts, 'webhooks.onMessageRemove.method'),\n    'Webhooks.OnChannelAdd.Url': _.get(opts, 'webhooks.onChannelAdd.url'),\n    'Webhooks.OnChannelAdd.Method': _.get(opts, 'webhooks.onChannelAdd.method'),\n    'Webhooks.OnChannelDestroy.Url': _.get(opts, 'webhooks.onChannelDestroy.url'),\n    'Webhooks.OnChannelDestroy.Method': _.get(opts, 'webhooks.onChannelDestroy.method'),\n    'Webhooks.OnChannelUpdate.Url': _.get(opts, 'webhooks.onChannelUpdate.url'),\n    'Webhooks.OnChannelUpdate.Method': _.get(opts, 'webhooks.onChannelUpdate.method'),\n    'Webhooks.OnMemberAdd.Url': _.get(opts, 'webhooks.onMemberAdd.url'),\n    'Webhooks.OnMemberAdd.Method': _.get(opts, 'webhooks.onMemberAdd.method'),\n    'Webhooks.OnMemberRemove.Url': _.get(opts, 'webhooks.onMemberRemove.url'),\n    'Webhooks.OnMemberRemove.Method': _.get(opts, 'webhooks.onMemberRemove.method'),\n    'Webhooks.OnMessageSent.Url': _.get(opts, 'webhooks.onMessageSent.url'),\n    'Webhooks.OnMessageSent.Method': _.get(opts, 'webhooks.onMessageSent.method'),\n    'Webhooks.OnMessageUpdated.Url': _.get(opts, 'webhooks.onMessageUpdated.url'),\n    'Webhooks.OnMessageUpdated.Method': _.get(opts, 'webhooks.onMessageUpdated.method'),\n    'Webhooks.OnMessageRemoved.Url': _.get(opts, 'webhooks.onMessageRemoved.url'),\n    'Webhooks.OnMessageRemoved.Method': _.get(opts, 'webhooks.onMessageRemoved.method'),\n    'Webhooks.OnChannelAdded.Url': _.get(opts, 'webhooks.onChannelAdded.url'),\n    'Webhooks.OnChannelAdded.Method': _.get(opts, 'webhooks.onChannelAdded.method'),\n    'Webhooks.OnChannelDestroyed.Url': _.get(opts, 'webhooks.onChannelDestroyed.url'),\n    'Webhooks.OnChannelDestroyed.Method': _.get(opts, 'webhooks.onChannelDestroyed.method'),\n    'Webhooks.OnChannelUpdated.Url': _.get(opts, 'webhooks.onChannelUpdated.url'),\n    'Webhooks.OnChannelUpdated.Method': _.get(opts, 'webhooks.onChannelUpdated.method'),\n    'Webhooks.OnMemberAdded.Url': _.get(opts, 'webhooks.onMemberAdded.url'),\n    'Webhooks.OnMemberAdded.Method': _.get(opts, 'webhooks.onMemberAdded.method'),\n    'Webhooks.OnMemberRemoved.Url': _.get(opts, 'webhooks.onMemberRemoved.url'),\n    'Webhooks.OnMemberRemoved.Method': _.get(opts, 'webhooks.onMemberRemoved.method'),\n    'Limits.ChannelMembers': _.get(opts, 'limits.channelMembers'),\n    'Limits.UserChannels': _.get(opts, 'limits.userChannels')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'channels', {\n    get: function() {\n      if (!this._channels) {\n        this._channels = new ChannelList(this._version, this._solution.sid);\n      }\n      return this._channels;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'roles', {\n    get: function() {\n      if (!this._roles) {\n        this._roles = new RoleList(this._version, this._solution.sid);\n      }\n      return this._roles;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'users', {\n    get: function() {\n      if (!this._users) {\n        this._users = new UserList(this._version, this._solution.sid);\n      }\n      return this._users;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V1.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CredentialList = require('./v1/credential').CredentialList;\nvar ServiceList = require('./v1/service').ServiceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Chat\n *\n * @constructor Twilio.Chat.V1\n *\n * @property {Twilio.Chat.V1.CredentialList} credentials - credentials resource\n * @property {Twilio.Chat.V1.ServiceList} services - services resource\n *\n * @param {Twilio.Chat} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._credentials = undefined;\n  this._services = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'credentials', {\n    get: function() {\n      this._credentials = this._credentials || new CredentialList(this);\n      return this._credentials;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CredentialList;\nvar CredentialPage;\nvar CredentialInstance;\nvar CredentialContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialList\n *\n * @constructor Twilio.Chat.V2.CredentialList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nCredentialList = function CredentialList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function credentials\n   * @memberof Twilio.Chat.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.CredentialContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListInstance(sid) {\n    return CredentialListInstance.get(sid);\n  }\n\n  CredentialListInstance._version = version;\n  // Path Solution\n  CredentialListInstance._solution = {};\n  CredentialListInstance._uri = `/Credentials`;\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.CredentialList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CredentialInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V2.CredentialList#\n   *\n   * @param {object} opts - Options for request\n   * @param {credential.push_service} opts.type -\n   *          The type of push-notification service the credential is for\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.certificate] -\n   *          [APN only] The URL encoded representation of the certificate\n   * @param {string} [opts.privateKey] -\n   *          [APN only] The URL encoded representation of the private key\n   * @param {boolean} [opts.sandbox] -\n   *          [APN only] Whether to send the credential to sandbox APNs\n   * @param {string} [opts.apiKey] -\n   *          [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential\n   * @param {string} [opts.secret] -\n   *          [FCM only] The Server key of your project from Firebase console\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialInstance\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Certificate': _.get(opts, 'certificate'),\n      'PrivateKey': _.get(opts, 'privateKey'),\n      'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n      'ApiKey': _.get(opts, 'apiKey'),\n      'Secret': _.get(opts, 'secret')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.CredentialList#\n   *\n   * @param {string} sid - The SID of the Credential resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.CredentialContext}\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.get = function get(sid) {\n    return new CredentialContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.CredentialList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialPage\n *\n * @constructor Twilio.Chat.V2.CredentialPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialSolution} solution - Path solution\n *\n * @returns CredentialPage\n */\n/* jshint ignore:end */\nCredentialPage = function CredentialPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialPage.prototype, Page.prototype);\nCredentialPage.prototype.constructor = CredentialPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.CredentialPage#\n *\n * @param {CredentialPayload} payload - Payload response from the API\n *\n * @returns CredentialInstance\n */\n/* jshint ignore:end */\nCredentialPage.prototype.getInstance = function getInstance(payload) {\n  return new CredentialInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.CredentialPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.Chat.V2.CredentialInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {credential.push_service} type -\n *          The type of push-notification service the credential is for\n * @property {string} sandbox -\n *          [APN only] Whether to send the credential to sandbox APNs\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Credential resource\n *\n * @param {V2} version - Version of the resource\n * @param {CredentialPayload} payload - The instance payload\n * @param {sid} sid - The SID of the Credential resource to fetch\n */\n/* jshint ignore:end */\nCredentialInstance = function CredentialInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.sandbox = payload.sandbox; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CredentialInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.CredentialInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.certificate] -\n *          [APN only] The URL encoded representation of the certificate\n * @param {string} [opts.privateKey] -\n *          [APN only] The URL encoded representation of the private key\n * @param {boolean} [opts.sandbox] -\n *          [APN only] Whether to send the credential to sandbox APNs\n * @param {string} [opts.apiKey] -\n *          [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential\n * @param {string} [opts.secret] -\n *          [FCM only] The Server key of your project from Firebase console\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.CredentialInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.Chat.V2.CredentialContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The SID of the Credential resource to fetch\n */\n/* jshint ignore:end */\nCredentialContext = function CredentialContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Credentials/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.CredentialContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.certificate] -\n *          [APN only] The URL encoded representation of the certificate\n * @param {string} [opts.privateKey] -\n *          [APN only] The URL encoded representation of the private key\n * @param {boolean} [opts.sandbox] -\n *          [APN only] Whether to send the credential to sandbox APNs\n * @param {string} [opts.apiKey] -\n *          [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential\n * @param {string} [opts.secret] -\n *          [FCM only] The Server key of your project from Firebase console\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Certificate': _.get(opts, 'certificate'),\n    'PrivateKey': _.get(opts, 'privateKey'),\n    'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n    'ApiKey': _.get(opts, 'apiKey'),\n    'Secret': _.get(opts, 'secret')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.CredentialContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialList: CredentialList,\n  CredentialPage: CredentialPage,\n  CredentialInstance: CredentialInstance,\n  CredentialContext: CredentialContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BindingList;\nvar BindingPage;\nvar BindingInstance;\nvar BindingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.BindingList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Binding resource is associated with\n */\n/* jshint ignore:end */\nBindingList = function BindingList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function bindings\n   * @memberof Twilio.Chat.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.BindingContext}\n   */\n  /* jshint ignore:end */\n  function BindingListInstance(sid) {\n    return BindingListInstance.get(sid);\n  }\n\n  BindingListInstance._version = version;\n  // Path Solution\n  BindingListInstance._solution = {serviceSid: serviceSid};\n  BindingListInstance._uri = `/Services/${serviceSid}/Bindings`;\n  /* jshint ignore:start */\n  /**\n   * Streams BindingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {binding.binding_type|list} [opts.bindingType] -\n   *          The push technology used by the Binding resources to read\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BindingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BindingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {binding.binding_type|list} [opts.bindingType] -\n   *          The push technology used by the Binding resources to read\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {binding.binding_type|list} [opts.bindingType] -\n   *          The push technology used by the Binding resources to read\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'BindingType': serialize.map(_.get(opts, 'bindingType'), function(e) { return e; }),\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.BindingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a binding\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.BindingList#\n   *\n   * @param {string} sid - The SID of the resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.BindingContext}\n   */\n  /* jshint ignore:end */\n  BindingListInstance.get = function get(sid) {\n    return new BindingContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.BindingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BindingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BindingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BindingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingPage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.BindingPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BindingSolution} solution - Path solution\n *\n * @returns BindingPage\n */\n/* jshint ignore:end */\nBindingPage = function BindingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BindingPage.prototype, Page.prototype);\nBindingPage.prototype.constructor = BindingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BindingInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.BindingPage#\n *\n * @param {BindingPayload} payload - Payload response from the API\n *\n * @returns BindingInstance\n */\n/* jshint ignore:end */\nBindingPage.prototype.getInstance = function getInstance(payload) {\n  return new BindingInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.BindingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBindingPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.BindingInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Binding resource is associated with\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} endpoint - The unique endpoint identifier for the Binding\n * @property {string} identity - The string that identifies the resource's User\n * @property {string} credentialSid - The SID of the Credential for the binding\n * @property {binding.binding_type} bindingType -\n *          The push technology to use for the binding\n * @property {string} messageTypes -\n *          The Programmable Chat message types the binding is subscribed to\n * @property {string} url - The absolute URL of the Binding resource\n * @property {string} links - The absolute URLs of the Binding's User\n *\n * @param {V2} version - Version of the resource\n * @param {BindingPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Binding resource is associated with\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nBindingInstance = function BindingInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.endpoint = payload.endpoint; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.credentialSid = payload.credential_sid; // jshint ignore:line\n  this.bindingType = payload.binding_type; // jshint ignore:line\n  this.messageTypes = payload.message_types; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(BindingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BindingContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BindingInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.BindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a BindingInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.BindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.BindingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBindingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.BindingContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nBindingContext = function BindingContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Bindings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BindingInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.BindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BindingInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a BindingInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.BindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.BindingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBindingContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BindingList: BindingList,\n  BindingPage: BindingPage,\n  BindingInstance: BindingInstance,\n  BindingContext: BindingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar InviteList;\nvar InvitePage;\nvar InviteInstance;\nvar InviteContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} channelSid - The SID of the Channel the new resource belongs to\n */\n/* jshint ignore:end */\nInviteList = function InviteList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function invites\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.InviteContext}\n   */\n  /* jshint ignore:end */\n  function InviteListInstance(sid) {\n    return InviteListInstance.get(sid);\n  }\n\n  InviteListInstance._version = version;\n  // Path Solution\n  InviteListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  InviteListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Invites`;\n  /* jshint ignore:start */\n  /**\n   * create a InviteInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity -\n   *          The `identity` value that identifies the new resource's User\n   * @param {string} [opts.roleSid] - The Role assigned to the new member\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed InviteInstance\n   */\n  /* jshint ignore:end */\n  InviteListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Identity': _.get(opts, 'identity'), 'RoleSid': _.get(opts, 'roleSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InviteInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams InviteInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InviteListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InviteInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InviteInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InviteInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a invite\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {string} sid - The SID of the Invite resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.InviteContext}\n   */\n  /* jshint ignore:end */\n  InviteListInstance.get = function get(sid) {\n    return new InviteContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InviteListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InviteListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InviteListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InvitePage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.InvitePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InviteSolution} solution - Path solution\n *\n * @returns InvitePage\n */\n/* jshint ignore:end */\nInvitePage = function InvitePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InvitePage.prototype, Page.prototype);\nInvitePage.prototype.constructor = InvitePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InviteInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InvitePage#\n *\n * @param {InvitePayload} payload - Payload response from the API\n *\n * @returns InviteInstance\n */\n/* jshint ignore:end */\nInvitePage.prototype.getInstance = function getInstance(payload) {\n  return new InviteInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InvitePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInvitePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInvitePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.InviteInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} channelSid -\n *          The SID of the Channel the new resource belongs to\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} identity - The string that identifies the resource's User\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} roleSid - The SID of the Role assigned to the member\n * @property {string} createdBy - The identity of the User that created the invite\n * @property {string} url - The absolute URL of the Invite resource\n *\n * @param {V2} version - Version of the resource\n * @param {InvitePayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} channelSid - The SID of the Channel the new resource belongs to\n * @param {sid} sid - The SID of the Invite resource to fetch\n */\n/* jshint ignore:end */\nInviteInstance = function InviteInstance(version, payload, serviceSid,\n                                          channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(InviteInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InviteContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a InviteInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a InviteInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInviteInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInviteInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.InviteContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} channelSid -\n *          The SID of the Channel the resource to fetch belongs to\n * @param {sid} sid - The SID of the Invite resource to fetch\n */\n/* jshint ignore:end */\nInviteContext = function InviteContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Invites/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InviteInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InviteInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a InviteInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.InviteContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInviteContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInviteContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InviteList: InviteList,\n  InvitePage: InvitePage,\n  InviteInstance: InviteInstance,\n  InviteContext: InviteContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MemberList;\nvar MemberPage;\nvar MemberInstance;\nvar MemberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} channelSid - The SID of the Channel for the member\n */\n/* jshint ignore:end */\nMemberList = function MemberList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function members\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  function MemberListInstance(sid) {\n    return MemberListInstance.get(sid);\n  }\n\n  MemberListInstance._version = version;\n  // Path Solution\n  MemberListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  MemberListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Members`;\n  /* jshint ignore:start */\n  /**\n   * create a MemberInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity -\n   *          The `identity` value that identifies the new resource's User\n   * @param {string} [opts.roleSid] - The SID of the Role to assign to the member\n   * @param {number} [opts.lastConsumedMessageIndex] -\n   *          The index of the last Message in the Channel the Member has read\n   * @param {Date} [opts.lastConsumptionTimestamp] -\n   *          The ISO 8601 based timestamp string representing the datetime of the last Message read event for the member within the Channel\n   * @param {Date} [opts.dateCreated] -\n   *          The ISO 8601 date and time in GMT when the resource was created\n   * @param {Date} [opts.dateUpdated] -\n   *          The ISO 8601 date and time in GMT when the resource was updated\n   * @param {string} [opts.attributes] -\n   *          A valid JSON string that contains application-specific data\n   * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MemberInstance\n   */\n  /* jshint ignore:end */\n  MemberListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'RoleSid': _.get(opts, 'roleSid'),\n      'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),\n      'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp')),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'Attributes': _.get(opts, 'attributes')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MemberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MemberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MemberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a member\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {string} sid - The SID of the Member resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  MemberListInstance.get = function get(sid) {\n    return new MemberContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MemberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MemberListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MemberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberPage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.MemberPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MemberSolution} solution - Path solution\n *\n * @returns MemberPage\n */\n/* jshint ignore:end */\nMemberPage = function MemberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MemberPage.prototype, Page.prototype);\nMemberPage.prototype.constructor = MemberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MemberInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberPage#\n *\n * @param {MemberPayload} payload - Payload response from the API\n *\n * @returns MemberInstance\n */\n/* jshint ignore:end */\nMemberPage.prototype.getInstance = function getInstance(payload) {\n  return new MemberInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.MemberInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} channelSid - The SID of the Channel for the member\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} identity - The string that identifies the resource's User\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} roleSid - The SID of the Role assigned to the member\n * @property {number} lastConsumedMessageIndex -\n *          The index of the last Message that the Member has read within the Channel\n * @property {Date} lastConsumptionTimestamp -\n *          The ISO 8601 based timestamp string that represents the datetime of the last Message read event for the Member within the Channel\n * @property {string} url - The absolute URL of the Member resource\n * @property {string} attributes -\n *          The JSON string that stores application-specific data\n *\n * @param {V2} version - Version of the resource\n * @param {MemberPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} channelSid - The SID of the Channel for the member\n * @param {sid_like} sid - The SID of the Member resource to fetch\n */\n/* jshint ignore:end */\nMemberInstance = function MemberInstance(version, payload, serviceSid,\n                                          channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line\n  this.lastConsumptionTimestamp = deserialize.iso8601DateTime(payload.last_consumption_timestamp); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MemberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MemberContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MemberInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The SID of the Role to assign to the member\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The index of the last consumed Message for the Channel for the Member\n * @param {Date} [opts.lastConsumptionTimestamp] -\n *          The ISO 8601 based timestamp string representing the datetime of the last Message read event for the Member within the Channel\n * @param {Date} [opts.dateCreated] -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @param {Date} [opts.dateUpdated] -\n *          The ISO 8601 date and time in GMT when the resource was updated\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.MemberContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} channelSid - The SID of the channel the member belongs to\n * @param {sid_like} sid - The SID of the Member resource to fetch\n */\n/* jshint ignore:end */\nMemberContext = function MemberContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Members/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MemberInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The SID of the Role to assign to the member\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The index of the last consumed Message for the Channel for the Member\n * @param {Date} [opts.lastConsumptionTimestamp] -\n *          The ISO 8601 based timestamp string representing the datetime of the last Message read event for the Member within the Channel\n * @param {Date} [opts.dateCreated] -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @param {Date} [opts.dateUpdated] -\n *          The ISO 8601 date and time in GMT when the resource was updated\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'RoleSid': _.get(opts, 'roleSid'),\n    'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),\n    'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp')),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'Attributes': _.get(opts, 'attributes')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MemberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMemberContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MemberList: MemberList,\n  MemberPage: MemberPage,\n  MemberInstance: MemberInstance,\n  MemberContext: MemberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MessageList;\nvar MessagePage;\nvar MessageInstance;\nvar MessageContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} channelSid -\n *          The SID of the Channel the Message resource belongs to\n */\n/* jshint ignore:end */\nMessageList = function MessageList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function messages\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  function MessageListInstance(sid) {\n    return MessageListInstance.get(sid);\n  }\n\n  MessageListInstance._version = version;\n  // Path Solution\n  MessageListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  MessageListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Messages`;\n  /* jshint ignore:start */\n  /**\n   * create a MessageInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.from] - The Identity of the new message's author\n   * @param {string} [opts.attributes] -\n   *          A valid JSON string that contains application-specific data\n   * @param {Date} [opts.dateCreated] -\n   *          The ISO 8601 date and time in GMT when the resource was created\n   * @param {Date} [opts.dateUpdated] -\n   *          The ISO 8601 date and time in GMT when the resource was updated\n   * @param {string} [opts.lastUpdatedBy] -\n   *          The Identity of the User who last updated the Message\n   * @param {string} [opts.body] - The message to send to the channel\n   * @param {string} [opts.mediaSid] -\n   *         The Media Sid to be attached to the new Message\n   * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MessageInstance\n   */\n  /* jshint ignore:end */\n  MessageListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'From': _.get(opts, 'from'),\n      'Attributes': _.get(opts, 'attributes'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'LastUpdatedBy': _.get(opts, 'lastUpdatedBy'),\n      'Body': _.get(opts, 'body'),\n      'MediaSid': _.get(opts, 'mediaSid')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MessageInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MessageListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MessageInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a message\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {string} sid - The SID of the Message resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  MessageListInstance.get = function get(sid) {\n    return new MessageContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessageListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessageListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagePage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.MessagePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessageSolution} solution - Path solution\n *\n * @returns MessagePage\n */\n/* jshint ignore:end */\nMessagePage = function MessagePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessagePage.prototype, Page.prototype);\nMessagePage.prototype.constructor = MessagePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessageInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessagePage#\n *\n * @param {MessagePayload} payload - Payload response from the API\n *\n * @returns MessageInstance\n */\n/* jshint ignore:end */\nMessagePage.prototype.getInstance = function getInstance(payload) {\n  return new MessageInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessagePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.MessageInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} attributes -\n *          The JSON string that stores application-specific data\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} to - The SID of the Channel that the message was sent to\n * @property {string} channelSid -\n *          The SID of the Channel the Message resource belongs to\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} lastUpdatedBy -\n *          The Identity of the User who last updated the Message\n * @property {boolean} wasEdited -\n *          Whether the message has been edited since  it was created\n * @property {string} from - The Identity of the message's author\n * @property {string} body - The content of the message\n * @property {number} index - The index of the message within the Channel\n * @property {string} type - The Message type\n * @property {object} media -\n *          A Media object that describes the Message's media if attached; otherwise, null\n * @property {string} url - The absolute URL of the Message resource\n *\n * @param {V2} version - Version of the resource\n * @param {MessagePayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} channelSid - The SID of the Channel the Message resource belongs to\n * @param {sid} sid - The SID of the Message resource to fetch\n */\n/* jshint ignore:end */\nMessageInstance = function MessageInstance(version, payload, serviceSid,\n                                            channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.lastUpdatedBy = payload.last_updated_by; // jshint ignore:line\n  this.wasEdited = payload.was_edited; // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.body = payload.body; // jshint ignore:line\n  this.index = deserialize.integer(payload.index); // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.media = payload.media; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MessageInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MessageContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The message to send to the channel\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {Date} [opts.dateCreated] -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @param {Date} [opts.dateUpdated] -\n *          The ISO 8601 date and time in GMT when the resource was updated\n * @param {string} [opts.lastUpdatedBy] -\n *          The Identity of the User who last updated the Message, if applicable\n * @param {string} [opts.from] - The Identity of the message's author\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessageInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.MessageContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} channelSid -\n *          The SID of the Channel the message to fetch belongs to\n * @param {sid} sid - The SID of the Message resource to fetch\n */\n/* jshint ignore:end */\nMessageContext = function MessageContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Messages/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The message to send to the channel\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {Date} [opts.dateCreated] -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @param {Date} [opts.dateUpdated] -\n *          The ISO 8601 date and time in GMT when the resource was updated\n * @param {string} [opts.lastUpdatedBy] -\n *          The Identity of the User who last updated the Message, if applicable\n * @param {string} [opts.from] - The Identity of the message's author\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Body': _.get(opts, 'body'),\n    'Attributes': _.get(opts, 'attributes'),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'LastUpdatedBy': _.get(opts, 'lastUpdatedBy'),\n    'From': _.get(opts, 'from')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.MessageContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMessageContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessageList: MessageList,\n  MessagePage: MessagePage,\n  MessageInstance: MessageInstance,\n  MessageContext: MessageContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WebhookList;\nvar WebhookPage;\nvar WebhookInstance;\nvar WebhookContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Channel Webhook resource is associated with\n * @param {string} channelSid -\n *          The SID of the Channel the Channel Webhook resource belongs to\n */\n/* jshint ignore:end */\nWebhookList = function WebhookList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function webhooks\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  function WebhookListInstance(sid) {\n    return WebhookListInstance.get(sid);\n  }\n\n  WebhookListInstance._version = version;\n  // Path Solution\n  WebhookListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  WebhookListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Webhooks`;\n  /* jshint ignore:start */\n  /**\n   * Streams WebhookInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WebhookInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a WebhookInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {object} opts - Options for request\n   * @param {webhook.type} opts.type - The type of webhook\n   * @param {string} [opts.configuration.url] - The URL of the webhook to call\n   * @param {webhook.method} [opts.configuration.method] -\n   *          The HTTP method used to call `configuration.url`\n   * @param {string|list} [opts.configuration.filters] -\n   *          The events that cause us to call the Channel Webhook\n   * @param {string|list} [opts.configuration.triggers] -\n   *          A string that will cause us to call the webhook when it is found in a message body\n   * @param {string} [opts.configuration.flowSid] -\n   *          The SID of the Studio Flow to call when an event occurs\n   * @param {number} [opts.configuration.retryCount] -\n   *          The number of times to retry the webhook if the first attempt fails\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WebhookInstance\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'Configuration.Url': _.get(opts, 'configuration.url'),\n      'Configuration.Method': _.get(opts, 'configuration.method'),\n      'Configuration.Filters': serialize.map(_.get(opts, 'configuration.filters'), function(e) { return e; }),\n      'Configuration.Triggers': serialize.map(_.get(opts, 'configuration.triggers'), function(e) { return e; }),\n      'Configuration.FlowSid': _.get(opts, 'configuration.flowSid'),\n      'Configuration.RetryCount': _.get(opts, 'configuration.retryCount')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a webhook\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {string} sid - The SID of the Channel Webhook resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.get = function get(sid) {\n    return new WebhookContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WebhookListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WebhookListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookPage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WebhookSolution} solution - Path solution\n *\n * @returns WebhookPage\n */\n/* jshint ignore:end */\nWebhookPage = function WebhookPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WebhookPage.prototype, Page.prototype);\nWebhookPage.prototype.constructor = WebhookPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WebhookInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookPage#\n *\n * @param {WebhookPayload} payload - Payload response from the API\n *\n * @returns WebhookInstance\n */\n/* jshint ignore:end */\nWebhookPage.prototype.getInstance = function getInstance(payload) {\n  return new WebhookInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Channel Webhook resource is associated with\n * @property {string} channelSid -\n *          The SID of the Channel the Channel Webhook resource belongs to\n * @property {string} type - The type of webhook\n * @property {string} url - The absolute URL of the Channel Webhook resource\n * @property {object} configuration -\n *          The JSON string that describes the configuration object for the channel webhook\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n *\n * @param {V2} version - Version of the resource\n * @param {WebhookPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Channel Webhook resource is associated with\n * @param {sid} channelSid -\n *          The SID of the Channel the Channel Webhook resource belongs to\n * @param {sid} sid - The SID of the Channel Webhook resource to fetch\n */\n/* jshint ignore:end */\nWebhookInstance = function WebhookInstance(version, payload, serviceSid,\n                                            channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.configuration = payload.configuration; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(WebhookInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WebhookContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.configuration.url] - The URL of the webhook to call\n * @param {webhook.method} [opts.configuration.method] -\n *          The HTTP method used to call `configuration.url`\n * @param {string|list} [opts.configuration.filters] -\n *          The events that cause us to call the Channel Webhook\n * @param {string|list} [opts.configuration.triggers] -\n *          A string that will cause us to call the webhook when it is found in a message body\n * @param {string} [opts.configuration.flowSid] -\n *          The SID of the Studio Flow to call when an event occurs\n * @param {number} [opts.configuration.retryCount] -\n *          The number of times to retry the webhook if the first attempt fails\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid -\n *          The SID of the Service with the Channel to fetch the Webhook resource from\n * @param {sid_like} channelSid -\n *          The SID of the Channel the resource to fetch belongs to\n * @param {sid} sid - The SID of the Channel Webhook resource to fetch\n */\n/* jshint ignore:end */\nWebhookContext = function WebhookContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Webhooks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.configuration.url] - The URL of the webhook to call\n * @param {webhook.method} [opts.configuration.method] -\n *          The HTTP method used to call `configuration.url`\n * @param {string|list} [opts.configuration.filters] -\n *          The events that cause us to call the Channel Webhook\n * @param {string|list} [opts.configuration.triggers] -\n *          A string that will cause us to call the webhook when it is found in a message body\n * @param {string} [opts.configuration.flowSid] -\n *          The SID of the Studio Flow to call when an event occurs\n * @param {number} [opts.configuration.retryCount] -\n *          The number of times to retry the webhook if the first attempt fails\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Configuration.Url': _.get(opts, 'configuration.url'),\n    'Configuration.Method': _.get(opts, 'configuration.method'),\n    'Configuration.Filters': serialize.map(_.get(opts, 'configuration.filters'), function(e) { return e; }),\n    'Configuration.Triggers': serialize.map(_.get(opts, 'configuration.triggers'), function(e) { return e; }),\n    'Configuration.FlowSid': _.get(opts, 'configuration.flowSid'),\n    'Configuration.RetryCount': _.get(opts, 'configuration.retryCount')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWebhookContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WebhookList: WebhookList,\n  WebhookPage: WebhookPage,\n  WebhookInstance: WebhookInstance,\n  WebhookContext: WebhookContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar InviteList = require('./channel/invite').InviteList;\nvar MemberList = require('./channel/member').MemberList;\nvar MessageList = require('./channel/message').MessageList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar WebhookList = require('./channel/webhook').WebhookList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ChannelList;\nvar ChannelPage;\nvar ChannelInstance;\nvar ChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nChannelList = function ChannelList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function channels\n   * @memberof Twilio.Chat.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext}\n   */\n  /* jshint ignore:end */\n  function ChannelListInstance(sid) {\n    return ChannelListInstance.get(sid);\n  }\n\n  ChannelListInstance._version = version;\n  // Path Solution\n  ChannelListInstance._solution = {serviceSid: serviceSid};\n  ChannelListInstance._uri = `/Services/${serviceSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * create a ChannelInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - A string to describe the new resource\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the Channel resource\n   * @param {string} [opts.attributes] -\n   *          A valid JSON string that contains application-specific data\n   * @param {channel.channel_type} [opts.type] - The visibility of the channel\n   * @param {Date} [opts.dateCreated] -\n   *          The ISO 8601 date and time in GMT when the resource was created\n   * @param {Date} [opts.dateUpdated] -\n   *          The ISO 8601 date and time in GMT when the resource was updated\n   * @param {string} [opts.createdBy] -\n   *          The identity of the User that created the Channel\n   * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ChannelInstance\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Attributes': _.get(opts, 'attributes'),\n      'Type': _.get(opts, 'type'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'CreatedBy': _.get(opts, 'createdBy')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] -\n   *          The visibility of the channel to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] -\n   *          The visibility of the channel to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] -\n   *          The visibility of the channel to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': serialize.map(_.get(opts, 'type'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a channel\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelList#\n   *\n   * @param {string} sid - The SID of the resource\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext}\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.get = function get(sid) {\n    return new ChannelContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.ChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ChannelListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelPage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ChannelSolution} solution - Path solution\n *\n * @returns ChannelPage\n */\n/* jshint ignore:end */\nChannelPage = function ChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ChannelPage.prototype, Page.prototype);\nChannelPage.prototype.constructor = ChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelPage#\n *\n * @param {ChannelPayload} payload - Payload response from the API\n *\n * @returns ChannelInstance\n */\n/* jshint ignore:end */\nChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new ChannelInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} attributes -\n *          The JSON string that stores application-specific data\n * @property {channel.channel_type} type -\n *          The visibility of the channel. Can be: `public` or `private`\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} createdBy - The identity of the User that created the channel\n * @property {number} membersCount - The number of Members in the Channel\n * @property {number} messagesCount -\n *          The number of Messages that have been passed in the Channel\n * @property {string} url - The absolute URL of the Channel resource\n * @property {string} links -\n *          Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel\n *\n * @param {V2} version - Version of the resource\n * @param {ChannelPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid_like} sid - The SID of the resource\n */\n/* jshint ignore:end */\nChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.membersCount = deserialize.integer(payload.members_count); // jshint ignore:line\n  this.messagesCount = deserialize.integer(payload.messages_count); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {Date} [opts.dateCreated] -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @param {Date} [opts.dateUpdated] -\n *          The ISO 8601 date and time in GMT when the resource was updated\n * @param {string} [opts.createdBy] -\n *          The identity of the User that created the Channel\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the members\n *\n * @function members\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.members = function members() {\n  return this._proxy.members;\n};\n\n/* jshint ignore:start */\n/**\n * Access the messages\n *\n * @function messages\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.messages = function messages() {\n  return this._proxy.messages;\n};\n\n/* jshint ignore:start */\n/**\n * Access the invites\n *\n * @function invites\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.invites = function invites() {\n  return this._proxy.invites;\n};\n\n/* jshint ignore:start */\n/**\n * Access the webhooks\n *\n * @function webhooks\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.webhooks = function webhooks() {\n  return this._proxy.webhooks;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.ChannelContext\n *\n * @property {Twilio.Chat.V2.ServiceContext.ChannelContext.MemberList} members -\n *          members resource\n * @property {Twilio.Chat.V2.ServiceContext.ChannelContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.Chat.V2.ServiceContext.ChannelContext.InviteList} invites -\n *          invites resource\n * @property {Twilio.Chat.V2.ServiceContext.ChannelContext.WebhookList} webhooks -\n *          webhooks resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} sid - The SID of the resource\n */\n/* jshint ignore:end */\nChannelContext = function ChannelContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${sid}`;\n\n  // Dependents\n  this._members = undefined;\n  this._messages = undefined;\n  this._invites = undefined;\n  this._webhooks = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {Date} [opts.dateCreated] -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @param {Date} [opts.dateUpdated] -\n *          The ISO 8601 date and time in GMT when the resource was updated\n * @param {string} [opts.createdBy] -\n *          The identity of the User that created the Channel\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'Attributes': _.get(opts, 'attributes'),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'CreatedBy': _.get(opts, 'createdBy')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ChannelContext.prototype,\n  'members', {\n    get: function() {\n      if (!this._members) {\n        this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._members;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'messages', {\n    get: function() {\n      if (!this._messages) {\n        this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._messages;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'invites', {\n    get: function() {\n      if (!this._invites) {\n        this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._invites;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'webhooks', {\n    get: function() {\n      if (!this._webhooks) {\n        this._webhooks = new WebhookList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._webhooks;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.ChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nChannelContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ChannelList: ChannelList,\n  ChannelPage: ChannelPage,\n  ChannelInstance: ChannelInstance,\n  ChannelContext: ChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RoleList;\nvar RolePage;\nvar RoleInstance;\nvar RoleContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.RoleList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nRoleList = function RoleList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function roles\n   * @memberof Twilio.Chat.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  function RoleListInstance(sid) {\n    return RoleListInstance.get(sid);\n  }\n\n  RoleListInstance._version = version;\n  // Path Solution\n  RoleListInstance._solution = {serviceSid: serviceSid};\n  RoleListInstance._uri = `/Services/${serviceSid}/Roles`;\n  /* jshint ignore:start */\n  /**\n   * create a RoleInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V2.ServiceContext.RoleList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the new resource\n   * @param {role.role_type} opts.type - The type of role\n   * @param {string|list} opts.permission - A permission the role should have\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RoleInstance\n   */\n  /* jshint ignore:end */\n  RoleListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n    if (_.isUndefined(opts['permission'])) {\n      throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoleInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams RoleInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RoleListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RoleInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.RoleList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a role\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.RoleList#\n   *\n   * @param {string} sid - The SID of the Role resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  RoleListInstance.get = function get(sid) {\n    return new RoleContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.RoleList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RoleListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RoleListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RoleListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RolePage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.RolePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RoleSolution} solution - Path solution\n *\n * @returns RolePage\n */\n/* jshint ignore:end */\nRolePage = function RolePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RolePage.prototype, Page.prototype);\nRolePage.prototype.constructor = RolePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RoleInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.RolePage#\n *\n * @param {RolePayload} payload - Payload response from the API\n *\n * @returns RoleInstance\n */\n/* jshint ignore:end */\nRolePage.prototype.getInstance = function getInstance(payload) {\n  return new RoleInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.RolePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRolePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRolePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.RoleInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {role.role_type} type - The type of role\n * @property {string} permissions -\n *          An array of the permissions the role has been granted\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Role resource\n *\n * @param {V2} version - Version of the resource\n * @param {RolePayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} sid - The SID of the Role resource to fetch\n */\n/* jshint ignore:end */\nRoleInstance = function RoleInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.permissions = payload.permissions; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RoleInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.RoleInstance#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - A permission the role should have\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.RoleInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoleInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.RoleContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid} sid - The SID of the Role resource to fetch\n */\n/* jshint ignore:end */\nRoleContext = function RoleContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Roles/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.RoleContext#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - A permission the role should have\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['permission'])) {\n    throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.RoleContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRoleContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RoleList: RoleList,\n  RolePage: RolePage,\n  RoleInstance: RoleInstance,\n  RoleContext: RoleContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar UserBindingList;\nvar UserBindingPage;\nvar UserBindingInstance;\nvar UserBindingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserBindingList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserContext.UserBindingList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} userSid - The SID of the User with the binding\n */\n/* jshint ignore:end */\nUserBindingList = function UserBindingList(version, serviceSid, userSid) {\n  /* jshint ignore:start */\n  /**\n   * @function userBindings\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.UserContext.UserBindingContext}\n   */\n  /* jshint ignore:end */\n  function UserBindingListInstance(sid) {\n    return UserBindingListInstance.get(sid);\n  }\n\n  UserBindingListInstance._version = version;\n  // Path Solution\n  UserBindingListInstance._solution = {serviceSid: serviceSid, userSid: userSid};\n  UserBindingListInstance._uri = `/Services/${serviceSid}/Users/${userSid}/Bindings`;\n  /* jshint ignore:start */\n  /**\n   * Streams UserBindingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {user_binding.binding_type|list} [opts.bindingType] -\n   *          The push technology used by the User Binding resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserBindingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {user_binding.binding_type|list} [opts.bindingType] -\n   *          The push technology used by the User Binding resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserBindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {user_binding.binding_type|list} [opts.bindingType] -\n   *          The push technology used by the User Binding resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'BindingType': serialize.map(_.get(opts, 'bindingType'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserBindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserBindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserBindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user_binding\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {string} sid - The SID of the User Binding resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.UserContext.UserBindingContext}\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.get = function get(sid) {\n    return new UserBindingContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserBindingListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserBindingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserBindingPage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserContext.UserBindingPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserBindingSolution} solution - Path solution\n *\n * @returns UserBindingPage\n */\n/* jshint ignore:end */\nUserBindingPage = function UserBindingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserBindingPage.prototype, Page.prototype);\nUserBindingPage.prototype.constructor = UserBindingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserBindingInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingPage#\n *\n * @param {UserBindingPayload} payload - Payload response from the API\n *\n * @returns UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingPage.prototype.getInstance = function getInstance(payload) {\n  return new UserBindingInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.userSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserBindingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserBindingPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserBindingContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserContext.UserBindingInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} endpoint -\n *          The unique endpoint identifier for the User Binding\n * @property {string} identity - The string that identifies the resource's User\n * @property {string} userSid - The SID of the User with the binding\n * @property {string} credentialSid - The SID of the Credential for the binding\n * @property {user_binding.binding_type} bindingType -\n *          The push technology to use for the binding\n * @property {string} messageTypes -\n *          The Programmable Chat message types the binding is subscribed to\n * @property {string} url - The absolute URL of the User Binding resource\n *\n * @param {V2} version - Version of the resource\n * @param {UserBindingPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} userSid - The SID of the User with the binding\n * @param {sid} sid - The SID of the User Binding resource to fetch\n */\n/* jshint ignore:end */\nUserBindingInstance = function UserBindingInstance(version, payload, serviceSid,\n                                                    userSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.endpoint = payload.endpoint; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.userSid = payload.user_sid; // jshint ignore:line\n  this.credentialSid = payload.credential_sid; // jshint ignore:line\n  this.bindingType = payload.binding_type; // jshint ignore:line\n  this.messageTypes = payload.message_types; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, userSid: userSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(UserBindingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserBindingContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.userSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UserBindingInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserBindingInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserBindingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserBindingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserBindingContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserContext.UserBindingContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} userSid - The SID of the User with the binding\n * @param {sid} sid - The SID of the User Binding resource to fetch\n */\n/* jshint ignore:end */\nUserBindingContext = function UserBindingContext(version, serviceSid, userSid,\n                                                  sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, userSid: userSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Users/${userSid}/Bindings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserBindingInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserBindingInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserBindingInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserBindingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserBindingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserBindingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserBindingList: UserBindingList,\n  UserBindingPage: UserBindingPage,\n  UserBindingInstance: UserBindingInstance,\n  UserBindingContext: UserBindingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar UserChannelList;\nvar UserChannelPage;\nvar UserChannelInstance;\nvar UserChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserContext.UserChannelList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} userSid - The SID of the User the User Channel belongs to\n */\n/* jshint ignore:end */\nUserChannelList = function UserChannelList(version, serviceSid, userSid) {\n  /* jshint ignore:start */\n  /**\n   * @function userChannels\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.UserContext.UserChannelContext}\n   */\n  /* jshint ignore:end */\n  function UserChannelListInstance(sid) {\n    return UserChannelListInstance.get(sid);\n  }\n\n  UserChannelListInstance._version = version;\n  // Path Solution\n  UserChannelListInstance._solution = {serviceSid: serviceSid, userSid: userSid};\n  UserChannelListInstance._uri = `/Services/${serviceSid}/Users/${userSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * Streams UserChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user_channel\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {string} channelSid -\n   *          The SID of the Channel that has the User Channel to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.UserContext.UserChannelContext}\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.get = function get(channelSid) {\n    return new UserChannelContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      channelSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserChannelListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelPage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserContext.UserChannelPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserChannelSolution} solution - Path solution\n *\n * @returns UserChannelPage\n */\n/* jshint ignore:end */\nUserChannelPage = function UserChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserChannelPage.prototype, Page.prototype);\nUserChannelPage.prototype.constructor = UserChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelPage#\n *\n * @param {UserChannelPayload} payload - Payload response from the API\n *\n * @returns UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new UserChannelInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.userSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserChannelPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserContext.UserChannelInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} channelSid - The SID of the Channel the resource belongs to\n * @property {string} userSid - The SID of the User the User Channel belongs to\n * @property {string} memberSid - The SID of the User as a Member in the Channel\n * @property {user_channel.channel_status} status -\n *          The status of the User on the Channel\n * @property {number} lastConsumedMessageIndex -\n *          The index of the last Message in the Channel the Member has read\n * @property {number} unreadMessagesCount -\n *          The number of unread Messages in the Channel for the User\n * @property {string} links -\n *          Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel\n * @property {string} url - The absolute URL of the resource\n * @property {user_channel.notification_level} notificationLevel -\n *          The push notification level of the User for the Channel\n *\n * @param {V2} version - Version of the resource\n * @param {UserChannelPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} userSid - The SID of the User the User Channel belongs to\n * @param {sid_like} channelSid -\n *          The SID of the Channel that has the User Channel to fetch\n */\n/* jshint ignore:end */\nUserChannelInstance = function UserChannelInstance(version, payload, serviceSid,\n                                                    userSid, channelSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.userSid = payload.user_sid; // jshint ignore:line\n  this.memberSid = payload.member_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line\n  this.unreadMessagesCount = deserialize.integer(payload.unread_messages_count); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.notificationLevel = payload.notification_level; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    serviceSid: serviceSid,\n    userSid: userSid,\n    channelSid: channelSid || this.channelSid,\n  };\n};\n\nObject.defineProperty(UserChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserChannelContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.userSid,\n          this._solution.channelSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UserChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserChannelInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {user_channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a UserChannelInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {user_channel.notification_level} [opts.notificationLevel] -\n *          The push notification level to assign to the User Channel\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The index of the last Message that the Member has read within the Channel\n * @param {Date} [opts.lastConsumptionTimestamp] -\n *          The ISO 8601 based timestamp string that represents the datetime of the last Message read event for the Member within the Channel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserContext.UserChannelContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid -\n *          The SID of the Service to fetch the User Channel resource from\n * @param {sid_like} userSid -\n *          The SID of the User to fetch the User Channel resource from\n * @param {sid_like} channelSid -\n *          The SID of the Channel that has the User Channel to fetch\n */\n/* jshint ignore:end */\nUserChannelContext = function UserChannelContext(version, serviceSid, userSid,\n                                                  channelSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, userSid: userSid, channelSid: channelSid, };\n  this._uri = `/Services/${serviceSid}/Users/${userSid}/Channels/${channelSid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      this._solution.channelSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserChannelInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {user_channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserChannelInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {user_channel.notification_level} [opts.notificationLevel] -\n *          The push notification level to assign to the User Channel\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The index of the last Message that the Member has read within the Channel\n * @param {Date} [opts.lastConsumptionTimestamp] -\n *          The ISO 8601 based timestamp string that represents the datetime of the last Message read event for the Member within the Channel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'NotificationLevel': _.get(opts, 'notificationLevel'),\n    'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),\n    'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      this._solution.channelSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext.UserChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserChannelContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserChannelList: UserChannelList,\n  UserChannelPage: UserChannelPage,\n  UserChannelInstance: UserChannelInstance,\n  UserChannelContext: UserChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar UserBindingList = require('./user/userBinding').UserBindingList;\nvar UserChannelList = require('./user/userChannel').UserChannelList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UserList;\nvar UserPage;\nvar UserInstance;\nvar UserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserList\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nUserList = function UserList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function users\n   * @memberof Twilio.Chat.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  function UserListInstance(sid) {\n    return UserListInstance.get(sid);\n  }\n\n  UserListInstance._version = version;\n  // Path Solution\n  UserListInstance._solution = {serviceSid: serviceSid};\n  UserListInstance._uri = `/Services/${serviceSid}/Users`;\n  /* jshint ignore:start */\n  /**\n   * create a UserInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V2.ServiceContext.UserList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity -\n   *          The `identity` value that identifies the new resource's User\n   * @param {string} [opts.roleSid] - The SID of the Role assigned to this user\n   * @param {string} [opts.attributes] -\n   *          A valid JSON string that contains application-specific data\n   * @param {string} [opts.friendlyName] - A string to describe the new resource\n   * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed UserInstance\n   */\n  /* jshint ignore:end */\n  UserListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'RoleSid': _.get(opts, 'roleSid'),\n      'Attributes': _.get(opts, 'attributes'),\n      'FriendlyName': _.get(opts, 'friendlyName')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams UserInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceContext.UserList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceContext.UserList#\n   *\n   * @param {string} sid - The SID of the User resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  UserListInstance.get = function get(sid) {\n    return new UserContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceContext.UserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserPage\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserSolution} solution - Path solution\n *\n * @returns UserPage\n */\n/* jshint ignore:end */\nUserPage = function UserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserPage.prototype, Page.prototype);\nUserPage.prototype.constructor = UserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServiceContext.UserPage#\n *\n * @param {UserPayload} payload - Payload response from the API\n *\n * @returns UserInstance\n */\n/* jshint ignore:end */\nUserPage.prototype.getInstance = function getInstance(payload) {\n  return new UserInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.UserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} attributes -\n *          The JSON string that stores application-specific data\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} roleSid - The SID of the Role assigned to the user\n * @property {string} identity - The string that identifies the resource's User\n * @property {boolean} isOnline -\n *          Whether the User is actively connected to the Service instance and online\n * @property {boolean} isNotifiable -\n *          Whether the User has a potentially valid Push Notification registration for the Service instance\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {number} joinedChannelsCount -\n *          The number of Channels the User is a Member of\n * @property {string} links -\n *          The absolute URLs of the Channel and Binding resources related to the user\n * @property {string} url - The absolute URL of the User resource\n *\n * @param {V2} version - Version of the resource\n * @param {UserPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid_like} sid - The SID of the User resource to fetch\n */\n/* jshint ignore:end */\nUserInstance = function UserInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.isOnline = payload.is_online; // jshint ignore:line\n  this.isNotifiable = payload.is_notifiable; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.joinedChannelsCount = deserialize.integer(payload.joined_channels_count); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(UserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.UserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The SID id of the Role assigned to this user\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the userChannels\n *\n * @function userChannels\n * @memberof Twilio.Chat.V2.ServiceContext.UserInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.UserContext.UserChannelList}\n */\n/* jshint ignore:end */\nUserInstance.prototype.userChannels = function userChannels() {\n  return this._proxy.userChannels;\n};\n\n/* jshint ignore:start */\n/**\n * Access the userBindings\n *\n * @function userBindings\n * @memberof Twilio.Chat.V2.ServiceContext.UserInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.UserContext.UserBindingList}\n */\n/* jshint ignore:end */\nUserInstance.prototype.userBindings = function userBindings() {\n  return this._proxy.userBindings;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.UserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext.UserContext\n *\n * @property {Twilio.Chat.V2.ServiceContext.UserContext.UserChannelList} userChannels -\n *          userChannels resource\n * @property {Twilio.Chat.V2.ServiceContext.UserContext.UserBindingList} userBindings -\n *          userBindings resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} sid - The SID of the User resource to fetch\n */\n/* jshint ignore:end */\nUserContext = function UserContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Users/${sid}`;\n\n  // Dependents\n  this._userChannels = undefined;\n  this._userBindings = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The SID id of the Role assigned to this user\n * @param {string} [opts.attributes] -\n *          A valid JSON string that contains application-specific data\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'RoleSid': _.get(opts, 'roleSid'),\n    'Attributes': _.get(opts, 'attributes'),\n    'FriendlyName': _.get(opts, 'friendlyName')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(UserContext.prototype,\n  'userChannels', {\n    get: function() {\n      if (!this._userChannels) {\n        this._userChannels = new UserChannelList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._userChannels;\n    }\n});\n\nObject.defineProperty(UserContext.prototype,\n  'userBindings', {\n    get: function() {\n      if (!this._userBindings) {\n        this._userBindings = new UserBindingList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._userBindings;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext.UserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserList: UserList,\n  UserPage: UserPage,\n  UserInstance: UserInstance,\n  UserContext: UserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BindingList = require('./service/binding').BindingList;\nvar ChannelList = require('./service/channel').ChannelList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar RoleList = require('./service/role').RoleList;\nvar UserList = require('./service/user').UserList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * @constructor Twilio.Chat.V2.ServiceList\n *\n * @param {Twilio.Chat.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Chat.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Chat.V2.ServiceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Chat.V2.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Chat.V2.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Chat.V2.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Chat.V2.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Chat.V2.ServiceList#\n   *\n   * @param {string} sid - The SID of the Service resource to fetch\n   *\n   * @returns {Twilio.Chat.V2.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V2.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * @constructor Twilio.Chat.V2.ServicePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V2.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Chat.V2.ServiceInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} defaultServiceRoleSid -\n *          The service role assigned to users when they are added to the service\n * @property {string} defaultChannelRoleSid -\n *          The channel role assigned to users when they are added to a channel\n * @property {string} defaultChannelCreatorRoleSid -\n *          The channel role assigned to a channel creator when they join a new channel\n * @property {boolean} readStatusEnabled -\n *          Whether the Message Consumption Horizon feature is enabled\n * @property {boolean} reachabilityEnabled -\n *          Whether the Reachability Indicator feature is enabled for this Service instance\n * @property {number} typingIndicatorTimeout -\n *          How long in seconds to wait before assuming the user is no longer typing\n * @property {number} consumptionReportInterval - DEPRECATED\n * @property {object} limits -\n *          An object that describes the limits of the service instance\n * @property {string} preWebhookUrl - The webhook URL for pre-event webhooks\n * @property {string} postWebhookUrl - The URL for post-event webhooks\n * @property {string} webhookMethod -\n *          The HTTP method  to use for both PRE and POST webhooks\n * @property {string} webhookFilters -\n *          The list of webhook events that are enabled for this Service instance\n * @property {number} preWebhookRetryCount -\n *          Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses\n * @property {number} postWebhookRetryCount -\n *          The number of times calls to the `post_webhook_url` will be retried\n * @property {object} notifications -\n *          The notification configuration for the Service instance\n * @property {object} media - The properties of the media that the service supports\n * @property {string} url - The absolute URL of the Service resource\n * @property {string} links -\n *          The absolute URLs of the Service's Channels, Roles, and Users\n *\n * @param {V2} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid} sid - The SID of the Service resource to fetch\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.defaultServiceRoleSid = payload.default_service_role_sid; // jshint ignore:line\n  this.defaultChannelRoleSid = payload.default_channel_role_sid; // jshint ignore:line\n  this.defaultChannelCreatorRoleSid = payload.default_channel_creator_role_sid; // jshint ignore:line\n  this.readStatusEnabled = payload.read_status_enabled; // jshint ignore:line\n  this.reachabilityEnabled = payload.reachability_enabled; // jshint ignore:line\n  this.typingIndicatorTimeout = deserialize.integer(payload.typing_indicator_timeout); // jshint ignore:line\n  this.consumptionReportInterval = deserialize.integer(payload.consumption_report_interval); // jshint ignore:line\n  this.limits = payload.limits; // jshint ignore:line\n  this.preWebhookUrl = payload.pre_webhook_url; // jshint ignore:line\n  this.postWebhookUrl = payload.post_webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.webhookFilters = payload.webhook_filters; // jshint ignore:line\n  this.preWebhookRetryCount = deserialize.integer(payload.pre_webhook_retry_count); // jshint ignore:line\n  this.postWebhookRetryCount = deserialize.integer(payload.post_webhook_retry_count); // jshint ignore:line\n  this.notifications = payload.notifications; // jshint ignore:line\n  this.media = payload.media; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.defaultServiceRoleSid] -\n *          The service role assigned to users when they are added to the service\n * @param {string} [opts.defaultChannelRoleSid] -\n *          The channel role assigned to users when they are added to a channel\n * @param {string} [opts.defaultChannelCreatorRoleSid] -\n *          The channel role assigned to a channel creator when they join a new channel\n * @param {boolean} [opts.readStatusEnabled] -\n *          Whether to enable the Message Consumption Horizon feature\n * @param {boolean} [opts.reachabilityEnabled] -\n *          Whether to enable the Reachability Indicator feature for this Service instance\n * @param {number} [opts.typingIndicatorTimeout] -\n *          How long in seconds to wait before assuming the user is no longer typing\n * @param {number} [opts.consumptionReportInterval] - DEPRECATED\n * @param {boolean} [opts.notifications.newMessage.enabled] -\n *          Whether to send a notification when a new message is added to a channel\n * @param {string} [opts.notifications.newMessage.template] -\n *          The template to use to create the notification text displayed when a new message is added to a channel\n * @param {string} [opts.notifications.newMessage.sound] -\n *          The name of the sound to play when a new message is added to a channel\n * @param {boolean} [opts.notifications.newMessage.badgeCountEnabled] -\n *          Whether the new message badge is enabled\n * @param {boolean} [opts.notifications.addedToChannel.enabled] -\n *          Whether to send a notification when a member is added to a channel\n * @param {string} [opts.notifications.addedToChannel.template] -\n *          The template to use to create the notification text displayed when a member is added to a channel\n * @param {string} [opts.notifications.addedToChannel.sound] -\n *          The name of the sound to play when a member is added to a channel\n * @param {boolean} [opts.notifications.removedFromChannel.enabled] -\n *          Whether to send a notification to a user when they are removed from a channel\n * @param {string} [opts.notifications.removedFromChannel.template] -\n *          The template to use to create the notification text displayed to a user when they are removed\n * @param {string} [opts.notifications.removedFromChannel.sound] -\n *          The name of the sound to play to a user when they are removed from a channel\n * @param {boolean} [opts.notifications.invitedToChannel.enabled] -\n *          Whether to send a notification when a user is invited to a channel\n * @param {string} [opts.notifications.invitedToChannel.template] -\n *          The template to use to create the notification text displayed when a user is invited to a channel\n * @param {string} [opts.notifications.invitedToChannel.sound] -\n *          The name of the sound to play when a user is invited to a channel\n * @param {string} [opts.preWebhookUrl] - The webhook URL for pre-event webhooks\n * @param {string} [opts.postWebhookUrl] - The URL for post-event webhooks\n * @param {string} [opts.webhookMethod] -\n *          The HTTP method  to use for both PRE and POST webhooks\n * @param {string|list} [opts.webhookFilters] -\n *          The list of webhook events that are enabled for this Service instance\n * @param {number} [opts.limits.channelMembers] -\n *          The maximum number of Members that can be added to Channels within this Service\n * @param {number} [opts.limits.userChannels] -\n *          The maximum number of Channels Users can be a Member of within this Service\n * @param {string} [opts.media.compatibilityMessage] -\n *          The message to send when a media message has no text\n * @param {number} [opts.preWebhookRetryCount] -\n *          Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses\n * @param {number} [opts.postWebhookRetryCount] -\n *          The number of times calls to the `post_webhook_url` will be retried\n * @param {boolean} [opts.notifications.logEnabled] - Whether to log notifications\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the channels\n *\n * @function channels\n * @memberof Twilio.Chat.V2.ServiceInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.ChannelList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.channels = function channels() {\n  return this._proxy.channels;\n};\n\n/* jshint ignore:start */\n/**\n * Access the roles\n *\n * @function roles\n * @memberof Twilio.Chat.V2.ServiceInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.RoleList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.roles = function roles() {\n  return this._proxy.roles;\n};\n\n/* jshint ignore:start */\n/**\n * Access the users\n *\n * @function users\n * @memberof Twilio.Chat.V2.ServiceInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.UserList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.users = function users() {\n  return this._proxy.users;\n};\n\n/* jshint ignore:start */\n/**\n * Access the bindings\n *\n * @function bindings\n * @memberof Twilio.Chat.V2.ServiceInstance#\n *\n * @returns {Twilio.Chat.V2.ServiceContext.BindingList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.bindings = function bindings() {\n  return this._proxy.bindings;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Chat.V2.ServiceContext\n *\n * @property {Twilio.Chat.V2.ServiceContext.ChannelList} channels -\n *          channels resource\n * @property {Twilio.Chat.V2.ServiceContext.RoleList} roles - roles resource\n * @property {Twilio.Chat.V2.ServiceContext.UserList} users - users resource\n * @property {Twilio.Chat.V2.ServiceContext.BindingList} bindings -\n *          bindings resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The SID of the Service resource to fetch\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._channels = undefined;\n  this._roles = undefined;\n  this._users = undefined;\n  this._bindings = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Chat.V2.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Chat.V2.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Chat.V2.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.defaultServiceRoleSid] -\n *          The service role assigned to users when they are added to the service\n * @param {string} [opts.defaultChannelRoleSid] -\n *          The channel role assigned to users when they are added to a channel\n * @param {string} [opts.defaultChannelCreatorRoleSid] -\n *          The channel role assigned to a channel creator when they join a new channel\n * @param {boolean} [opts.readStatusEnabled] -\n *          Whether to enable the Message Consumption Horizon feature\n * @param {boolean} [opts.reachabilityEnabled] -\n *          Whether to enable the Reachability Indicator feature for this Service instance\n * @param {number} [opts.typingIndicatorTimeout] -\n *          How long in seconds to wait before assuming the user is no longer typing\n * @param {number} [opts.consumptionReportInterval] - DEPRECATED\n * @param {boolean} [opts.notifications.newMessage.enabled] -\n *          Whether to send a notification when a new message is added to a channel\n * @param {string} [opts.notifications.newMessage.template] -\n *          The template to use to create the notification text displayed when a new message is added to a channel\n * @param {string} [opts.notifications.newMessage.sound] -\n *          The name of the sound to play when a new message is added to a channel\n * @param {boolean} [opts.notifications.newMessage.badgeCountEnabled] -\n *          Whether the new message badge is enabled\n * @param {boolean} [opts.notifications.addedToChannel.enabled] -\n *          Whether to send a notification when a member is added to a channel\n * @param {string} [opts.notifications.addedToChannel.template] -\n *          The template to use to create the notification text displayed when a member is added to a channel\n * @param {string} [opts.notifications.addedToChannel.sound] -\n *          The name of the sound to play when a member is added to a channel\n * @param {boolean} [opts.notifications.removedFromChannel.enabled] -\n *          Whether to send a notification to a user when they are removed from a channel\n * @param {string} [opts.notifications.removedFromChannel.template] -\n *          The template to use to create the notification text displayed to a user when they are removed\n * @param {string} [opts.notifications.removedFromChannel.sound] -\n *          The name of the sound to play to a user when they are removed from a channel\n * @param {boolean} [opts.notifications.invitedToChannel.enabled] -\n *          Whether to send a notification when a user is invited to a channel\n * @param {string} [opts.notifications.invitedToChannel.template] -\n *          The template to use to create the notification text displayed when a user is invited to a channel\n * @param {string} [opts.notifications.invitedToChannel.sound] -\n *          The name of the sound to play when a user is invited to a channel\n * @param {string} [opts.preWebhookUrl] - The webhook URL for pre-event webhooks\n * @param {string} [opts.postWebhookUrl] - The URL for post-event webhooks\n * @param {string} [opts.webhookMethod] -\n *          The HTTP method  to use for both PRE and POST webhooks\n * @param {string|list} [opts.webhookFilters] -\n *          The list of webhook events that are enabled for this Service instance\n * @param {number} [opts.limits.channelMembers] -\n *          The maximum number of Members that can be added to Channels within this Service\n * @param {number} [opts.limits.userChannels] -\n *          The maximum number of Channels Users can be a Member of within this Service\n * @param {string} [opts.media.compatibilityMessage] -\n *          The message to send when a media message has no text\n * @param {number} [opts.preWebhookRetryCount] -\n *          Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses\n * @param {number} [opts.postWebhookRetryCount] -\n *          The number of times calls to the `post_webhook_url` will be retried\n * @param {boolean} [opts.notifications.logEnabled] - Whether to log notifications\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DefaultServiceRoleSid': _.get(opts, 'defaultServiceRoleSid'),\n    'DefaultChannelRoleSid': _.get(opts, 'defaultChannelRoleSid'),\n    'DefaultChannelCreatorRoleSid': _.get(opts, 'defaultChannelCreatorRoleSid'),\n    'ReadStatusEnabled': serialize.bool(_.get(opts, 'readStatusEnabled')),\n    'ReachabilityEnabled': serialize.bool(_.get(opts, 'reachabilityEnabled')),\n    'TypingIndicatorTimeout': _.get(opts, 'typingIndicatorTimeout'),\n    'ConsumptionReportInterval': _.get(opts, 'consumptionReportInterval'),\n    'Notifications.NewMessage.Enabled': serialize.bool(_.get(opts, 'notifications.newMessage.enabled')),\n    'Notifications.NewMessage.Template': _.get(opts, 'notifications.newMessage.template'),\n    'Notifications.NewMessage.Sound': _.get(opts, 'notifications.newMessage.sound'),\n    'Notifications.NewMessage.BadgeCountEnabled': serialize.bool(_.get(opts, 'notifications.newMessage.badgeCountEnabled')),\n    'Notifications.AddedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.addedToChannel.enabled')),\n    'Notifications.AddedToChannel.Template': _.get(opts, 'notifications.addedToChannel.template'),\n    'Notifications.AddedToChannel.Sound': _.get(opts, 'notifications.addedToChannel.sound'),\n    'Notifications.RemovedFromChannel.Enabled': serialize.bool(_.get(opts, 'notifications.removedFromChannel.enabled')),\n    'Notifications.RemovedFromChannel.Template': _.get(opts, 'notifications.removedFromChannel.template'),\n    'Notifications.RemovedFromChannel.Sound': _.get(opts, 'notifications.removedFromChannel.sound'),\n    'Notifications.InvitedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.invitedToChannel.enabled')),\n    'Notifications.InvitedToChannel.Template': _.get(opts, 'notifications.invitedToChannel.template'),\n    'Notifications.InvitedToChannel.Sound': _.get(opts, 'notifications.invitedToChannel.sound'),\n    'PreWebhookUrl': _.get(opts, 'preWebhookUrl'),\n    'PostWebhookUrl': _.get(opts, 'postWebhookUrl'),\n    'WebhookMethod': _.get(opts, 'webhookMethod'),\n    'WebhookFilters': serialize.map(_.get(opts, 'webhookFilters'), function(e) { return e; }),\n    'Limits.ChannelMembers': _.get(opts, 'limits.channelMembers'),\n    'Limits.UserChannels': _.get(opts, 'limits.userChannels'),\n    'Media.CompatibilityMessage': _.get(opts, 'media.compatibilityMessage'),\n    'PreWebhookRetryCount': _.get(opts, 'preWebhookRetryCount'),\n    'PostWebhookRetryCount': _.get(opts, 'postWebhookRetryCount'),\n    'Notifications.LogEnabled': serialize.bool(_.get(opts, 'notifications.logEnabled'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'channels', {\n    get: function() {\n      if (!this._channels) {\n        this._channels = new ChannelList(this._version, this._solution.sid);\n      }\n      return this._channels;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'roles', {\n    get: function() {\n      if (!this._roles) {\n        this._roles = new RoleList(this._version, this._solution.sid);\n      }\n      return this._roles;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'users', {\n    get: function() {\n      if (!this._users) {\n        this._users = new UserList(this._version, this._solution.sid);\n      }\n      return this._users;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'bindings', {\n    get: function() {\n      if (!this._bindings) {\n        this._bindings = new BindingList(this._version, this._solution.sid);\n      }\n      return this._bindings;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V2.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CredentialList = require('./v2/credential').CredentialList;\nvar ServiceList = require('./v2/service').ServiceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V2 version of Chat\n *\n * @constructor Twilio.Chat.V2\n *\n * @property {Twilio.Chat.V2.CredentialList} credentials - credentials resource\n * @property {Twilio.Chat.V2.ServiceList} services - services resource\n *\n * @param {Twilio.Chat} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V2(domain) {\n  Version.prototype.constructor.call(this, domain, 'v2');\n\n  // Resources\n  this._credentials = undefined;\n  this._services = undefined;\n}\n\n_.extend(V2.prototype, Version.prototype);\nV2.prototype.constructor = V2;\n\nObject.defineProperty(V2.prototype,\n  'credentials', {\n    get: function() {\n      this._credentials = this._credentials || new CredentialList(this);\n      return this._credentials;\n    }\n});\n\nObject.defineProperty(V2.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nmodule.exports = V2;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ChannelList;\nvar ChannelPage;\nvar ChannelInstance;\nvar ChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelList\n *\n * @constructor Twilio.Chat.V3.ChannelList\n *\n * @param {Twilio.Chat.V3} version - Version of the resource\n */\n/* jshint ignore:end */\nChannelList = function ChannelList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function channels\n   * @memberof Twilio.Chat.V3#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Chat.V3.ChannelContext}\n   */\n  /* jshint ignore:end */\n  function ChannelListInstance(sid) {\n    return ChannelListInstance.get(sid);\n  }\n\n  ChannelListInstance._version = version;\n  // Path Solution\n  ChannelListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a channel\n   *\n   * @function get\n   * @memberof Twilio.Chat.V3.ChannelList#\n   *\n   * @param {string} serviceSid - Service Sid.\n   * @param {string} sid - A string that uniquely identifies this Channel.\n   *\n   * @returns {Twilio.Chat.V3.ChannelContext}\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.get = function get(serviceSid, sid) {\n    return new ChannelContext(this._version, serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Chat.V3.ChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ChannelListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelPage\n *\n * @constructor Twilio.Chat.V3.ChannelPage\n *\n * @param {V3} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ChannelSolution} solution - Path solution\n *\n * @returns ChannelPage\n */\n/* jshint ignore:end */\nChannelPage = function ChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ChannelPage.prototype, Page.prototype);\nChannelPage.prototype.constructor = ChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.Chat.V3.ChannelPage#\n *\n * @param {ChannelPayload} payload - Payload response from the API\n *\n * @returns ChannelInstance\n */\n/* jshint ignore:end */\nChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new ChannelInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V3.ChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.Chat.V3.ChannelInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} attributes -\n *          The JSON string that stores application-specific data\n * @property {channel.channel_type} type -\n *          The visibility of the channel. Can be: `public` or `private`\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} createdBy - The identity of the User that created the channel\n * @property {number} membersCount - The number of Members in the Channel\n * @property {number} messagesCount -\n *          The number of Messages that have been passed in the Channel\n * @property {string} messagingServiceSid -\n *          The unique ID of the Messaging Service this channel belongs to.\n * @property {string} url - The absolute URL of the Channel resource\n *\n * @param {V3} version - Version of the resource\n * @param {ChannelPayload} payload - The instance payload\n * @param {sid} serviceSid - Service Sid.\n * @param {sid_like} sid - A string that uniquely identifies this Channel.\n */\n/* jshint ignore:end */\nChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.membersCount = deserialize.integer(payload.members_count); // jshint ignore:line\n  this.messagesCount = deserialize.integer(payload.messages_count); // jshint ignore:line\n  this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid || this.serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.Chat.V3.ChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {channel.channel_type} [opts.type] -\n *          The Type for this Channel to migrate to.\n * @param {string} [opts.messagingServiceSid] -\n *          The unique ID of the Messaging Service this channel belongs to.\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V3.ChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.Chat.V3.ChannelContext\n *\n * @param {V3} version - Version of the resource\n * @param {sid} serviceSid - Service Sid.\n * @param {sid_like} sid - A string that uniquely identifies this Channel.\n */\n/* jshint ignore:end */\nChannelContext = function ChannelContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.Chat.V3.ChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {channel.channel_type} [opts.type] -\n *          The Type for this Channel to migrate to.\n * @param {string} [opts.messagingServiceSid] -\n *          The unique ID of the Messaging Service this channel belongs to.\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Type': _.get(opts, 'type'),\n    'MessagingServiceSid': _.get(opts, 'messagingServiceSid')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Chat.V3.ChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nChannelContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ChannelList: ChannelList,\n  ChannelPage: ChannelPage,\n  ChannelInstance: ChannelInstance,\n  ChannelContext: ChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar ChannelList = require('./v3/channel').ChannelList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V3 version of Chat\n *\n * @constructor Twilio.Chat.V3\n *\n * @property {Twilio.Chat.V3.ChannelList} channels - channels resource\n *\n * @param {Twilio.Chat} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V3(domain) {\n  Version.prototype.constructor.call(this, domain, 'v3');\n\n  // Resources\n  this._channels = undefined;\n}\n\n_.extend(V3.prototype, Version.prototype);\nV3.prototype.constructor = V3;\n\nObject.defineProperty(V3.prototype,\n  'channels', {\n    get: function() {\n      this._channels = this._channels || new ChannelList(this);\n      return this._channels;\n    }\n});\n\nmodule.exports = V3;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./chat/V1');  /* jshint ignore:line */\nvar V2 = require('./chat/V2');  /* jshint ignore:line */\nvar V3 = require('./chat/V3');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize chat domain\n *\n * @constructor Twilio.Chat\n *\n * @property {Twilio.Chat.V1} v1 - v1 version\n * @property {Twilio.Chat.V2} v2 - v2 version\n * @property {Twilio.Chat.V3} v3 - v3 version\n * @property {Twilio.Chat.V2.CredentialList} credentials - credentials resource\n * @property {Twilio.Chat.V2.ServiceList} services - services resource\n * @property {Twilio.Chat.V3.ChannelList} channels - channels resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Chat(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://chat.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n  this._v2 = undefined;\n  this._v3 = undefined;\n}\n\n_.extend(Chat.prototype, Domain.prototype);\nChat.prototype.constructor = Chat;\n\nObject.defineProperty(Chat.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Chat.prototype,\n  'v2', {\n    get: function() {\n      this._v2 = this._v2 || new V2(this);\n      return this._v2;\n    }\n});\n\nObject.defineProperty(Chat.prototype,\n  'v3', {\n    get: function() {\n      this._v3 = this._v3 || new V3(this);\n      return this._v3;\n    }\n});\n\nObject.defineProperty(Chat.prototype,\n  'credentials', {\n    get: function() {\n      return this.v2.credentials;\n    }\n});\n\nObject.defineProperty(Chat.prototype,\n  'services', {\n    get: function() {\n      return this.v2.services;\n    }\n});\n\nObject.defineProperty(Chat.prototype,\n  'channels', {\n    get: function() {\n      return this.v3.channels;\n    }\n});\n\nmodule.exports = Chat;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar AddressConfigurationList;\nvar AddressConfigurationPage;\nvar AddressConfigurationInstance;\nvar AddressConfigurationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AddressConfigurationList\n *\n * @constructor Twilio.Conversations.V1.AddressConfigurationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nAddressConfigurationList = function AddressConfigurationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function addressConfigurations\n   * @memberof Twilio.Conversations.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.AddressConfigurationContext}\n   */\n  /* jshint ignore:end */\n  function AddressConfigurationListInstance(sid) {\n    return AddressConfigurationListInstance.get(sid);\n  }\n\n  AddressConfigurationListInstance._version = version;\n  // Path Solution\n  AddressConfigurationListInstance._solution = {};\n  AddressConfigurationListInstance._uri = `/Configuration/Addresses`;\n  /* jshint ignore:start */\n  /**\n   * Streams AddressConfigurationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.AddressConfigurationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.type] - The type of address configuration.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AddressConfigurationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AddressConfigurationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.AddressConfigurationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.type] - The type of address configuration.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AddressConfigurationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AddressConfigurationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.AddressConfigurationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.type] - The type of address configuration.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AddressConfigurationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AddressConfigurationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AddressConfigurationInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.AddressConfigurationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AddressConfigurationListInstance.getPage = function getPage(targetUrl, callback)\n                                                               {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AddressConfigurationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a AddressConfigurationInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.AddressConfigurationList#\n   *\n   * @param {object} opts - Options for request\n   * @param {address_configuration.type} opts.type - Type of Address.\n   * @param {string} opts.address - The unique address to be configured.\n   * @param {string} [opts.friendlyName] -\n   *          The human-readable name of this configuration.\n   * @param {boolean} [opts.autoCreation.enabled] -\n   *          Enable/Disable auto-creating conversations for messages to this address\n   * @param {address_configuration.auto_creation_type} [opts.autoCreation.type] -\n   *          Type of Auto Creation.\n   * @param {string} [opts.autoCreation.conversationServiceSid] -\n   *          Conversation Service for the auto-created conversation.\n   * @param {string} [opts.autoCreation.webhookUrl] -\n   *          For type `webhook`, the url for the webhook request.\n   * @param {address_configuration.method} [opts.autoCreation.webhookMethod] -\n   *          For type `webhook`, the HTTP method to be used when sending a webhook request.\n   * @param {string|list} [opts.autoCreation.webhookFilters] -\n   *          The list of events, firing webhook event for this Conversation.\n   * @param {string} [opts.autoCreation.studioFlowSid] -\n   *          For type `studio`, the studio flow SID where the webhook should be sent to.\n   * @param {number} [opts.autoCreation.studioRetryCount] -\n   *          For type `studio`, number of times to retry the webhook request\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AddressConfigurationInstance\n   */\n  /* jshint ignore:end */\n  AddressConfigurationListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n    if (_.isUndefined(opts['address'])) {\n      throw new Error('Required parameter \"opts[\\'address\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'Address': _.get(opts, 'address'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'AutoCreation.Enabled': serialize.bool(_.get(opts, 'autoCreation.enabled')),\n      'AutoCreation.Type': _.get(opts, 'autoCreation.type'),\n      'AutoCreation.ConversationServiceSid': _.get(opts, 'autoCreation.conversationServiceSid'),\n      'AutoCreation.WebhookUrl': _.get(opts, 'autoCreation.webhookUrl'),\n      'AutoCreation.WebhookMethod': _.get(opts, 'autoCreation.webhookMethod'),\n      'AutoCreation.WebhookFilters': serialize.map(_.get(opts, 'autoCreation.webhookFilters'), function(e) { return e; }),\n      'AutoCreation.StudioFlowSid': _.get(opts, 'autoCreation.studioFlowSid'),\n      'AutoCreation.StudioRetryCount': _.get(opts, 'autoCreation.studioRetryCount')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AddressConfigurationInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a address_configuration\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.AddressConfigurationList#\n   *\n   * @param {string} sid - The SID or Address of the Configuration.\n   *\n   * @returns {Twilio.Conversations.V1.AddressConfigurationContext}\n   */\n  /* jshint ignore:end */\n  AddressConfigurationListInstance.get = function get(sid) {\n    return new AddressConfigurationContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.AddressConfigurationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AddressConfigurationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AddressConfigurationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AddressConfigurationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AddressConfigurationPage\n *\n * @constructor Twilio.Conversations.V1.AddressConfigurationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AddressConfigurationSolution} solution - Path solution\n *\n * @returns AddressConfigurationPage\n */\n/* jshint ignore:end */\nAddressConfigurationPage = function AddressConfigurationPage(version, response,\n    solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AddressConfigurationPage.prototype, Page.prototype);\nAddressConfigurationPage.prototype.constructor = AddressConfigurationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AddressConfigurationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.AddressConfigurationPage#\n *\n * @param {AddressConfigurationPayload} payload - Payload response from the API\n *\n * @returns AddressConfigurationInstance\n */\n/* jshint ignore:end */\nAddressConfigurationPage.prototype.getInstance = function getInstance(payload) {\n  return new AddressConfigurationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.AddressConfigurationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAddressConfigurationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAddressConfigurationPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AddressConfigurationContext\n *\n * @constructor Twilio.Conversations.V1.AddressConfigurationInstance\n *\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} accountSid -\n *          The unique ID of the Account the address belongs to.\n * @property {string} type - Type of Address.\n * @property {string} address - The unique address to be configured.\n * @property {string} friendlyName - The human-readable name of this configuration.\n * @property {object} autoCreation - Auto Creation configuration for the address.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {string} url - An absolute URL for this address configuration.\n *\n * @param {V1} version - Version of the resource\n * @param {AddressConfigurationPayload} payload - The instance payload\n * @param {sid_like} sid - The SID or Address of the Configuration.\n */\n/* jshint ignore:end */\nAddressConfigurationInstance = function AddressConfigurationInstance(version,\n    payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.address = payload.address; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.autoCreation = payload.auto_creation; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(AddressConfigurationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AddressConfigurationContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AddressConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.AddressConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressConfigurationInstance\n */\n/* jshint ignore:end */\nAddressConfigurationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AddressConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.AddressConfigurationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human-readable name of this configuration.\n * @param {boolean} [opts.autoCreation.enabled] -\n *          Enable/Disable auto-creating conversations for messages to this address\n * @param {address_configuration.auto_creation_type} [opts.autoCreation.type] -\n *          Type of Auto Creation.\n * @param {string} [opts.autoCreation.conversationServiceSid] -\n *          Conversation Service for the auto-created conversation.\n * @param {string} [opts.autoCreation.webhookUrl] -\n *          For type `webhook`, the url for the webhook request.\n * @param {address_configuration.method} [opts.autoCreation.webhookMethod] -\n *          For type `webhook`, the HTTP method to be used when sending a webhook request.\n * @param {string|list} [opts.autoCreation.webhookFilters] -\n *          The list of events, firing webhook event for this Conversation.\n * @param {string} [opts.autoCreation.studioFlowSid] -\n *          For type `studio`, the studio flow SID where the webhook should be sent to.\n * @param {number} [opts.autoCreation.studioRetryCount] -\n *          For type `studio`, number of times to retry the webhook request\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressConfigurationInstance\n */\n/* jshint ignore:end */\nAddressConfigurationInstance.prototype.update = function update(opts, callback)\n    {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AddressConfigurationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.AddressConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressConfigurationInstance\n */\n/* jshint ignore:end */\nAddressConfigurationInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.AddressConfigurationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAddressConfigurationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAddressConfigurationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AddressConfigurationContext\n *\n * @constructor Twilio.Conversations.V1.AddressConfigurationContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID or Address of the Configuration.\n */\n/* jshint ignore:end */\nAddressConfigurationContext = function AddressConfigurationContext(version, sid)\n    {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Configuration/Addresses/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AddressConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.AddressConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressConfigurationInstance\n */\n/* jshint ignore:end */\nAddressConfigurationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AddressConfigurationInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AddressConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.AddressConfigurationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human-readable name of this configuration.\n * @param {boolean} [opts.autoCreation.enabled] -\n *          Enable/Disable auto-creating conversations for messages to this address\n * @param {address_configuration.auto_creation_type} [opts.autoCreation.type] -\n *          Type of Auto Creation.\n * @param {string} [opts.autoCreation.conversationServiceSid] -\n *          Conversation Service for the auto-created conversation.\n * @param {string} [opts.autoCreation.webhookUrl] -\n *          For type `webhook`, the url for the webhook request.\n * @param {address_configuration.method} [opts.autoCreation.webhookMethod] -\n *          For type `webhook`, the HTTP method to be used when sending a webhook request.\n * @param {string|list} [opts.autoCreation.webhookFilters] -\n *          The list of events, firing webhook event for this Conversation.\n * @param {string} [opts.autoCreation.studioFlowSid] -\n *          For type `studio`, the studio flow SID where the webhook should be sent to.\n * @param {number} [opts.autoCreation.studioRetryCount] -\n *          For type `studio`, number of times to retry the webhook request\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressConfigurationInstance\n */\n/* jshint ignore:end */\nAddressConfigurationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'AutoCreation.Enabled': serialize.bool(_.get(opts, 'autoCreation.enabled')),\n    'AutoCreation.Type': _.get(opts, 'autoCreation.type'),\n    'AutoCreation.ConversationServiceSid': _.get(opts, 'autoCreation.conversationServiceSid'),\n    'AutoCreation.WebhookUrl': _.get(opts, 'autoCreation.webhookUrl'),\n    'AutoCreation.WebhookMethod': _.get(opts, 'autoCreation.webhookMethod'),\n    'AutoCreation.WebhookFilters': serialize.map(_.get(opts, 'autoCreation.webhookFilters'), function(e) { return e; }),\n    'AutoCreation.StudioFlowSid': _.get(opts, 'autoCreation.studioFlowSid'),\n    'AutoCreation.StudioRetryCount': _.get(opts, 'autoCreation.studioRetryCount')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AddressConfigurationInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AddressConfigurationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.AddressConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AddressConfigurationInstance\n */\n/* jshint ignore:end */\nAddressConfigurationContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.AddressConfigurationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAddressConfigurationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAddressConfigurationContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AddressConfigurationList: AddressConfigurationList,\n  AddressConfigurationPage: AddressConfigurationPage,\n  AddressConfigurationInstance: AddressConfigurationInstance,\n  AddressConfigurationContext: AddressConfigurationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar WebhookList;\nvar WebhookPage;\nvar WebhookInstance;\nvar WebhookContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookList\n *\n * @constructor Twilio.Conversations.V1.ConfigurationContext.WebhookList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nWebhookList = function WebhookList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function webhooks\n   * @memberof Twilio.Conversations.V1.ConfigurationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ConfigurationContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  function WebhookListInstance(sid) {\n    return WebhookListInstance.get(sid);\n  }\n\n  WebhookListInstance._version = version;\n  // Path Solution\n  WebhookListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a webhook\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookList#\n   *\n   * @returns {Twilio.Conversations.V1.ConfigurationContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.get = function get() {\n    return new WebhookContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WebhookListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WebhookListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookPage\n *\n * @constructor Twilio.Conversations.V1.ConfigurationContext.WebhookPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WebhookSolution} solution - Path solution\n *\n * @returns WebhookPage\n */\n/* jshint ignore:end */\nWebhookPage = function WebhookPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WebhookPage.prototype, Page.prototype);\nWebhookPage.prototype.constructor = WebhookPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WebhookInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookPage#\n *\n * @param {WebhookPayload} payload - Payload response from the API\n *\n * @returns WebhookInstance\n */\n/* jshint ignore:end */\nWebhookPage.prototype.getInstance = function getInstance(payload) {\n  return new WebhookInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Conversations.V1.ConfigurationContext.WebhookInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this conversation.\n * @property {webhook.method} method -\n *          The HTTP method to be used when sending a webhook request.\n * @property {string} filters -\n *          The list of webhook event triggers that are enabled for this Service.\n * @property {string} preWebhookUrl -\n *          The absolute url the pre-event webhook request should be sent to.\n * @property {string} postWebhookUrl -\n *          The absolute url the post-event webhook request should be sent to.\n * @property {webhook.target} target - The routing target of the webhook.\n * @property {string} url - An absolute URL for this webhook.\n *\n * @param {V1} version - Version of the resource\n * @param {WebhookPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nWebhookInstance = function WebhookInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.method = payload.method; // jshint ignore:line\n  this.filters = payload.filters; // jshint ignore:line\n  this.preWebhookUrl = payload.pre_webhook_url; // jshint ignore:line\n  this.postWebhookUrl = payload.post_webhook_url; // jshint ignore:line\n  this.target = payload.target; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(WebhookInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WebhookContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.method] -\n *          The HTTP method to be used when sending a webhook request.\n * @param {string|list} [opts.filters] -\n *          The list of webhook event triggers that are enabled for this Service.\n * @param {string} [opts.preWebhookUrl] -\n *          The absolute url the pre-event webhook request should be sent to.\n * @param {string} [opts.postWebhookUrl] -\n *          The absolute url the post-event webhook request should be sent to.\n * @param {webhook.target} [opts.target] - The routing target of the webhook.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Conversations.V1.ConfigurationContext.WebhookContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nWebhookContext = function WebhookContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/Configuration/Webhooks`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.method] -\n *          The HTTP method to be used when sending a webhook request.\n * @param {string|list} [opts.filters] -\n *          The list of webhook event triggers that are enabled for this Service.\n * @param {string} [opts.preWebhookUrl] -\n *          The absolute url the pre-event webhook request should be sent to.\n * @param {string} [opts.postWebhookUrl] -\n *          The absolute url the post-event webhook request should be sent to.\n * @param {webhook.target} [opts.target] - The routing target of the webhook.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Method': _.get(opts, 'method'),\n    'Filters': serialize.map(_.get(opts, 'filters'), function(e) { return e; }),\n    'PreWebhookUrl': _.get(opts, 'preWebhookUrl'),\n    'PostWebhookUrl': _.get(opts, 'postWebhookUrl'),\n    'Target': _.get(opts, 'target')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConfigurationContext.WebhookContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWebhookContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WebhookList: WebhookList,\n  WebhookPage: WebhookPage,\n  WebhookInstance: WebhookInstance,\n  WebhookContext: WebhookContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar WebhookList = require('./configuration/webhook').WebhookList;\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ConfigurationList;\nvar ConfigurationPage;\nvar ConfigurationInstance;\nvar ConfigurationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationList\n *\n * @constructor Twilio.Conversations.V1.ConfigurationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nConfigurationList = function ConfigurationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function configuration\n   * @memberof Twilio.Conversations.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ConfigurationContext}\n   */\n  /* jshint ignore:end */\n  function ConfigurationListInstance(sid) {\n    return ConfigurationListInstance.get(sid);\n  }\n\n  ConfigurationListInstance._version = version;\n  // Path Solution\n  ConfigurationListInstance._solution = {};\n\n  // Components\n  ConfigurationListInstance._webhooks = undefined;\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a configuration\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ConfigurationList#\n   *\n   * @returns {Twilio.Conversations.V1.ConfigurationContext}\n   */\n  /* jshint ignore:end */\n  ConfigurationListInstance.get = function get() {\n    return new ConfigurationContext(this._version);\n  };\n\n  Object.defineProperty(ConfigurationListInstance,\n    'webhooks', {\n      get: function webhooks() {\n        if (!this._webhooks) {\n          this._webhooks = new WebhookList(this._version);\n        }\n\n        return this._webhooks;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ConfigurationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConfigurationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConfigurationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConfigurationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationPage\n *\n * @constructor Twilio.Conversations.V1.ConfigurationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConfigurationSolution} solution - Path solution\n *\n * @returns ConfigurationPage\n */\n/* jshint ignore:end */\nConfigurationPage = function ConfigurationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConfigurationPage.prototype, Page.prototype);\nConfigurationPage.prototype.constructor = ConfigurationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConfigurationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ConfigurationPage#\n *\n * @param {ConfigurationPayload} payload - Payload response from the API\n *\n * @returns ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationPage.prototype.getInstance = function getInstance(payload) {\n  return new ConfigurationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConfigurationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConfigurationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConfigurationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationContext\n *\n * @constructor Twilio.Conversations.V1.ConfigurationInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account responsible for this configuration.\n * @property {string} defaultChatServiceSid -\n *          The SID of the default Conversation Service that every new conversation is associated with.\n * @property {string} defaultMessagingServiceSid -\n *          The SID of the default Messaging Service that every new conversation is associated with.\n * @property {string} defaultInactiveTimer -\n *          Default ISO8601 duration when conversation will be switched to `inactive` state.\n * @property {string} defaultClosedTimer -\n *          Default ISO8601 duration when conversation will be switched to `closed` state.\n * @property {string} url - An absolute URL for this global configuration.\n * @property {string} links -\n *          Absolute URLs to access the webhook and default service configurations.\n *\n * @param {V1} version - Version of the resource\n * @param {ConfigurationPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nConfigurationInstance = function ConfigurationInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.defaultChatServiceSid = payload.default_chat_service_sid; // jshint ignore:line\n  this.defaultMessagingServiceSid = payload.default_messaging_service_sid; // jshint ignore:line\n  this.defaultInactiveTimer = payload.default_inactive_timer; // jshint ignore:line\n  this.defaultClosedTimer = payload.default_closed_timer; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(ConfigurationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConfigurationContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConfigurationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.defaultChatServiceSid] -\n *          The SID of the default Conversation Service that every new conversation will be associated with.\n * @param {string} [opts.defaultMessagingServiceSid] -\n *          The SID of the default Messaging Service that every new conversation will be associated with.\n * @param {string} [opts.defaultInactiveTimer] -\n *          Default ISO8601 duration when conversation will be switched to `inactive` state.\n * @param {string} [opts.defaultClosedTimer] -\n *          Default ISO8601 duration when conversation will be switched to `closed` state.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConfigurationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConfigurationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationContext\n *\n * @constructor Twilio.Conversations.V1.ConfigurationContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nConfigurationContext = function ConfigurationContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/Configuration`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConfigurationInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConfigurationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.defaultChatServiceSid] -\n *          The SID of the default Conversation Service that every new conversation will be associated with.\n * @param {string} [opts.defaultMessagingServiceSid] -\n *          The SID of the default Messaging Service that every new conversation will be associated with.\n * @param {string} [opts.defaultInactiveTimer] -\n *          Default ISO8601 duration when conversation will be switched to `inactive` state.\n * @param {string} [opts.defaultClosedTimer] -\n *          Default ISO8601 duration when conversation will be switched to `closed` state.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'DefaultChatServiceSid': _.get(opts, 'defaultChatServiceSid'),\n    'DefaultMessagingServiceSid': _.get(opts, 'defaultMessagingServiceSid'),\n    'DefaultInactiveTimer': _.get(opts, 'defaultInactiveTimer'),\n    'DefaultClosedTimer': _.get(opts, 'defaultClosedTimer')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConfigurationInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConfigurationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConfigurationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConfigurationList: ConfigurationList,\n  ConfigurationPage: ConfigurationPage,\n  ConfigurationInstance: ConfigurationInstance,\n  ConfigurationContext: ConfigurationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar DeliveryReceiptList;\nvar DeliveryReceiptPage;\nvar DeliveryReceiptInstance;\nvar DeliveryReceiptContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DeliveryReceiptList\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @param {string} messageSid -\n *          The SID of the message the delivery receipt belongs to\n */\n/* jshint ignore:end */\nDeliveryReceiptList = function DeliveryReceiptList(version, conversationSid,\n                                                    messageSid) {\n  /* jshint ignore:start */\n  /**\n   * @function deliveryReceipts\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptContext}\n   */\n  /* jshint ignore:end */\n  function DeliveryReceiptListInstance(sid) {\n    return DeliveryReceiptListInstance.get(sid);\n  }\n\n  DeliveryReceiptListInstance._version = version;\n  // Path Solution\n  DeliveryReceiptListInstance._solution = {conversationSid: conversationSid, messageSid: messageSid};\n  DeliveryReceiptListInstance._uri = `/Conversations/${conversationSid}/Messages/${messageSid}/Receipts`;\n  /* jshint ignore:start */\n  /**\n   * Streams DeliveryReceiptInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DeliveryReceiptInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DeliveryReceiptInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeliveryReceiptPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DeliveryReceiptInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeliveryReceiptPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a delivery_receipt\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptContext}\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.get = function get(sid) {\n    return new DeliveryReceiptContext(\n      this._version,\n      this._solution.conversationSid,\n      this._solution.messageSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DeliveryReceiptListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DeliveryReceiptListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeliveryReceiptPage\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DeliveryReceiptSolution} solution - Path solution\n *\n * @returns DeliveryReceiptPage\n */\n/* jshint ignore:end */\nDeliveryReceiptPage = function DeliveryReceiptPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DeliveryReceiptPage.prototype, Page.prototype);\nDeliveryReceiptPage.prototype.constructor = DeliveryReceiptPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DeliveryReceiptInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptPage#\n *\n * @param {DeliveryReceiptPayload} payload - Payload response from the API\n *\n * @returns DeliveryReceiptInstance\n */\n/* jshint ignore:end */\nDeliveryReceiptPage.prototype.getInstance = function getInstance(payload) {\n  return new DeliveryReceiptInstance(\n    this._version,\n    payload,\n    this._solution.conversationSid,\n    this._solution.messageSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeliveryReceiptPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeliveryReceiptPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeliveryReceiptContext\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this participant.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} messageSid -\n *          The SID of the message the delivery receipt belongs to\n * @property {string} channelMessageSid -\n *          A messaging channel-specific identifier for the message delivered to participant\n * @property {string} participantSid -\n *          The unique ID of the participant the delivery receipt belongs to.\n * @property {delivery_receipt.delivery_status} status -\n *          The message delivery status\n * @property {number} errorCode -\n *          The message {@link https://www.twilio.com/docs/sms/api/message-resource#delivery-related-errors|delivery error code} for a `failed` status\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {string} url - An absolute URL for this delivery receipt.\n *\n * @param {V1} version - Version of the resource\n * @param {DeliveryReceiptPayload} payload - The instance payload\n * @param {sid} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @param {sid} messageSid - The SID of the message the delivery receipt belongs to\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nDeliveryReceiptInstance = function DeliveryReceiptInstance(version, payload,\n                                                            conversationSid,\n                                                            messageSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.messageSid = payload.message_sid; // jshint ignore:line\n  this.channelMessageSid = payload.channel_message_sid; // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {conversationSid: conversationSid, messageSid: messageSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(DeliveryReceiptInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DeliveryReceiptContext(\n          this._version,\n          this._solution.conversationSid,\n          this._solution.messageSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DeliveryReceiptInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeliveryReceiptInstance\n */\n/* jshint ignore:end */\nDeliveryReceiptInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeliveryReceiptInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeliveryReceiptInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeliveryReceiptContext\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} conversationSid -\n *          The unique ID of the Conversation for this delivery receipt.\n * @param {sid} messageSid -\n *          The SID of the message the delivery receipt belongs to.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nDeliveryReceiptContext = function DeliveryReceiptContext(version,\n                                                          conversationSid,\n                                                          messageSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {conversationSid: conversationSid, messageSid: messageSid, sid: sid, };\n  this._uri = `/Conversations/${conversationSid}/Messages/${messageSid}/Receipts/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DeliveryReceiptInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeliveryReceiptInstance\n */\n/* jshint ignore:end */\nDeliveryReceiptContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DeliveryReceiptInstance(\n      this._version,\n      payload,\n      this._solution.conversationSid,\n      this._solution.messageSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeliveryReceiptContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDeliveryReceiptContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DeliveryReceiptList: DeliveryReceiptList,\n  DeliveryReceiptPage: DeliveryReceiptPage,\n  DeliveryReceiptInstance: DeliveryReceiptInstance,\n  DeliveryReceiptContext: DeliveryReceiptContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DeliveryReceiptList = require(\n    './message/deliveryReceipt').DeliveryReceiptList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar MessageList;\nvar MessagePage;\nvar MessageInstance;\nvar MessageContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageList\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.MessageList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} conversationSid -\n *          The unique ID of the Conversation for this message.\n */\n/* jshint ignore:end */\nMessageList = function MessageList(version, conversationSid) {\n  /* jshint ignore:start */\n  /**\n   * @function messages\n   * @memberof Twilio.Conversations.V1.ConversationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  function MessageListInstance(sid) {\n    return MessageListInstance.get(sid);\n  }\n\n  MessageListInstance._version = version;\n  // Path Solution\n  MessageListInstance._solution = {conversationSid: conversationSid};\n  MessageListInstance._uri = `/Conversations/${conversationSid}/Messages`;\n  /* jshint ignore:start */\n  /**\n   * create a MessageInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.author] -\n   *          The channel specific identifier of the message's author.\n   * @param {string} [opts.body] - The content of the message.\n   * @param {Date} [opts.dateCreated] - The date that this resource was created.\n   * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n   * @param {string} [opts.attributes] -\n   *          A string metadata field you can use to store any data you wish.\n   * @param {string} [opts.mediaSid] -\n   *          The Media SID to be attached to the new Message.\n   * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MessageInstance\n   */\n  /* jshint ignore:end */\n  MessageListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Author': _.get(opts, 'author'),\n      'Body': _.get(opts, 'body'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'Attributes': _.get(opts, 'attributes'),\n      'MediaSid': _.get(opts, 'mediaSid')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInstance(\n        this._version,\n        payload,\n        this._solution.conversationSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MessageInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MessageListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MessageInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a message\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  MessageListInstance.get = function get(sid) {\n    return new MessageContext(this._version, this._solution.conversationSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ConversationContext.MessageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessageListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessageListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagePage\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.MessagePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessageSolution} solution - Path solution\n *\n * @returns MessagePage\n */\n/* jshint ignore:end */\nMessagePage = function MessagePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessagePage.prototype, Page.prototype);\nMessagePage.prototype.constructor = MessagePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessageInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ConversationContext.MessagePage#\n *\n * @param {MessagePayload} payload - Payload response from the API\n *\n * @returns MessageInstance\n */\n/* jshint ignore:end */\nMessagePage.prototype.getInstance = function getInstance(payload) {\n  return new MessageInstance(this._version, payload, this._solution.conversationSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.MessagePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.MessageInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this message.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {number} index - The index of the message within the Conversation.\n * @property {string} author -\n *          The channel specific identifier of the message's author.\n * @property {string} body - The content of the message.\n * @property {object} media -\n *          An array of objects that describe the Message's media if attached, otherwise, null.\n * @property {string} attributes -\n *          A string metadata field you can use to store any data you wish.\n * @property {string} participantSid -\n *          The unique ID of messages's author participant.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {string} url - An absolute API URL for this message.\n * @property {object} delivery -\n *          An object that contains the summary of delivery statuses for the message to non-chat participants.\n * @property {string} links - Absolute URL to access the receipts of this message.\n *\n * @param {V1} version - Version of the resource\n * @param {MessagePayload} payload - The instance payload\n * @param {sid} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nMessageInstance = function MessageInstance(version, payload, conversationSid,\n                                            sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.index = deserialize.integer(payload.index); // jshint ignore:line\n  this.author = payload.author; // jshint ignore:line\n  this.body = payload.body; // jshint ignore:line\n  this.media = payload.media; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.delivery = payload.delivery; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {conversationSid: conversationSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MessageInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MessageContext(\n          this._version,\n          this._solution.conversationSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.author] -\n *          The channel specific identifier of the message's author.\n * @param {string} [opts.body] - The content of the message.\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          A string metadata field you can use to store any data you wish.\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the deliveryReceipts\n *\n * @function deliveryReceipts\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageInstance#\n *\n * @returns {Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptList}\n */\n/* jshint ignore:end */\nMessageInstance.prototype.deliveryReceipts = function deliveryReceipts() {\n  return this._proxy.deliveryReceipts;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessageInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.MessageContext\n *\n * @property {Twilio.Conversations.V1.ConversationContext.MessageContext.DeliveryReceiptList} deliveryReceipts -\n *          deliveryReceipts resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nMessageContext = function MessageContext(version, conversationSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {conversationSid: conversationSid, sid: sid, };\n  this._uri = `/Conversations/${conversationSid}/Messages/${sid}`;\n\n  // Dependents\n  this._deliveryReceipts = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.author] -\n *          The channel specific identifier of the message's author.\n * @param {string} [opts.body] - The content of the message.\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          A string metadata field you can use to store any data you wish.\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Author': _.get(opts, 'author'),\n    'Body': _.get(opts, 'body'),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'Attributes': _.get(opts, 'attributes')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(MessageContext.prototype,\n  'deliveryReceipts', {\n    get: function() {\n      if (!this._deliveryReceipts) {\n        this._deliveryReceipts = new DeliveryReceiptList(\n          this._version,\n          this._solution.conversationSid,\n          this._solution.sid\n        );\n      }\n      return this._deliveryReceipts;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.MessageContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMessageContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessageList: MessageList,\n  MessagePage: MessagePage,\n  MessageInstance: MessageInstance,\n  MessageContext: MessageContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ParticipantList;\nvar ParticipantPage;\nvar ParticipantInstance;\nvar ParticipantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantList\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.ParticipantList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} conversationSid -\n *          The unique ID of the Conversation for this participant.\n */\n/* jshint ignore:end */\nParticipantList = function ParticipantList(version, conversationSid) {\n  /* jshint ignore:start */\n  /**\n   * @function participants\n   * @memberof Twilio.Conversations.V1.ConversationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  function ParticipantListInstance(sid) {\n    return ParticipantListInstance.get(sid);\n  }\n\n  ParticipantListInstance._version = version;\n  // Path Solution\n  ParticipantListInstance._solution = {conversationSid: conversationSid};\n  ParticipantListInstance._uri = `/Conversations/${conversationSid}/Participants`;\n  /* jshint ignore:start */\n  /**\n   * create a ParticipantInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.identity] -\n   *          A unique string identifier for the conversation participant as Conversation User.\n   * @param {string} [opts.messagingBinding.address] -\n   *          The address of the participant's device.\n   * @param {string} [opts.messagingBinding.proxyAddress] -\n   *          The address of the Twilio phone number that the participant is in contact with.\n   * @param {Date} [opts.dateCreated] - The date that this resource was created.\n   * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n   * @param {string} [opts.attributes] -\n   *          An optional string metadata field you can use to store any data you wish.\n   * @param {string} [opts.messagingBinding.projectedAddress] -\n   *          The address of the Twilio phone number that is used in Group MMS.\n   * @param {string} [opts.roleSid] -\n   *          The SID of a conversation-level Role to assign to the participant\n   * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ParticipantInstance\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'MessagingBinding.Address': _.get(opts, 'messagingBinding.address'),\n      'MessagingBinding.ProxyAddress': _.get(opts, 'messagingBinding.proxyAddress'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'Attributes': _.get(opts, 'attributes'),\n      'MessagingBinding.ProjectedAddress': _.get(opts, 'messagingBinding.projectedAddress'),\n      'RoleSid': _.get(opts, 'roleSid')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantInstance(\n        this._version,\n        payload,\n        this._solution.conversationSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ParticipantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ParticipantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a participant\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.get = function get(sid) {\n    return new ParticipantContext(this._version, this._solution.conversationSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ParticipantListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ParticipantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantPage\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.ParticipantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ParticipantSolution} solution - Path solution\n *\n * @returns ParticipantPage\n */\n/* jshint ignore:end */\nParticipantPage = function ParticipantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ParticipantPage.prototype, Page.prototype);\nParticipantPage.prototype.constructor = ParticipantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ParticipantInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantPage#\n *\n * @param {ParticipantPayload} payload - Payload response from the API\n *\n * @returns ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantPage.prototype.getInstance = function getInstance(payload) {\n  return new ParticipantInstance(this._version, payload, this._solution.conversationSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.ParticipantInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this participant.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this participant.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} identity -\n *          A unique string identifier for the conversation participant as Conversation User.\n * @property {string} attributes -\n *          An optional string metadata field you can use to store any data you wish.\n * @property {object} messagingBinding -\n *          Information about how this participant exchanges messages with the conversation.\n * @property {string} roleSid -\n *          The SID of a conversation-level Role to assign to the participant\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {string} url - An absolute URL for this participant.\n * @property {number} lastReadMessageIndex -\n *          Index of last \u201Cread\u201D message in the Conversation for the Participant.\n * @property {string} lastReadTimestamp -\n *          Timestamp of last \u201Cread\u201D message in the Conversation for the Participant.\n *\n * @param {V1} version - Version of the resource\n * @param {ParticipantPayload} payload - The instance payload\n * @param {sid} conversationSid -\n *          The unique ID of the Conversation for this participant.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nParticipantInstance = function ParticipantInstance(version, payload,\n                                                    conversationSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.messagingBinding = payload.messaging_binding; // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.lastReadMessageIndex = deserialize.integer(payload.last_read_message_index); // jshint ignore:line\n  this.lastReadTimestamp = payload.last_read_timestamp; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {conversationSid: conversationSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ParticipantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ParticipantContext(\n          this._version,\n          this._solution.conversationSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a ParticipantInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          An optional string metadata field you can use to store any data you wish.\n * @param {string} [opts.roleSid] -\n *          The SID of a conversation-level Role to assign to the participant\n * @param {string} [opts.messagingBinding.proxyAddress] -\n *          The address of the Twilio phone number that the participant is in contact with.\n * @param {string} [opts.messagingBinding.projectedAddress] -\n *          The address of the Twilio phone number that is used in Group MMS.\n * @param {string} [opts.identity] -\n *          A unique string identifier for the conversation participant as Conversation User.\n * @param {number} [opts.lastReadMessageIndex] -\n *          Index of last \u201Cread\u201D message in the Conversation for the Participant.\n * @param {string} [opts.lastReadTimestamp] -\n *          Timestamp of last \u201Cread\u201D message in the Conversation for the Participant.\n * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ParticipantInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.ParticipantContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} conversationSid -\n *          The unique ID of the Conversation for this participant.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nParticipantContext = function ParticipantContext(version, conversationSid, sid)\n                                                  {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {conversationSid: conversationSid, sid: sid, };\n  this._uri = `/Conversations/${conversationSid}/Participants/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a ParticipantInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          An optional string metadata field you can use to store any data you wish.\n * @param {string} [opts.roleSid] -\n *          The SID of a conversation-level Role to assign to the participant\n * @param {string} [opts.messagingBinding.proxyAddress] -\n *          The address of the Twilio phone number that the participant is in contact with.\n * @param {string} [opts.messagingBinding.projectedAddress] -\n *          The address of the Twilio phone number that is used in Group MMS.\n * @param {string} [opts.identity] -\n *          A unique string identifier for the conversation participant as Conversation User.\n * @param {number} [opts.lastReadMessageIndex] -\n *          Index of last \u201Cread\u201D message in the Conversation for the Participant.\n * @param {string} [opts.lastReadTimestamp] -\n *          Timestamp of last \u201Cread\u201D message in the Conversation for the Participant.\n * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'Attributes': _.get(opts, 'attributes'),\n    'RoleSid': _.get(opts, 'roleSid'),\n    'MessagingBinding.ProxyAddress': _.get(opts, 'messagingBinding.proxyAddress'),\n    'MessagingBinding.ProjectedAddress': _.get(opts, 'messagingBinding.projectedAddress'),\n    'Identity': _.get(opts, 'identity'),\n    'LastReadMessageIndex': _.get(opts, 'lastReadMessageIndex'),\n    'LastReadTimestamp': _.get(opts, 'lastReadTimestamp')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ParticipantInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.ParticipantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nParticipantContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ParticipantList: ParticipantList,\n  ParticipantPage: ParticipantPage,\n  ParticipantInstance: ParticipantInstance,\n  ParticipantContext: ParticipantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar WebhookList;\nvar WebhookPage;\nvar WebhookInstance;\nvar WebhookContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookList\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.WebhookList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} conversationSid -\n *          The unique ID of the Conversation for this webhook.\n */\n/* jshint ignore:end */\nWebhookList = function WebhookList(version, conversationSid) {\n  /* jshint ignore:start */\n  /**\n   * @function webhooks\n   * @memberof Twilio.Conversations.V1.ConversationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  function WebhookListInstance(sid) {\n    return WebhookListInstance.get(sid);\n  }\n\n  WebhookListInstance._version = version;\n  // Path Solution\n  WebhookListInstance._solution = {conversationSid: conversationSid};\n  WebhookListInstance._uri = `/Conversations/${conversationSid}/Webhooks`;\n  /* jshint ignore:start */\n  /**\n   * Streams WebhookInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ConversationContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WebhookInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ConversationContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ConversationContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ConversationContext.WebhookList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a WebhookInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ConversationContext.WebhookList#\n   *\n   * @param {object} opts - Options for request\n   * @param {webhook.target} opts.target - The target of this webhook.\n   * @param {string} [opts.configuration.url] -\n   *          The absolute url the webhook request should be sent to.\n   * @param {webhook.method} [opts.configuration.method] -\n   *          The HTTP method to be used when sending a webhook request.\n   * @param {string|list} [opts.configuration.filters] -\n   *          The list of events, firing webhook event for this Conversation.\n   * @param {string|list} [opts.configuration.triggers] -\n   *          The list of keywords, firing webhook event for this Conversation.\n   * @param {string} [opts.configuration.flowSid] -\n   *          The studio flow SID, where the webhook should be sent to.\n   * @param {number} [opts.configuration.replayAfter] -\n   *          The message index for which and it's successors the webhook will be replayed.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WebhookInstance\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['target'])) {\n      throw new Error('Required parameter \"opts[\\'target\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Target': _.get(opts, 'target'),\n      'Configuration.Url': _.get(opts, 'configuration.url'),\n      'Configuration.Method': _.get(opts, 'configuration.method'),\n      'Configuration.Filters': serialize.map(_.get(opts, 'configuration.filters'), function(e) { return e; }),\n      'Configuration.Triggers': serialize.map(_.get(opts, 'configuration.triggers'), function(e) { return e; }),\n      'Configuration.FlowSid': _.get(opts, 'configuration.flowSid'),\n      'Configuration.ReplayAfter': _.get(opts, 'configuration.replayAfter')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookInstance(\n        this._version,\n        payload,\n        this._solution.conversationSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a webhook\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ConversationContext.WebhookList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.get = function get(sid) {\n    return new WebhookContext(this._version, this._solution.conversationSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ConversationContext.WebhookList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WebhookListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WebhookListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookPage\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.WebhookPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WebhookSolution} solution - Path solution\n *\n * @returns WebhookPage\n */\n/* jshint ignore:end */\nWebhookPage = function WebhookPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WebhookPage.prototype, Page.prototype);\nWebhookPage.prototype.constructor = WebhookPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WebhookInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookPage#\n *\n * @param {WebhookPayload} payload - Payload response from the API\n *\n * @returns WebhookInstance\n */\n/* jshint ignore:end */\nWebhookPage.prototype.getInstance = function getInstance(payload) {\n  return new WebhookInstance(this._version, payload, this._solution.conversationSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.WebhookInstance\n *\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this conversation.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this webhook.\n * @property {string} target - The target of this webhook.\n * @property {string} url - An absolute URL for this webhook.\n * @property {object} configuration - The configuration of this webhook.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n *\n * @param {V1} version - Version of the resource\n * @param {WebhookPayload} payload - The instance payload\n * @param {sid} conversationSid -\n *          The unique ID of the Conversation for this webhook.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nWebhookInstance = function WebhookInstance(version, payload, conversationSid,\n                                            sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.target = payload.target; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.configuration = payload.configuration; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {conversationSid: conversationSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(WebhookInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WebhookContext(\n          this._version,\n          this._solution.conversationSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.configuration.url] -\n *          The absolute url the webhook request should be sent to.\n * @param {webhook.method} [opts.configuration.method] -\n *          The HTTP method to be used when sending a webhook request.\n * @param {string|list} [opts.configuration.filters] -\n *          The list of events, firing webhook event for this Conversation.\n * @param {string|list} [opts.configuration.triggers] -\n *          The list of keywords, firing webhook event for this Conversation.\n * @param {string} [opts.configuration.flowSid] -\n *          The studio flow SID, where the webhook should be sent to.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Conversations.V1.ConversationContext.WebhookContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} conversationSid -\n *          The unique ID of the Conversation for this webhook.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nWebhookContext = function WebhookContext(version, conversationSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {conversationSid: conversationSid, sid: sid, };\n  this._uri = `/Conversations/${conversationSid}/Webhooks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.configuration.url] -\n *          The absolute url the webhook request should be sent to.\n * @param {webhook.method} [opts.configuration.method] -\n *          The HTTP method to be used when sending a webhook request.\n * @param {string|list} [opts.configuration.filters] -\n *          The list of events, firing webhook event for this Conversation.\n * @param {string|list} [opts.configuration.triggers] -\n *          The list of keywords, firing webhook event for this Conversation.\n * @param {string} [opts.configuration.flowSid] -\n *          The studio flow SID, where the webhook should be sent to.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Configuration.Url': _.get(opts, 'configuration.url'),\n    'Configuration.Method': _.get(opts, 'configuration.method'),\n    'Configuration.Filters': serialize.map(_.get(opts, 'configuration.filters'), function(e) { return e; }),\n    'Configuration.Triggers': serialize.map(_.get(opts, 'configuration.triggers'), function(e) { return e; }),\n    'Configuration.FlowSid': _.get(opts, 'configuration.flowSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext.WebhookContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWebhookContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WebhookList: WebhookList,\n  WebhookPage: WebhookPage,\n  WebhookInstance: WebhookInstance,\n  WebhookContext: WebhookContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar MessageList = require('./conversation/message').MessageList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar ParticipantList = require('./conversation/participant').ParticipantList;\nvar WebhookList = require('./conversation/webhook').WebhookList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ConversationList;\nvar ConversationPage;\nvar ConversationInstance;\nvar ConversationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConversationList\n *\n * @constructor Twilio.Conversations.V1.ConversationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nConversationList = function ConversationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function conversations\n   * @memberof Twilio.Conversations.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext}\n   */\n  /* jshint ignore:end */\n  function ConversationListInstance(sid) {\n    return ConversationListInstance.get(sid);\n  }\n\n  ConversationListInstance._version = version;\n  // Path Solution\n  ConversationListInstance._solution = {};\n  ConversationListInstance._uri = `/Conversations`;\n  /* jshint ignore:start */\n  /**\n   * create a ConversationInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The human-readable name of this conversation.\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {Date} [opts.dateCreated] - The date that this resource was created.\n   * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n   * @param {string} [opts.messagingServiceSid] -\n   *          The unique ID of the Messaging Service this conversation belongs to.\n   * @param {string} [opts.attributes] -\n   *          An optional string metadata field you can use to store any data you wish.\n   * @param {conversation.state} [opts.state] - Current state of this conversation.\n   * @param {string} [opts.timers.inactive] -\n   *          ISO8601 duration when conversation will be switched to `inactive` state.\n   * @param {string} [opts.timers.closed] -\n   *          ISO8601 duration when conversation will be switched to `closed` state.\n   * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ConversationInstance\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'MessagingServiceSid': _.get(opts, 'messagingServiceSid'),\n      'Attributes': _.get(opts, 'attributes'),\n      'State': _.get(opts, 'state'),\n      'Timers.Inactive': _.get(opts, 'timers.inactive'),\n      'Timers.Closed': _.get(opts, 'timers.closed')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConversationInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ConversationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ConversationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ConversationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a conversation\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ConversationList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ConversationContext}\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.get = function get(sid) {\n    return new ConversationContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ConversationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConversationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConversationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConversationPage\n *\n * @constructor Twilio.Conversations.V1.ConversationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConversationSolution} solution - Path solution\n *\n * @returns ConversationPage\n */\n/* jshint ignore:end */\nConversationPage = function ConversationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConversationPage.prototype, Page.prototype);\nConversationPage.prototype.constructor = ConversationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConversationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ConversationPage#\n *\n * @param {ConversationPayload} payload - Payload response from the API\n *\n * @returns ConversationInstance\n */\n/* jshint ignore:end */\nConversationPage.prototype.getInstance = function getInstance(payload) {\n  return new ConversationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConversationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConversationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConversationContext\n *\n * @constructor Twilio.Conversations.V1.ConversationInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this conversation.\n * @property {string} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n * @property {string} messagingServiceSid -\n *          The unique ID of the Messaging Service this conversation belongs to.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} friendlyName - The human-readable name of this conversation.\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} attributes -\n *          An optional string metadata field you can use to store any data you wish.\n * @property {conversation.state} state - Current state of this conversation.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {object} timers - Timer date values for this conversation.\n * @property {string} url - An absolute URL for this conversation.\n * @property {string} links -\n *          Absolute URLs to access the participants, messages and webhooks of this conversation.\n * @property {object} bindings - The bindings\n *\n * @param {V1} version - Version of the resource\n * @param {ConversationPayload} payload - The instance payload\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nConversationInstance = function ConversationInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.state = payload.state; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.timers = payload.timers; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.bindings = payload.bindings; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ConversationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConversationContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a ConversationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConversationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human-readable name of this conversation.\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          An optional string metadata field you can use to store any data you wish.\n * @param {string} [opts.messagingServiceSid] -\n *          The unique ID of the Messaging Service this conversation belongs to.\n * @param {conversation.state} [opts.state] - Current state of this conversation.\n * @param {string} [opts.timers.inactive] -\n *          ISO8601 duration when conversation will be switched to `inactive` state.\n * @param {string} [opts.timers.closed] -\n *          ISO8601 duration when conversation will be switched to `closed` state.\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConversationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ConversationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConversationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the participants\n *\n * @function participants\n * @memberof Twilio.Conversations.V1.ConversationInstance#\n *\n * @returns {Twilio.Conversations.V1.ConversationContext.ParticipantList}\n */\n/* jshint ignore:end */\nConversationInstance.prototype.participants = function participants() {\n  return this._proxy.participants;\n};\n\n/* jshint ignore:start */\n/**\n * Access the messages\n *\n * @function messages\n * @memberof Twilio.Conversations.V1.ConversationInstance#\n *\n * @returns {Twilio.Conversations.V1.ConversationContext.MessageList}\n */\n/* jshint ignore:end */\nConversationInstance.prototype.messages = function messages() {\n  return this._proxy.messages;\n};\n\n/* jshint ignore:start */\n/**\n * Access the webhooks\n *\n * @function webhooks\n * @memberof Twilio.Conversations.V1.ConversationInstance#\n *\n * @returns {Twilio.Conversations.V1.ConversationContext.WebhookList}\n */\n/* jshint ignore:end */\nConversationInstance.prototype.webhooks = function webhooks() {\n  return this._proxy.webhooks;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConversationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConversationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConversationContext\n *\n * @constructor Twilio.Conversations.V1.ConversationContext\n *\n * @property {Twilio.Conversations.V1.ConversationContext.ParticipantList} participants -\n *          participants resource\n * @property {Twilio.Conversations.V1.ConversationContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.Conversations.V1.ConversationContext.WebhookList} webhooks -\n *          webhooks resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nConversationContext = function ConversationContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Conversations/${sid}`;\n\n  // Dependents\n  this._participants = undefined;\n  this._messages = undefined;\n  this._webhooks = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a ConversationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ConversationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human-readable name of this conversation.\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          An optional string metadata field you can use to store any data you wish.\n * @param {string} [opts.messagingServiceSid] -\n *          The unique ID of the Messaging Service this conversation belongs to.\n * @param {conversation.state} [opts.state] - Current state of this conversation.\n * @param {string} [opts.timers.inactive] -\n *          ISO8601 duration when conversation will be switched to `inactive` state.\n * @param {string} [opts.timers.closed] -\n *          ISO8601 duration when conversation will be switched to `closed` state.\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'Attributes': _.get(opts, 'attributes'),\n    'MessagingServiceSid': _.get(opts, 'messagingServiceSid'),\n    'State': _.get(opts, 'state'),\n    'Timers.Inactive': _.get(opts, 'timers.inactive'),\n    'Timers.Closed': _.get(opts, 'timers.closed'),\n    'UniqueName': _.get(opts, 'uniqueName')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConversationInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConversationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ConversationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConversationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ConversationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConversationInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ConversationContext.prototype,\n  'participants', {\n    get: function() {\n      if (!this._participants) {\n        this._participants = new ParticipantList(this._version, this._solution.sid);\n      }\n      return this._participants;\n    }\n});\n\nObject.defineProperty(ConversationContext.prototype,\n  'messages', {\n    get: function() {\n      if (!this._messages) {\n        this._messages = new MessageList(this._version, this._solution.sid);\n      }\n      return this._messages;\n    }\n});\n\nObject.defineProperty(ConversationContext.prototype,\n  'webhooks', {\n    get: function() {\n      if (!this._webhooks) {\n        this._webhooks = new WebhookList(this._version, this._solution.sid);\n      }\n      return this._webhooks;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ConversationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConversationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConversationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConversationList: ConversationList,\n  ConversationPage: ConversationPage,\n  ConversationInstance: ConversationInstance,\n  ConversationContext: ConversationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CredentialList;\nvar CredentialPage;\nvar CredentialInstance;\nvar CredentialContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialList\n *\n * @constructor Twilio.Conversations.V1.CredentialList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCredentialList = function CredentialList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function credentials\n   * @memberof Twilio.Conversations.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.CredentialContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListInstance(sid) {\n    return CredentialListInstance.get(sid);\n  }\n\n  CredentialListInstance._version = version;\n  // Path Solution\n  CredentialListInstance._solution = {};\n  CredentialListInstance._uri = `/Credentials`;\n  /* jshint ignore:start */\n  /**\n   * create a CredentialInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.CredentialList#\n   *\n   * @param {object} opts - Options for request\n   * @param {credential.push_type} opts.type -\n   *          The type of push-notification service the credential is for.\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.certificate] -\n   *          [APN only] The URL encoded representation of the certificate.\n   * @param {string} [opts.privateKey] -\n   *          [APN only] The URL encoded representation of the private key.\n   * @param {boolean} [opts.sandbox] -\n   *          [APN only] Whether to send the credential to sandbox APNs.\n   * @param {string} [opts.apiKey] -\n   *          [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.\n   * @param {string} [opts.secret] -\n   *          [FCM only] The Server key of your project from Firebase console.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialInstance\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Certificate': _.get(opts, 'certificate'),\n      'PrivateKey': _.get(opts, 'privateKey'),\n      'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n      'ApiKey': _.get(opts, 'apiKey'),\n      'Secret': _.get(opts, 'secret')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.CredentialList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.CredentialList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.CredentialContext}\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.get = function get(sid) {\n    return new CredentialContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.CredentialList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialPage\n *\n * @constructor Twilio.Conversations.V1.CredentialPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialSolution} solution - Path solution\n *\n * @returns CredentialPage\n */\n/* jshint ignore:end */\nCredentialPage = function CredentialPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialPage.prototype, Page.prototype);\nCredentialPage.prototype.constructor = CredentialPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.CredentialPage#\n *\n * @param {CredentialPayload} payload - Payload response from the API\n *\n * @returns CredentialInstance\n */\n/* jshint ignore:end */\nCredentialPage.prototype.getInstance = function getInstance(payload) {\n  return new CredentialInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.CredentialPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.Conversations.V1.CredentialInstance\n *\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this credential.\n * @property {string} friendlyName - The human-readable name of this credential.\n * @property {credential.push_type} type -\n *          The type of push-notification service the credential is for.\n * @property {string} sandbox -\n *          [APN only] Whether to send the credential to sandbox APNs.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {string} url - An absolute URL for this credential.\n *\n * @param {V1} version - Version of the resource\n * @param {CredentialPayload} payload - The instance payload\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nCredentialInstance = function CredentialInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.sandbox = payload.sandbox; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CredentialInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.CredentialInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {credential.push_type} [opts.type] -\n *          The type of push-notification service the credential is for.\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.certificate] -\n *          [APN only] The URL encoded representation of the certificate.\n * @param {string} [opts.privateKey] -\n *          [APN only] The URL encoded representation of the private key.\n * @param {boolean} [opts.sandbox] -\n *          [APN only] Whether to send the credential to sandbox APNs.\n * @param {string} [opts.apiKey] -\n *          [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.\n * @param {string} [opts.secret] -\n *          [FCM only] The Server key of your project from Firebase console.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.CredentialInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.Conversations.V1.CredentialContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nCredentialContext = function CredentialContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Credentials/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.CredentialContext#\n *\n * @param {object} [opts] - Options for request\n * @param {credential.push_type} [opts.type] -\n *          The type of push-notification service the credential is for.\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.certificate] -\n *          [APN only] The URL encoded representation of the certificate.\n * @param {string} [opts.privateKey] -\n *          [APN only] The URL encoded representation of the private key.\n * @param {boolean} [opts.sandbox] -\n *          [APN only] Whether to send the credential to sandbox APNs.\n * @param {string} [opts.apiKey] -\n *          [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.\n * @param {string} [opts.secret] -\n *          [FCM only] The Server key of your project from Firebase console.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Type': _.get(opts, 'type'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Certificate': _.get(opts, 'certificate'),\n    'PrivateKey': _.get(opts, 'privateKey'),\n    'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n    'ApiKey': _.get(opts, 'apiKey'),\n    'Secret': _.get(opts, 'secret')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.CredentialContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialList: CredentialList,\n  CredentialPage: CredentialPage,\n  CredentialInstance: CredentialInstance,\n  CredentialContext: CredentialContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ParticipantConversationList;\nvar ParticipantConversationPage;\nvar ParticipantConversationInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantConversationList\n *\n * @constructor Twilio.Conversations.V1.ParticipantConversationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nParticipantConversationList = function ParticipantConversationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function participantConversations\n   * @memberof Twilio.Conversations.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ParticipantConversationContext}\n   */\n  /* jshint ignore:end */\n  function ParticipantConversationListInstance(sid) {\n    return ParticipantConversationListInstance.get(sid);\n  }\n\n  ParticipantConversationListInstance._version = version;\n  // Path Solution\n  ParticipantConversationListInstance._solution = {};\n  ParticipantConversationListInstance._uri = `/ParticipantConversations`;\n  /* jshint ignore:start */\n  /**\n   * Streams ParticipantConversationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ParticipantConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.identity] -\n   *          A unique string identifier for the conversation participant as Conversation User.\n   * @param {string} [opts.address] -\n   *          A unique string identifier for the conversation participant who's not a Conversation User.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ParticipantConversationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ParticipantConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.identity] -\n   *          A unique string identifier for the conversation participant as Conversation User.\n   * @param {string} [opts.address] -\n   *          A unique string identifier for the conversation participant who's not a Conversation User.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ParticipantConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ParticipantConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.identity] -\n   *          A unique string identifier for the conversation participant as Conversation User.\n   * @param {string} [opts.address] -\n   *          A unique string identifier for the conversation participant who's not a Conversation User.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'Address': _.get(opts, 'address'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ParticipantConversationInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ParticipantConversationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ParticipantConversationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ParticipantConversationListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ParticipantConversationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantConversationPage\n *\n * @constructor Twilio.Conversations.V1.ParticipantConversationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ParticipantConversationSolution} solution - Path solution\n *\n * @returns ParticipantConversationPage\n */\n/* jshint ignore:end */\nParticipantConversationPage = function ParticipantConversationPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ParticipantConversationPage.prototype, Page.prototype);\nParticipantConversationPage.prototype.constructor = ParticipantConversationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ParticipantConversationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ParticipantConversationPage#\n *\n * @param {ParticipantConversationPayload} payload - Payload response from the API\n *\n * @returns ParticipantConversationInstance\n */\n/* jshint ignore:end */\nParticipantConversationPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new ParticipantConversationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ParticipantConversationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantConversationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantConversationPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantConversationContext\n *\n * @constructor Twilio.Conversations.V1.ParticipantConversationInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this conversation.\n * @property {string} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n * @property {string} participantSid - The unique ID of the Participant.\n * @property {string} participantUserSid -\n *          The unique ID for the conversation participant as Conversation User.\n * @property {string} participantIdentity -\n *          A unique string identifier for the conversation participant as Conversation User.\n * @property {object} participantMessagingBinding -\n *          Information about how this participant exchanges messages with the conversation.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation this Participant belongs to.\n * @property {string} conversationUniqueName -\n *          An application-defined string that uniquely identifies the Conversation resource\n * @property {string} conversationFriendlyName -\n *          The human-readable name of this conversation.\n * @property {string} conversationAttributes -\n *          An optional string metadata field you can use to store any data you wish.\n * @property {Date} conversationDateCreated -\n *          The date that this conversation was created.\n * @property {Date} conversationDateUpdated -\n *          The date that this conversation was last updated.\n * @property {string} conversationCreatedBy - Creator of this conversation.\n * @property {participant_conversation.state} conversationState -\n *          The current state of this User Conversation\n * @property {object} conversationTimers - Timer date values for this conversation.\n * @property {string} links -\n *          Absolute URLs to access the participant and conversation of this Participant Conversation.\n *\n * @param {V1} version - Version of the resource\n * @param {ParticipantConversationPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nParticipantConversationInstance = function\n    ParticipantConversationInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.participantUserSid = payload.participant_user_sid; // jshint ignore:line\n  this.participantIdentity = payload.participant_identity; // jshint ignore:line\n  this.participantMessagingBinding = payload.participant_messaging_binding; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.conversationUniqueName = payload.conversation_unique_name; // jshint ignore:line\n  this.conversationFriendlyName = payload.conversation_friendly_name; // jshint ignore:line\n  this.conversationAttributes = payload.conversation_attributes; // jshint ignore:line\n  this.conversationDateCreated = deserialize.iso8601DateTime(payload.conversation_date_created); // jshint ignore:line\n  this.conversationDateUpdated = deserialize.iso8601DateTime(payload.conversation_date_updated); // jshint ignore:line\n  this.conversationCreatedBy = payload.conversation_created_by; // jshint ignore:line\n  this.conversationState = payload.conversation_state; // jshint ignore:line\n  this.conversationTimers = payload.conversation_timers; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ParticipantConversationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantConversationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantConversationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ParticipantConversationList: ParticipantConversationList,\n  ParticipantConversationPage: ParticipantConversationPage,\n  ParticipantConversationInstance: ParticipantConversationInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar RoleList;\nvar RolePage;\nvar RoleInstance;\nvar RoleContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleList\n *\n * @constructor Twilio.Conversations.V1.RoleList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nRoleList = function RoleList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function roles\n   * @memberof Twilio.Conversations.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.RoleContext}\n   */\n  /* jshint ignore:end */\n  function RoleListInstance(sid) {\n    return RoleListInstance.get(sid);\n  }\n\n  RoleListInstance._version = version;\n  // Path Solution\n  RoleListInstance._solution = {};\n  RoleListInstance._uri = `/Roles`;\n  /* jshint ignore:start */\n  /**\n   * create a RoleInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.RoleList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the new resource\n   * @param {role.role_type} opts.type - The type of role\n   * @param {string|list} opts.permission - A permission the role should have\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RoleInstance\n   */\n  /* jshint ignore:end */\n  RoleListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n    if (_.isUndefined(opts['permission'])) {\n      throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoleInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams RoleInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RoleListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RoleInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.RoleList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a role\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.RoleList#\n   *\n   * @param {string} sid - The SID of the Role resource to fetch\n   *\n   * @returns {Twilio.Conversations.V1.RoleContext}\n   */\n  /* jshint ignore:end */\n  RoleListInstance.get = function get(sid) {\n    return new RoleContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.RoleList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RoleListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RoleListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RoleListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RolePage\n *\n * @constructor Twilio.Conversations.V1.RolePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RoleSolution} solution - Path solution\n *\n * @returns RolePage\n */\n/* jshint ignore:end */\nRolePage = function RolePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RolePage.prototype, Page.prototype);\nRolePage.prototype.constructor = RolePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RoleInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.RolePage#\n *\n * @param {RolePayload} payload - Payload response from the API\n *\n * @returns RoleInstance\n */\n/* jshint ignore:end */\nRolePage.prototype.getInstance = function getInstance(payload) {\n  return new RoleInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.RolePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRolePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRolePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.Conversations.V1.RoleInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {role.role_type} type - The type of role\n * @property {string} permissions -\n *          An array of the permissions the role has been granted\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - An absolute URL for this user role.\n *\n * @param {V1} version - Version of the resource\n * @param {RolePayload} payload - The instance payload\n * @param {sid} sid - The SID of the Role resource to fetch\n */\n/* jshint ignore:end */\nRoleInstance = function RoleInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.permissions = payload.permissions; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(RoleInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RoleContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.RoleInstance#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - A permission the role should have\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.RoleInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoleInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.Conversations.V1.RoleContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID of the Role resource to fetch\n */\n/* jshint ignore:end */\nRoleContext = function RoleContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Roles/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.RoleContext#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - A permission the role should have\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['permission'])) {\n    throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.RoleContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRoleContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RoleList: RoleList,\n  RolePage: RolePage,\n  RoleInstance: RoleInstance,\n  RoleContext: RoleContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BindingList;\nvar BindingPage;\nvar BindingInstance;\nvar BindingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.BindingList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n */\n/* jshint ignore:end */\nBindingList = function BindingList(version, chatServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function bindings\n   * @memberof Twilio.Conversations.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.BindingContext}\n   */\n  /* jshint ignore:end */\n  function BindingListInstance(sid) {\n    return BindingListInstance.get(sid);\n  }\n\n  BindingListInstance._version = version;\n  // Path Solution\n  BindingListInstance._solution = {chatServiceSid: chatServiceSid};\n  BindingListInstance._uri = `/Services/${chatServiceSid}/Bindings`;\n  /* jshint ignore:start */\n  /**\n   * Streams BindingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {binding.binding_type|list} [opts.bindingType] -\n   *          The push technology used by the Binding resources to read.\n   * @param {string|list} [opts.identity] -\n   *          The identity of Conversation User associated with this binding.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BindingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BindingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {binding.binding_type|list} [opts.bindingType] -\n   *          The push technology used by the Binding resources to read.\n   * @param {string|list} [opts.identity] -\n   *          The identity of Conversation User associated with this binding.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {binding.binding_type|list} [opts.bindingType] -\n   *          The push technology used by the Binding resources to read.\n   * @param {string|list} [opts.identity] -\n   *          The identity of Conversation User associated with this binding.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'BindingType': serialize.map(_.get(opts, 'bindingType'), function(e) { return e; }),\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.BindingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a binding\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.BindingList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.BindingContext}\n   */\n  /* jshint ignore:end */\n  BindingListInstance.get = function get(sid) {\n    return new BindingContext(this._version, this._solution.chatServiceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.BindingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BindingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BindingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BindingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.BindingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BindingSolution} solution - Path solution\n *\n * @returns BindingPage\n */\n/* jshint ignore:end */\nBindingPage = function BindingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BindingPage.prototype, Page.prototype);\nBindingPage.prototype.constructor = BindingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BindingInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.BindingPage#\n *\n * @param {BindingPayload} payload - Payload response from the API\n *\n * @returns BindingInstance\n */\n/* jshint ignore:end */\nBindingPage.prototype.getInstance = function getInstance(payload) {\n  return new BindingInstance(this._version, payload, this._solution.chatServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.BindingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBindingPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.BindingInstance\n *\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this binding.\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @property {string} credentialSid - The SID of the Credential for the binding.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {string} endpoint - The unique endpoint identifier for the Binding.\n * @property {string} identity -\n *          The identity of Conversation User associated with this binding.\n * @property {binding.binding_type} bindingType -\n *          The push technology to use for the binding.\n * @property {string} messageTypes -\n *          The Conversation message types the binding is subscribed to.\n * @property {string} url - An absolute URL for this binding.\n *\n * @param {V1} version - Version of the resource\n * @param {BindingPayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nBindingInstance = function BindingInstance(version, payload, chatServiceSid,\n                                            sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.credentialSid = payload.credential_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.endpoint = payload.endpoint; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.bindingType = payload.binding_type; // jshint ignore:line\n  this.messageTypes = payload.message_types; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {chatServiceSid: chatServiceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(BindingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BindingContext(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a BindingInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.BindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BindingInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.BindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.BindingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBindingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.BindingContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nBindingContext = function BindingContext(version, chatServiceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, sid: sid, };\n  this._uri = `/Services/${chatServiceSid}/Bindings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a BindingInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.BindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BindingInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.BindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BindingInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.BindingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBindingContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BindingList: BindingList,\n  BindingPage: BindingPage,\n  BindingInstance: BindingInstance,\n  BindingContext: BindingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar NotificationList;\nvar NotificationPage;\nvar NotificationInstance;\nvar NotificationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nNotificationList = function NotificationList(version, chatServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function notifications\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationContext}\n   */\n  /* jshint ignore:end */\n  function NotificationListInstance(sid) {\n    return NotificationListInstance.get(sid);\n  }\n\n  NotificationListInstance._version = version;\n  // Path Solution\n  NotificationListInstance._solution = {chatServiceSid: chatServiceSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a notification\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationList#\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationContext}\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.get = function get() {\n    return new NotificationContext(this._version, this._solution.chatServiceSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NotificationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NotificationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NotificationSolution} solution - Path solution\n *\n * @returns NotificationPage\n */\n/* jshint ignore:end */\nNotificationPage = function NotificationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NotificationPage.prototype, Page.prototype);\nNotificationPage.prototype.constructor = NotificationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NotificationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationPage#\n *\n * @param {NotificationPayload} payload - Payload response from the API\n *\n * @returns NotificationInstance\n */\n/* jshint ignore:end */\nNotificationPage.prototype.getInstance = function getInstance(payload) {\n  return new NotificationInstance(this._version, payload, this._solution.chatServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this configuration.\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the Configuration applies to.\n * @property {object} newMessage -\n *          The Push Notification configuration for New Messages.\n * @property {object} addedToConversation -\n *          The Push Notification configuration for being added to a Conversation.\n * @property {object} removedFromConversation -\n *          The Push Notification configuration for being removed from a Conversation.\n * @property {boolean} logEnabled - Weather the notification logging is enabled.\n * @property {string} url - An absolute URL for this configuration.\n *\n * @param {V1} version - Version of the resource\n * @param {NotificationPayload} payload - The instance payload\n * @param {sid} chatServiceSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nNotificationInstance = function NotificationInstance(version, payload,\n                                                      chatServiceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.newMessage = payload.new_message; // jshint ignore:line\n  this.addedToConversation = payload.added_to_conversation; // jshint ignore:line\n  this.removedFromConversation = payload.removed_from_conversation; // jshint ignore:line\n  this.logEnabled = payload.log_enabled; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {chatServiceSid: chatServiceSid, };\n};\n\nObject.defineProperty(NotificationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new NotificationContext(this._version, this._solution.chatServiceSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a NotificationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.logEnabled] -\n *          Weather the notification logging is enabled.\n * @param {boolean} [opts.newMessage.enabled] -\n *          Whether to send a notification when a new message is added to a conversation.\n * @param {string} [opts.newMessage.template] -\n *          The template to use to create the notification text displayed when a new message is added to a conversation.\n * @param {string} [opts.newMessage.sound] -\n *          The name of the sound to play when a new message is added to a conversation.\n * @param {boolean} [opts.newMessage.badgeCountEnabled] -\n *          Whether the new message badge is enabled.\n * @param {boolean} [opts.addedToConversation.enabled] -\n *          Whether to send a notification when a participant is added to a conversation.\n * @param {string} [opts.addedToConversation.template] -\n *          The template to use to create the notification text displayed when a participant is added to a conversation.\n * @param {string} [opts.addedToConversation.sound] -\n *          The name of the sound to play when a participant is added to a conversation.\n * @param {boolean} [opts.removedFromConversation.enabled] -\n *          Whether to send a notification to a user when they are removed from a conversation.\n * @param {string} [opts.removedFromConversation.template] -\n *          The template to use to create the notification text displayed to a user when they are removed.\n * @param {string} [opts.removedFromConversation.sound] -\n *          The name of the sound to play to a user when they are removed from a conversation.\n * @param {boolean} [opts.newMessage.withMedia.enabled] -\n *          Whether to send a notification when a new message with media/file attachments is added to a conversation.\n * @param {string} [opts.newMessage.withMedia.template] -\n *          The template to use to create the notification text displayed when a new message with media/file attachments is added to a conversation.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NotificationInstance\n */\n/* jshint ignore:end */\nNotificationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NotificationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NotificationInstance\n */\n/* jshint ignore:end */\nNotificationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the Configuration applies to.\n */\n/* jshint ignore:end */\nNotificationContext = function NotificationContext(version, chatServiceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, };\n  this._uri = `/Services/${chatServiceSid}/Configuration/Notifications`;\n};\n\n/* jshint ignore:start */\n/**\n * update a NotificationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.logEnabled] -\n *          Weather the notification logging is enabled.\n * @param {boolean} [opts.newMessage.enabled] -\n *          Whether to send a notification when a new message is added to a conversation.\n * @param {string} [opts.newMessage.template] -\n *          The template to use to create the notification text displayed when a new message is added to a conversation.\n * @param {string} [opts.newMessage.sound] -\n *          The name of the sound to play when a new message is added to a conversation.\n * @param {boolean} [opts.newMessage.badgeCountEnabled] -\n *          Whether the new message badge is enabled.\n * @param {boolean} [opts.addedToConversation.enabled] -\n *          Whether to send a notification when a participant is added to a conversation.\n * @param {string} [opts.addedToConversation.template] -\n *          The template to use to create the notification text displayed when a participant is added to a conversation.\n * @param {string} [opts.addedToConversation.sound] -\n *          The name of the sound to play when a participant is added to a conversation.\n * @param {boolean} [opts.removedFromConversation.enabled] -\n *          Whether to send a notification to a user when they are removed from a conversation.\n * @param {string} [opts.removedFromConversation.template] -\n *          The template to use to create the notification text displayed to a user when they are removed.\n * @param {string} [opts.removedFromConversation.sound] -\n *          The name of the sound to play to a user when they are removed from a conversation.\n * @param {boolean} [opts.newMessage.withMedia.enabled] -\n *          Whether to send a notification when a new message with media/file attachments is added to a conversation.\n * @param {string} [opts.newMessage.withMedia.template] -\n *          The template to use to create the notification text displayed when a new message with media/file attachments is added to a conversation.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NotificationInstance\n */\n/* jshint ignore:end */\nNotificationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'LogEnabled': serialize.bool(_.get(opts, 'logEnabled')),\n    'NewMessage.Enabled': serialize.bool(_.get(opts, 'newMessage.enabled')),\n    'NewMessage.Template': _.get(opts, 'newMessage.template'),\n    'NewMessage.Sound': _.get(opts, 'newMessage.sound'),\n    'NewMessage.BadgeCountEnabled': serialize.bool(_.get(opts, 'newMessage.badgeCountEnabled')),\n    'AddedToConversation.Enabled': serialize.bool(_.get(opts, 'addedToConversation.enabled')),\n    'AddedToConversation.Template': _.get(opts, 'addedToConversation.template'),\n    'AddedToConversation.Sound': _.get(opts, 'addedToConversation.sound'),\n    'RemovedFromConversation.Enabled': serialize.bool(_.get(opts, 'removedFromConversation.enabled')),\n    'RemovedFromConversation.Template': _.get(opts, 'removedFromConversation.template'),\n    'RemovedFromConversation.Sound': _.get(opts, 'removedFromConversation.sound'),\n    'NewMessage.WithMedia.Enabled': serialize.bool(_.get(opts, 'newMessage.withMedia.enabled')),\n    'NewMessage.WithMedia.Template': _.get(opts, 'newMessage.withMedia.template')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NotificationInstance(this._version, payload, this._solution.chatServiceSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NotificationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NotificationInstance\n */\n/* jshint ignore:end */\nNotificationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NotificationInstance(this._version, payload, this._solution.chatServiceSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.NotificationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nNotificationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NotificationList: NotificationList,\n  NotificationPage: NotificationPage,\n  NotificationInstance: NotificationInstance,\n  NotificationContext: NotificationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WebhookList;\nvar WebhookPage;\nvar WebhookInstance;\nvar WebhookContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nWebhookList = function WebhookList(version, chatServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function webhooks\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  function WebhookListInstance(sid) {\n    return WebhookListInstance.get(sid);\n  }\n\n  WebhookListInstance._version = version;\n  // Path Solution\n  WebhookListInstance._solution = {chatServiceSid: chatServiceSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a webhook\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookList#\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.get = function get() {\n    return new WebhookContext(this._version, this._solution.chatServiceSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WebhookListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WebhookListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WebhookSolution} solution - Path solution\n *\n * @returns WebhookPage\n */\n/* jshint ignore:end */\nWebhookPage = function WebhookPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WebhookPage.prototype, Page.prototype);\nWebhookPage.prototype.constructor = WebhookPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WebhookInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookPage#\n *\n * @param {WebhookPayload} payload - Payload response from the API\n *\n * @returns WebhookInstance\n */\n/* jshint ignore:end */\nWebhookPage.prototype.getInstance = function getInstance(payload) {\n  return new WebhookInstance(this._version, payload, this._solution.chatServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this service.\n * @property {string} chatServiceSid -\n *          The unique ID of the {@link https://www.twilio.com/docs/conversations/api/service-resource|Conversation Service} this conversation belongs to.\n * @property {string} preWebhookUrl -\n *          The absolute url the pre-event webhook request should be sent to.\n * @property {string} postWebhookUrl -\n *          The absolute url the post-event webhook request should be sent to.\n * @property {string} filters -\n *          The list of events that your configured webhook targets will receive. Events not configured here will not fire.\n * @property {webhook.method} method -\n *          The HTTP method to be used when sending a webhook request\n * @property {string} url - An absolute URL for this webhook.\n *\n * @param {V1} version - Version of the resource\n * @param {WebhookPayload} payload - The instance payload\n * @param {sid} chatServiceSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nWebhookInstance = function WebhookInstance(version, payload, chatServiceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.preWebhookUrl = payload.pre_webhook_url; // jshint ignore:line\n  this.postWebhookUrl = payload.post_webhook_url; // jshint ignore:line\n  this.filters = payload.filters; // jshint ignore:line\n  this.method = payload.method; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {chatServiceSid: chatServiceSid, };\n};\n\nObject.defineProperty(WebhookInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WebhookContext(this._version, this._solution.chatServiceSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.preWebhookUrl] -\n *          The absolute url the pre-event webhook request should be sent to.\n * @param {string} [opts.postWebhookUrl] -\n *          The absolute url the post-event webhook request should be sent to.\n * @param {string|list} [opts.filters] -\n *          The list of events that your configured webhook targets will receive. Events not configured here will not fire.\n * @param {string} [opts.method] -\n *          The HTTP method to be used when sending a webhook request\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The unique ID of the {@link https://www.twilio.com/docs/conversations/api/service-resource|Conversation Service} this conversation belongs to.\n */\n/* jshint ignore:end */\nWebhookContext = function WebhookContext(version, chatServiceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, };\n  this._uri = `/Services/${chatServiceSid}/Configuration/Webhooks`;\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.preWebhookUrl] -\n *          The absolute url the pre-event webhook request should be sent to.\n * @param {string} [opts.postWebhookUrl] -\n *          The absolute url the post-event webhook request should be sent to.\n * @param {string|list} [opts.filters] -\n *          The list of events that your configured webhook targets will receive. Events not configured here will not fire.\n * @param {string} [opts.method] -\n *          The HTTP method to be used when sending a webhook request\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'PreWebhookUrl': _.get(opts, 'preWebhookUrl'),\n    'PostWebhookUrl': _.get(opts, 'postWebhookUrl'),\n    'Filters': serialize.map(_.get(opts, 'filters'), function(e) { return e; }),\n    'Method': _.get(opts, 'method')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(this._version, payload, this._solution.chatServiceSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(this._version, payload, this._solution.chatServiceSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext.WebhookContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWebhookContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WebhookList: WebhookList,\n  WebhookPage: WebhookPage,\n  WebhookInstance: WebhookInstance,\n  WebhookContext: WebhookContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar NotificationList = require('./configuration/notification').NotificationList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar WebhookList = require('./configuration/webhook').WebhookList;\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ConfigurationList;\nvar ConfigurationPage;\nvar ConfigurationInstance;\nvar ConfigurationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nConfigurationList = function ConfigurationList(version, chatServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function configuration\n   * @memberof Twilio.Conversations.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConfigurationContext}\n   */\n  /* jshint ignore:end */\n  function ConfigurationListInstance(sid) {\n    return ConfigurationListInstance.get(sid);\n  }\n\n  ConfigurationListInstance._version = version;\n  // Path Solution\n  ConfigurationListInstance._solution = {chatServiceSid: chatServiceSid};\n\n  // Components\n  ConfigurationListInstance._notifications = undefined;\n  ConfigurationListInstance._webhooks = undefined;\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a configuration\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationList#\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConfigurationContext}\n   */\n  /* jshint ignore:end */\n  ConfigurationListInstance.get = function get() {\n    return new ConfigurationContext(this._version, this._solution.chatServiceSid);\n  };\n\n  Object.defineProperty(ConfigurationListInstance,\n    'notifications', {\n      get: function notifications() {\n        if (!this._notifications) {\n          this._notifications = new NotificationList(this._version, this._solution.chatServiceSid);\n        }\n\n        return this._notifications;\n      }\n  });\n\n  Object.defineProperty(ConfigurationListInstance,\n    'webhooks', {\n      get: function webhooks() {\n        if (!this._webhooks) {\n          this._webhooks = new WebhookList(this._version, this._solution.chatServiceSid);\n        }\n\n        return this._webhooks;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConfigurationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConfigurationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConfigurationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConfigurationSolution} solution - Path solution\n *\n * @returns ConfigurationPage\n */\n/* jshint ignore:end */\nConfigurationPage = function ConfigurationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConfigurationPage.prototype, Page.prototype);\nConfigurationPage.prototype.constructor = ConfigurationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConfigurationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationPage#\n *\n * @param {ConfigurationPayload} payload - Payload response from the API\n *\n * @returns ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationPage.prototype.getInstance = function getInstance(payload) {\n  return new ConfigurationInstance(this._version, payload, this._solution.chatServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConfigurationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConfigurationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationInstance\n *\n * @property {string} chatServiceSid -\n *          The unique string that identifies the resource\n * @property {string} defaultConversationCreatorRoleSid -\n *          The role assigned to a conversation creator user when they join a new conversation\n * @property {string} defaultConversationRoleSid -\n *          The role assigned to users when they are added to a conversation\n * @property {string} defaultChatServiceRoleSid -\n *          The service role assigned to users when they are added to the service\n * @property {string} url - An absolute URL for this service configuration.\n * @property {string} links -\n *          Absolute URL to access the push notifications configuration of this service.\n * @property {boolean} reachabilityEnabled -\n *          Whether the Reachability Indicator feature is enabled for this Conversations Service\n *\n * @param {V1} version - Version of the resource\n * @param {ConfigurationPayload} payload - The instance payload\n * @param {sid} chatServiceSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nConfigurationInstance = function ConfigurationInstance(version, payload,\n                                                        chatServiceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.defaultConversationCreatorRoleSid = payload.default_conversation_creator_role_sid; // jshint ignore:line\n  this.defaultConversationRoleSid = payload.default_conversation_role_sid; // jshint ignore:line\n  this.defaultChatServiceRoleSid = payload.default_chat_service_role_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.reachabilityEnabled = payload.reachability_enabled; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {chatServiceSid: chatServiceSid, };\n};\n\nObject.defineProperty(ConfigurationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConfigurationContext(this._version, this._solution.chatServiceSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.defaultConversationCreatorRoleSid] -\n *          The role assigned to a conversation creator when they join a new conversation\n * @param {string} [opts.defaultConversationRoleSid] -\n *          The role assigned to users when they are added to a conversation\n * @param {string} [opts.defaultChatServiceRoleSid] -\n *          The service role assigned to users when they are added to the service\n * @param {boolean} [opts.reachabilityEnabled] -\n *          Whether the Reachability Indicator feature is enabled for this Conversations Service\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConfigurationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConfigurationContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Service configuration resource to fetch\n */\n/* jshint ignore:end */\nConfigurationContext = function ConfigurationContext(version, chatServiceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, };\n  this._uri = `/Services/${chatServiceSid}/Configuration`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConfigurationInstance(this._version, payload, this._solution.chatServiceSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.defaultConversationCreatorRoleSid] -\n *          The role assigned to a conversation creator when they join a new conversation\n * @param {string} [opts.defaultConversationRoleSid] -\n *          The role assigned to users when they are added to a conversation\n * @param {string} [opts.defaultChatServiceRoleSid] -\n *          The service role assigned to users when they are added to the service\n * @param {boolean} [opts.reachabilityEnabled] -\n *          Whether the Reachability Indicator feature is enabled for this Conversations Service\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'DefaultConversationCreatorRoleSid': _.get(opts, 'defaultConversationCreatorRoleSid'),\n    'DefaultConversationRoleSid': _.get(opts, 'defaultConversationRoleSid'),\n    'DefaultChatServiceRoleSid': _.get(opts, 'defaultChatServiceRoleSid'),\n    'ReachabilityEnabled': serialize.bool(_.get(opts, 'reachabilityEnabled'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConfigurationInstance(this._version, payload, this._solution.chatServiceSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConfigurationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConfigurationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConfigurationList: ConfigurationList,\n  ConfigurationPage: ConfigurationPage,\n  ConfigurationInstance: ConfigurationInstance,\n  ConfigurationContext: ConfigurationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar DeliveryReceiptList;\nvar DeliveryReceiptPage;\nvar DeliveryReceiptInstance;\nvar DeliveryReceiptContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DeliveryReceiptList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {string} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @param {string} messageSid -\n *          The SID of the message the delivery receipt belongs to\n */\n/* jshint ignore:end */\nDeliveryReceiptList = function DeliveryReceiptList(version, chatServiceSid,\n                                                    conversationSid, messageSid)\n                                                    {\n  /* jshint ignore:start */\n  /**\n   * @function deliveryReceipts\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptContext}\n   */\n  /* jshint ignore:end */\n  function DeliveryReceiptListInstance(sid) {\n    return DeliveryReceiptListInstance.get(sid);\n  }\n\n  DeliveryReceiptListInstance._version = version;\n  // Path Solution\n  DeliveryReceiptListInstance._solution = {\n    chatServiceSid: chatServiceSid,\n    conversationSid: conversationSid,\n    messageSid: messageSid\n  };\n  DeliveryReceiptListInstance._uri = `/Services/${chatServiceSid}/Conversations/${conversationSid}/Messages/${messageSid}/Receipts`;\n  /* jshint ignore:start */\n  /**\n   * Streams DeliveryReceiptInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DeliveryReceiptInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DeliveryReceiptInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeliveryReceiptPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DeliveryReceiptInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeliveryReceiptPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a delivery_receipt\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptContext}\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.get = function get(sid) {\n    return new DeliveryReceiptContext(\n      this._version,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      this._solution.messageSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DeliveryReceiptListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DeliveryReceiptListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DeliveryReceiptListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeliveryReceiptPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DeliveryReceiptSolution} solution - Path solution\n *\n * @returns DeliveryReceiptPage\n */\n/* jshint ignore:end */\nDeliveryReceiptPage = function DeliveryReceiptPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DeliveryReceiptPage.prototype, Page.prototype);\nDeliveryReceiptPage.prototype.constructor = DeliveryReceiptPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DeliveryReceiptInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptPage#\n *\n * @param {DeliveryReceiptPayload} payload - Payload response from the API\n *\n * @returns DeliveryReceiptInstance\n */\n/* jshint ignore:end */\nDeliveryReceiptPage.prototype.getInstance = function getInstance(payload) {\n  return new DeliveryReceiptInstance(\n    this._version,\n    payload,\n    this._solution.chatServiceSid,\n    this._solution.conversationSid,\n    this._solution.messageSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeliveryReceiptPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeliveryReceiptPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeliveryReceiptContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this participant.\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @property {string} messageSid -\n *          The SID of the message the delivery receipt belongs to\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} channelMessageSid -\n *          A messaging channel-specific identifier for the message delivered to participant\n * @property {string} participantSid -\n *          The unique ID of the participant the delivery receipt belongs to.\n * @property {delivery_receipt.delivery_status} status -\n *          The message delivery status\n * @property {number} errorCode -\n *          The message {@link https://www.twilio.com/docs/sms/api/message-resource#delivery-related-errors|delivery error code} for a `failed` status\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {string} url - An absolute URL for this delivery receipt.\n *\n * @param {V1} version - Version of the resource\n * @param {DeliveryReceiptPayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @param {sid} messageSid - The SID of the message the delivery receipt belongs to\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nDeliveryReceiptInstance = function DeliveryReceiptInstance(version, payload,\n                                                            chatServiceSid,\n                                                            conversationSid,\n                                                            messageSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.messageSid = payload.message_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.channelMessageSid = payload.channel_message_sid; // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    chatServiceSid: chatServiceSid,\n    conversationSid: conversationSid,\n    messageSid: messageSid,\n    sid: sid || this.sid,\n  };\n};\n\nObject.defineProperty(DeliveryReceiptInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DeliveryReceiptContext(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.conversationSid,\n          this._solution.messageSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DeliveryReceiptInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeliveryReceiptInstance\n */\n/* jshint ignore:end */\nDeliveryReceiptInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeliveryReceiptInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeliveryReceiptInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeliveryReceiptContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid_like} conversationSid -\n *          The unique ID of the Conversation for this delivery receipt.\n * @param {sid} messageSid -\n *          The SID of the message the delivery receipt belongs to.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nDeliveryReceiptContext = function DeliveryReceiptContext(version,\n                                                          chatServiceSid,\n                                                          conversationSid,\n                                                          messageSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {\n    chatServiceSid: chatServiceSid,\n    conversationSid: conversationSid,\n    messageSid: messageSid,\n    sid: sid,\n  };\n  this._uri = `/Services/${chatServiceSid}/Conversations/${conversationSid}/Messages/${messageSid}/Receipts/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DeliveryReceiptInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeliveryReceiptInstance\n */\n/* jshint ignore:end */\nDeliveryReceiptContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DeliveryReceiptInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      this._solution.messageSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeliveryReceiptContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDeliveryReceiptContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DeliveryReceiptList: DeliveryReceiptList,\n  DeliveryReceiptPage: DeliveryReceiptPage,\n  DeliveryReceiptInstance: DeliveryReceiptInstance,\n  DeliveryReceiptContext: DeliveryReceiptContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DeliveryReceiptList = require(\n    './message/deliveryReceipt').DeliveryReceiptList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MessageList;\nvar MessagePage;\nvar MessageInstance;\nvar MessageContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {string} conversationSid -\n *          The unique ID of the Conversation for this message.\n */\n/* jshint ignore:end */\nMessageList = function MessageList(version, chatServiceSid, conversationSid) {\n  /* jshint ignore:start */\n  /**\n   * @function messages\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  function MessageListInstance(sid) {\n    return MessageListInstance.get(sid);\n  }\n\n  MessageListInstance._version = version;\n  // Path Solution\n  MessageListInstance._solution = {chatServiceSid: chatServiceSid, conversationSid: conversationSid};\n  MessageListInstance._uri = `/Services/${chatServiceSid}/Conversations/${conversationSid}/Messages`;\n  /* jshint ignore:start */\n  /**\n   * create a MessageInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.author] -\n   *          The channel specific identifier of the message's author.\n   * @param {string} [opts.body] - The content of the message.\n   * @param {Date} [opts.dateCreated] - The date that this resource was created.\n   * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n   * @param {string} [opts.attributes] -\n   *          A string metadata field you can use to store any data you wish.\n   * @param {string} [opts.mediaSid] -\n   *          The Media SID to be attached to the new Message.\n   * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MessageInstance\n   */\n  /* jshint ignore:end */\n  MessageListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Author': _.get(opts, 'author'),\n      'Body': _.get(opts, 'body'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'Attributes': _.get(opts, 'attributes'),\n      'MediaSid': _.get(opts, 'mediaSid')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInstance(\n        this._version,\n        payload,\n        this._solution.chatServiceSid,\n        this._solution.conversationSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MessageInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MessageListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MessageInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] -\n   *          The sort order of the returned messages\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a message\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  MessageListInstance.get = function get(sid) {\n    return new MessageContext(\n      this._version,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessageListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessageListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagePage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.MessagePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessageSolution} solution - Path solution\n *\n * @returns MessagePage\n */\n/* jshint ignore:end */\nMessagePage = function MessagePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessagePage.prototype, Page.prototype);\nMessagePage.prototype.constructor = MessagePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessageInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessagePage#\n *\n * @param {MessagePayload} payload - Payload response from the API\n *\n * @returns MessageInstance\n */\n/* jshint ignore:end */\nMessagePage.prototype.getInstance = function getInstance(payload) {\n  return new MessageInstance(\n    this._version,\n    payload,\n    this._solution.chatServiceSid,\n    this._solution.conversationSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessagePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this message.\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {number} index - The index of the message within the Conversation.\n * @property {string} author -\n *          The channel specific identifier of the message's author.\n * @property {string} body - The content of the message.\n * @property {object} media -\n *          An array of objects that describe the Message's media if attached, otherwise, null.\n * @property {string} attributes -\n *          A string metadata field you can use to store any data you wish.\n * @property {string} participantSid -\n *          The unique ID of messages's author participant.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {object} delivery -\n *          An object that contains the summary of delivery statuses for the message to non-chat participants.\n * @property {string} url - An absolute URL for this message.\n * @property {string} links - Absolute URL to access the receipts of this message.\n *\n * @param {V1} version - Version of the resource\n * @param {MessagePayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nMessageInstance = function MessageInstance(version, payload, chatServiceSid,\n                                            conversationSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.index = deserialize.integer(payload.index); // jshint ignore:line\n  this.author = payload.author; // jshint ignore:line\n  this.body = payload.body; // jshint ignore:line\n  this.media = payload.media; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.delivery = payload.delivery; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    chatServiceSid: chatServiceSid,\n    conversationSid: conversationSid,\n    sid: sid || this.sid,\n  };\n};\n\nObject.defineProperty(MessageInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MessageContext(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.conversationSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.author] -\n *          The channel specific identifier of the message's author.\n * @param {string} [opts.body] - The content of the message.\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          A string metadata field you can use to store any data you wish.\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the deliveryReceipts\n *\n * @function deliveryReceipts\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptList}\n */\n/* jshint ignore:end */\nMessageInstance.prototype.deliveryReceipts = function deliveryReceipts() {\n  return this._proxy.deliveryReceipts;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessageInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext\n *\n * @property {Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext.DeliveryReceiptList} deliveryReceipts -\n *          deliveryReceipts resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid_like} conversationSid -\n *          The unique ID of the Conversation for this message.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nMessageContext = function MessageContext(version, chatServiceSid,\n                                          conversationSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, conversationSid: conversationSid, sid: sid, };\n  this._uri = `/Services/${chatServiceSid}/Conversations/${conversationSid}/Messages/${sid}`;\n\n  // Dependents\n  this._deliveryReceipts = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.author] -\n *          The channel specific identifier of the message's author.\n * @param {string} [opts.body] - The content of the message.\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          A string metadata field you can use to store any data you wish.\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Author': _.get(opts, 'author'),\n    'Body': _.get(opts, 'body'),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'Attributes': _.get(opts, 'attributes')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(MessageContext.prototype,\n  'deliveryReceipts', {\n    get: function() {\n      if (!this._deliveryReceipts) {\n        this._deliveryReceipts = new DeliveryReceiptList(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.conversationSid,\n          this._solution.sid\n        );\n      }\n      return this._deliveryReceipts;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMessageContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessageList: MessageList,\n  MessagePage: MessagePage,\n  MessageInstance: MessageInstance,\n  MessageContext: MessageContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ParticipantList;\nvar ParticipantPage;\nvar ParticipantInstance;\nvar ParticipantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {string} conversationSid -\n *          The unique ID of the Conversation for this participant.\n */\n/* jshint ignore:end */\nParticipantList = function ParticipantList(version, chatServiceSid,\n                                            conversationSid) {\n  /* jshint ignore:start */\n  /**\n   * @function participants\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  function ParticipantListInstance(sid) {\n    return ParticipantListInstance.get(sid);\n  }\n\n  ParticipantListInstance._version = version;\n  // Path Solution\n  ParticipantListInstance._solution = {\n    chatServiceSid: chatServiceSid,\n    conversationSid: conversationSid\n  };\n  ParticipantListInstance._uri = `/Services/${chatServiceSid}/Conversations/${conversationSid}/Participants`;\n  /* jshint ignore:start */\n  /**\n   * create a ParticipantInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.identity] -\n   *          A unique string identifier for the conversation participant as Conversation User.\n   * @param {string} [opts.messagingBinding.address] -\n   *          The address of the participant's device.\n   * @param {string} [opts.messagingBinding.proxyAddress] -\n   *          The address of the Twilio phone number that the participant is in contact with.\n   * @param {Date} [opts.dateCreated] - The date that this resource was created.\n   * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n   * @param {string} [opts.attributes] -\n   *          An optional string metadata field you can use to store any data you wish.\n   * @param {string} [opts.messagingBinding.projectedAddress] -\n   *          The address of the Twilio phone number that is used in Group MMS.\n   * @param {string} [opts.roleSid] -\n   *          The SID of a conversation-level Role to assign to the participant\n   * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ParticipantInstance\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'MessagingBinding.Address': _.get(opts, 'messagingBinding.address'),\n      'MessagingBinding.ProxyAddress': _.get(opts, 'messagingBinding.proxyAddress'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'Attributes': _.get(opts, 'attributes'),\n      'MessagingBinding.ProjectedAddress': _.get(opts, 'messagingBinding.projectedAddress'),\n      'RoleSid': _.get(opts, 'roleSid')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantInstance(\n        this._version,\n        payload,\n        this._solution.chatServiceSid,\n        this._solution.conversationSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ParticipantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ParticipantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a participant\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.get = function get(sid) {\n    return new ParticipantContext(\n      this._version,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ParticipantListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ParticipantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ParticipantSolution} solution - Path solution\n *\n * @returns ParticipantPage\n */\n/* jshint ignore:end */\nParticipantPage = function ParticipantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ParticipantPage.prototype, Page.prototype);\nParticipantPage.prototype.constructor = ParticipantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ParticipantInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantPage#\n *\n * @param {ParticipantPayload} payload - Payload response from the API\n *\n * @returns ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantPage.prototype.getInstance = function getInstance(payload) {\n  return new ParticipantInstance(\n    this._version,\n    payload,\n    this._solution.chatServiceSid,\n    this._solution.conversationSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this participant.\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this participant.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} identity -\n *          A unique string identifier for the conversation participant as Conversation User.\n * @property {string} attributes -\n *          An optional string metadata field you can use to store any data you wish.\n * @property {object} messagingBinding -\n *          Information about how this participant exchanges messages with the conversation.\n * @property {string} roleSid -\n *          The SID of a conversation-level Role to assign to the participant\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {string} url - An absolute URL for this participant.\n * @property {number} lastReadMessageIndex -\n *          Index of last \u201Cread\u201D message in the Conversation for the Participant.\n * @property {string} lastReadTimestamp -\n *          Timestamp of last \u201Cread\u201D message in the Conversation for the Participant.\n *\n * @param {V1} version - Version of the resource\n * @param {ParticipantPayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid} conversationSid -\n *          The unique ID of the Conversation for this participant.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nParticipantInstance = function ParticipantInstance(version, payload,\n                                                    chatServiceSid,\n                                                    conversationSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.messagingBinding = payload.messaging_binding; // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.lastReadMessageIndex = deserialize.integer(payload.last_read_message_index); // jshint ignore:line\n  this.lastReadTimestamp = payload.last_read_timestamp; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    chatServiceSid: chatServiceSid,\n    conversationSid: conversationSid,\n    sid: sid || this.sid,\n  };\n};\n\nObject.defineProperty(ParticipantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ParticipantContext(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.conversationSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a ParticipantInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.identity] -\n *          A unique string identifier for the conversation participant as Conversation User.\n * @param {string} [opts.attributes] -\n *          An optional string metadata field you can use to store any data you wish.\n * @param {string} [opts.roleSid] -\n *          The SID of a conversation-level Role to assign to the participant\n * @param {string} [opts.messagingBinding.proxyAddress] -\n *          The address of the Twilio phone number that the participant is in contact with.\n * @param {string} [opts.messagingBinding.projectedAddress] -\n *          The address of the Twilio phone number that is used in Group MMS.\n * @param {number} [opts.lastReadMessageIndex] -\n *          Index of last \u201Cread\u201D message in the Conversation for the Participant.\n * @param {string} [opts.lastReadTimestamp] -\n *          Timestamp of last \u201Cread\u201D message in the Conversation for the Participant.\n * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ParticipantInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid_like} conversationSid -\n *          The unique ID of the Conversation for this participant.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nParticipantContext = function ParticipantContext(version, chatServiceSid,\n                                                  conversationSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, conversationSid: conversationSid, sid: sid, };\n  this._uri = `/Services/${chatServiceSid}/Conversations/${conversationSid}/Participants/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a ParticipantInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.identity] -\n *          A unique string identifier for the conversation participant as Conversation User.\n * @param {string} [opts.attributes] -\n *          An optional string metadata field you can use to store any data you wish.\n * @param {string} [opts.roleSid] -\n *          The SID of a conversation-level Role to assign to the participant\n * @param {string} [opts.messagingBinding.proxyAddress] -\n *          The address of the Twilio phone number that the participant is in contact with.\n * @param {string} [opts.messagingBinding.projectedAddress] -\n *          The address of the Twilio phone number that is used in Group MMS.\n * @param {number} [opts.lastReadMessageIndex] -\n *          Index of last \u201Cread\u201D message in the Conversation for the Participant.\n * @param {string} [opts.lastReadTimestamp] -\n *          Timestamp of last \u201Cread\u201D message in the Conversation for the Participant.\n * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'Identity': _.get(opts, 'identity'),\n    'Attributes': _.get(opts, 'attributes'),\n    'RoleSid': _.get(opts, 'roleSid'),\n    'MessagingBinding.ProxyAddress': _.get(opts, 'messagingBinding.proxyAddress'),\n    'MessagingBinding.ProjectedAddress': _.get(opts, 'messagingBinding.projectedAddress'),\n    'LastReadMessageIndex': _.get(opts, 'lastReadMessageIndex'),\n    'LastReadTimestamp': _.get(opts, 'lastReadTimestamp')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ParticipantInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {participant.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nParticipantContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ParticipantList: ParticipantList,\n  ParticipantPage: ParticipantPage,\n  ParticipantInstance: ParticipantInstance,\n  ParticipantContext: ParticipantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WebhookList;\nvar WebhookPage;\nvar WebhookInstance;\nvar WebhookContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {string} conversationSid -\n *          The unique ID of the Conversation for this webhook.\n */\n/* jshint ignore:end */\nWebhookList = function WebhookList(version, chatServiceSid, conversationSid) {\n  /* jshint ignore:start */\n  /**\n   * @function webhooks\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  function WebhookListInstance(sid) {\n    return WebhookListInstance.get(sid);\n  }\n\n  WebhookListInstance._version = version;\n  // Path Solution\n  WebhookListInstance._solution = {chatServiceSid: chatServiceSid, conversationSid: conversationSid};\n  WebhookListInstance._uri = `/Services/${chatServiceSid}/Conversations/${conversationSid}/Webhooks`;\n  /* jshint ignore:start */\n  /**\n   * create a WebhookInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList#\n   *\n   * @param {object} opts - Options for request\n   * @param {webhook.target} opts.target - The target of this webhook.\n   * @param {string} [opts.configuration.url] -\n   *          The absolute url the webhook request should be sent to.\n   * @param {webhook.method} [opts.configuration.method] -\n   *          The HTTP method to be used when sending a webhook request.\n   * @param {string|list} [opts.configuration.filters] -\n   *          The list of events, firing webhook event for this Conversation.\n   * @param {string|list} [opts.configuration.triggers] -\n   *          The list of keywords, firing webhook event for this Conversation.\n   * @param {string} [opts.configuration.flowSid] -\n   *          The studio flow SID, where the webhook should be sent to.\n   * @param {number} [opts.configuration.replayAfter] -\n   *          The message index for which and it's successors the webhook will be replayed.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WebhookInstance\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['target'])) {\n      throw new Error('Required parameter \"opts[\\'target\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Target': _.get(opts, 'target'),\n      'Configuration.Url': _.get(opts, 'configuration.url'),\n      'Configuration.Method': _.get(opts, 'configuration.method'),\n      'Configuration.Filters': serialize.map(_.get(opts, 'configuration.filters'), function(e) { return e; }),\n      'Configuration.Triggers': serialize.map(_.get(opts, 'configuration.triggers'), function(e) { return e; }),\n      'Configuration.FlowSid': _.get(opts, 'configuration.flowSid'),\n      'Configuration.ReplayAfter': _.get(opts, 'configuration.replayAfter')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookInstance(\n        this._version,\n        payload,\n        this._solution.chatServiceSid,\n        this._solution.conversationSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams WebhookInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WebhookInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a webhook\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.get = function get(sid) {\n    return new WebhookContext(\n      this._version,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WebhookListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WebhookListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WebhookSolution} solution - Path solution\n *\n * @returns WebhookPage\n */\n/* jshint ignore:end */\nWebhookPage = function WebhookPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WebhookPage.prototype, Page.prototype);\nWebhookPage.prototype.constructor = WebhookPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WebhookInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookPage#\n *\n * @param {WebhookPayload} payload - Payload response from the API\n *\n * @returns WebhookInstance\n */\n/* jshint ignore:end */\nWebhookPage.prototype.getInstance = function getInstance(payload) {\n  return new WebhookInstance(\n    this._version,\n    payload,\n    this._solution.chatServiceSid,\n    this._solution.conversationSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookInstance\n *\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this conversation.\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this webhook.\n * @property {string} target - The target of this webhook.\n * @property {string} url - An absolute URL for this webhook.\n * @property {object} configuration - The configuration of this webhook.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n *\n * @param {V1} version - Version of the resource\n * @param {WebhookPayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid} conversationSid -\n *          The unique ID of the Conversation for this webhook.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nWebhookInstance = function WebhookInstance(version, payload, chatServiceSid,\n                                            conversationSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.target = payload.target; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.configuration = payload.configuration; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    chatServiceSid: chatServiceSid,\n    conversationSid: conversationSid,\n    sid: sid || this.sid,\n  };\n};\n\nObject.defineProperty(WebhookInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WebhookContext(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.conversationSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.configuration.url] -\n *          The absolute url the webhook request should be sent to.\n * @param {webhook.method} [opts.configuration.method] -\n *          The HTTP method to be used when sending a webhook request.\n * @param {string|list} [opts.configuration.filters] -\n *          The list of events, firing webhook event for this Conversation.\n * @param {string|list} [opts.configuration.triggers] -\n *          The list of keywords, firing webhook event for this Conversation.\n * @param {string} [opts.configuration.flowSid] -\n *          The studio flow SID, where the webhook should be sent to.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid_like} conversationSid -\n *          The unique ID of the Conversation for this webhook.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nWebhookContext = function WebhookContext(version, chatServiceSid,\n                                          conversationSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, conversationSid: conversationSid, sid: sid, };\n  this._uri = `/Services/${chatServiceSid}/Conversations/${conversationSid}/Webhooks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.configuration.url] -\n *          The absolute url the webhook request should be sent to.\n * @param {webhook.method} [opts.configuration.method] -\n *          The HTTP method to be used when sending a webhook request.\n * @param {string|list} [opts.configuration.filters] -\n *          The list of events, firing webhook event for this Conversation.\n * @param {string|list} [opts.configuration.triggers] -\n *          The list of keywords, firing webhook event for this Conversation.\n * @param {string} [opts.configuration.flowSid] -\n *          The studio flow SID, where the webhook should be sent to.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Configuration.Url': _.get(opts, 'configuration.url'),\n    'Configuration.Method': _.get(opts, 'configuration.method'),\n    'Configuration.Filters': serialize.map(_.get(opts, 'configuration.filters'), function(e) { return e; }),\n    'Configuration.Triggers': serialize.map(_.get(opts, 'configuration.triggers'), function(e) { return e; }),\n    'Configuration.FlowSid': _.get(opts, 'configuration.flowSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.conversationSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWebhookContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WebhookList: WebhookList,\n  WebhookPage: WebhookPage,\n  WebhookInstance: WebhookInstance,\n  WebhookContext: WebhookContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar MessageList = require('./conversation/message').MessageList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar ParticipantList = require('./conversation/participant').ParticipantList;\nvar WebhookList = require('./conversation/webhook').WebhookList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ConversationList;\nvar ConversationPage;\nvar ConversationInstance;\nvar ConversationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConversationList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n */\n/* jshint ignore:end */\nConversationList = function ConversationList(version, chatServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function conversations\n   * @memberof Twilio.Conversations.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext}\n   */\n  /* jshint ignore:end */\n  function ConversationListInstance(sid) {\n    return ConversationListInstance.get(sid);\n  }\n\n  ConversationListInstance._version = version;\n  // Path Solution\n  ConversationListInstance._solution = {chatServiceSid: chatServiceSid};\n  ConversationListInstance._uri = `/Services/${chatServiceSid}/Conversations`;\n  /* jshint ignore:start */\n  /**\n   * create a ConversationInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The human-readable name of this conversation.\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {string} [opts.attributes] -\n   *          An optional string metadata field you can use to store any data you wish.\n   * @param {string} [opts.messagingServiceSid] -\n   *          The unique ID of the Messaging Service this conversation belongs to.\n   * @param {Date} [opts.dateCreated] - The date that this resource was created.\n   * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n   * @param {conversation.state} [opts.state] - Current state of this conversation.\n   * @param {string} [opts.timers.inactive] -\n   *          ISO8601 duration when conversation will be switched to `inactive` state.\n   * @param {string} [opts.timers.closed] -\n   *          ISO8601 duration when conversation will be switched to `closed` state.\n   * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ConversationInstance\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Attributes': _.get(opts, 'attributes'),\n      'MessagingServiceSid': _.get(opts, 'messagingServiceSid'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'State': _.get(opts, 'state'),\n      'Timers.Inactive': _.get(opts, 'timers.inactive'),\n      'Timers.Closed': _.get(opts, 'timers.closed')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConversationInstance(\n        this._version,\n        payload,\n        this._solution.chatServiceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ConversationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ConversationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a conversation\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext}\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.get = function get(sid) {\n    return new ConversationContext(this._version, this._solution.chatServiceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.ConversationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConversationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConversationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConversationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConversationPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConversationSolution} solution - Path solution\n *\n * @returns ConversationPage\n */\n/* jshint ignore:end */\nConversationPage = function ConversationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConversationPage.prototype, Page.prototype);\nConversationPage.prototype.constructor = ConversationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConversationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationPage#\n *\n * @param {ConversationPayload} payload - Payload response from the API\n *\n * @returns ConversationInstance\n */\n/* jshint ignore:end */\nConversationPage.prototype.getInstance = function getInstance(payload) {\n  return new ConversationInstance(this._version, payload, this._solution.chatServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConversationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConversationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConversationContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this conversation.\n * @property {string} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n * @property {string} messagingServiceSid -\n *          The unique ID of the Messaging Service this conversation belongs to.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} friendlyName - The human-readable name of this conversation.\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} attributes -\n *          An optional string metadata field you can use to store any data you wish.\n * @property {conversation.state} state - Current state of this conversation.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {object} timers - Timer date values for this conversation.\n * @property {string} url - An absolute URL for this conversation.\n * @property {string} links -\n *          Absolute URLs to access the participants, messages and webhooks of this conversation.\n * @property {object} bindings - The bindings\n *\n * @param {V1} version - Version of the resource\n * @param {ConversationPayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nConversationInstance = function ConversationInstance(version, payload,\n                                                      chatServiceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.state = payload.state; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.timers = payload.timers; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.bindings = payload.bindings; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {chatServiceSid: chatServiceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ConversationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConversationContext(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a ConversationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human-readable name of this conversation.\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          An optional string metadata field you can use to store any data you wish.\n * @param {string} [opts.messagingServiceSid] -\n *          The unique ID of the Messaging Service this conversation belongs to.\n * @param {conversation.state} [opts.state] - Current state of this conversation.\n * @param {string} [opts.timers.inactive] -\n *          ISO8601 duration when conversation will be switched to `inactive` state.\n * @param {string} [opts.timers.closed] -\n *          ISO8601 duration when conversation will be switched to `closed` state.\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConversationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConversationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the participants\n *\n * @function participants\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList}\n */\n/* jshint ignore:end */\nConversationInstance.prototype.participants = function participants() {\n  return this._proxy.participants;\n};\n\n/* jshint ignore:start */\n/**\n * Access the messages\n *\n * @function messages\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList}\n */\n/* jshint ignore:end */\nConversationInstance.prototype.messages = function messages() {\n  return this._proxy.messages;\n};\n\n/* jshint ignore:start */\n/**\n * Access the webhooks\n *\n * @function webhooks\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList}\n */\n/* jshint ignore:end */\nConversationInstance.prototype.webhooks = function webhooks() {\n  return this._proxy.webhooks;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConversationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConversationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConversationContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ConversationContext\n *\n * @property {Twilio.Conversations.V1.ServiceContext.ConversationContext.ParticipantList} participants -\n *          participants resource\n * @property {Twilio.Conversations.V1.ServiceContext.ConversationContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.Conversations.V1.ServiceContext.ConversationContext.WebhookList} webhooks -\n *          webhooks resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nConversationContext = function ConversationContext(version, chatServiceSid, sid)\n                                                    {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, sid: sid, };\n  this._uri = `/Services/${chatServiceSid}/Conversations/${sid}`;\n\n  // Dependents\n  this._participants = undefined;\n  this._messages = undefined;\n  this._webhooks = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a ConversationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human-readable name of this conversation.\n * @param {Date} [opts.dateCreated] - The date that this resource was created.\n * @param {Date} [opts.dateUpdated] - The date that this resource was last updated.\n * @param {string} [opts.attributes] -\n *          An optional string metadata field you can use to store any data you wish.\n * @param {string} [opts.messagingServiceSid] -\n *          The unique ID of the Messaging Service this conversation belongs to.\n * @param {conversation.state} [opts.state] - Current state of this conversation.\n * @param {string} [opts.timers.inactive] -\n *          ISO8601 duration when conversation will be switched to `inactive` state.\n * @param {string} [opts.timers.closed] -\n *          ISO8601 duration when conversation will be switched to `closed` state.\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'Attributes': _.get(opts, 'attributes'),\n    'MessagingServiceSid': _.get(opts, 'messagingServiceSid'),\n    'State': _.get(opts, 'state'),\n    'Timers.Inactive': _.get(opts, 'timers.inactive'),\n    'Timers.Closed': _.get(opts, 'timers.closed'),\n    'UniqueName': _.get(opts, 'uniqueName')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConversationInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConversationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {conversation.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConversationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConversationInstance\n */\n/* jshint ignore:end */\nConversationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConversationInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ConversationContext.prototype,\n  'participants', {\n    get: function() {\n      if (!this._participants) {\n        this._participants = new ParticipantList(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.sid\n        );\n      }\n      return this._participants;\n    }\n});\n\nObject.defineProperty(ConversationContext.prototype,\n  'messages', {\n    get: function() {\n      if (!this._messages) {\n        this._messages = new MessageList(this._version, this._solution.chatServiceSid, this._solution.sid);\n      }\n      return this._messages;\n    }\n});\n\nObject.defineProperty(ConversationContext.prototype,\n  'webhooks', {\n    get: function() {\n      if (!this._webhooks) {\n        this._webhooks = new WebhookList(this._version, this._solution.chatServiceSid, this._solution.sid);\n      }\n      return this._webhooks;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ConversationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConversationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConversationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConversationList: ConversationList,\n  ConversationPage: ConversationPage,\n  ConversationInstance: ConversationInstance,\n  ConversationContext: ConversationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ParticipantConversationList;\nvar ParticipantConversationPage;\nvar ParticipantConversationInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantConversationList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ParticipantConversationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n */\n/* jshint ignore:end */\nParticipantConversationList = function ParticipantConversationList(version,\n    chatServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function participantConversations\n   * @memberof Twilio.Conversations.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.ParticipantConversationContext}\n   */\n  /* jshint ignore:end */\n  function ParticipantConversationListInstance(sid) {\n    return ParticipantConversationListInstance.get(sid);\n  }\n\n  ParticipantConversationListInstance._version = version;\n  // Path Solution\n  ParticipantConversationListInstance._solution = {chatServiceSid: chatServiceSid};\n  ParticipantConversationListInstance._uri = `/Services/${chatServiceSid}/ParticipantConversations`;\n  /* jshint ignore:start */\n  /**\n   * Streams ParticipantConversationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.ParticipantConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.identity] -\n   *          A unique string identifier for the conversation participant as Conversation User.\n   * @param {string} [opts.address] -\n   *          A unique string identifier for the conversation participant who's not a Conversation User.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ParticipantConversationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.ParticipantConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.identity] -\n   *          A unique string identifier for the conversation participant as Conversation User.\n   * @param {string} [opts.address] -\n   *          A unique string identifier for the conversation participant who's not a Conversation User.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ParticipantConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.ParticipantConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.identity] -\n   *          A unique string identifier for the conversation participant as Conversation User.\n   * @param {string} [opts.address] -\n   *          A unique string identifier for the conversation participant who's not a Conversation User.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'Address': _.get(opts, 'address'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ParticipantConversationInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.ParticipantConversationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.ParticipantConversationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ParticipantConversationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ParticipantConversationListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ParticipantConversationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantConversationPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ParticipantConversationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ParticipantConversationSolution} solution - Path solution\n *\n * @returns ParticipantConversationPage\n */\n/* jshint ignore:end */\nParticipantConversationPage = function ParticipantConversationPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ParticipantConversationPage.prototype, Page.prototype);\nParticipantConversationPage.prototype.constructor = ParticipantConversationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ParticipantConversationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.ParticipantConversationPage#\n *\n * @param {ParticipantConversationPayload} payload - Payload response from the API\n *\n * @returns ParticipantConversationInstance\n */\n/* jshint ignore:end */\nParticipantConversationPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new ParticipantConversationInstance(this._version, payload, this._solution.chatServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ParticipantConversationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantConversationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantConversationPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantConversationContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.ParticipantConversationInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this conversation.\n * @property {string} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n * @property {string} participantSid - The unique ID of the Participant.\n * @property {string} participantUserSid -\n *          The unique ID for the conversation participant as Conversation User.\n * @property {string} participantIdentity -\n *          A unique string identifier for the conversation participant as Conversation User.\n * @property {object} participantMessagingBinding -\n *          Information about how this participant exchanges messages with the conversation.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation this Participant belongs to.\n * @property {string} conversationUniqueName -\n *          An application-defined string that uniquely identifies the Conversation resource.\n * @property {string} conversationFriendlyName -\n *          The human-readable name of this conversation.\n * @property {string} conversationAttributes -\n *          An optional string metadata field you can use to store any data you wish.\n * @property {Date} conversationDateCreated -\n *          The date that this conversation was created.\n * @property {Date} conversationDateUpdated -\n *          The date that this conversation was last updated.\n * @property {string} conversationCreatedBy - Creator of this conversation.\n * @property {participant_conversation.state} conversationState -\n *          The current state of this User Conversation\n * @property {object} conversationTimers - Timer date values for this conversation.\n * @property {string} links -\n *          Absolute URLs to access the participant and conversation of this Participant Conversation.\n *\n * @param {V1} version - Version of the resource\n * @param {ParticipantConversationPayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n */\n/* jshint ignore:end */\nParticipantConversationInstance = function\n    ParticipantConversationInstance(version, payload, chatServiceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.participantUserSid = payload.participant_user_sid; // jshint ignore:line\n  this.participantIdentity = payload.participant_identity; // jshint ignore:line\n  this.participantMessagingBinding = payload.participant_messaging_binding; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.conversationUniqueName = payload.conversation_unique_name; // jshint ignore:line\n  this.conversationFriendlyName = payload.conversation_friendly_name; // jshint ignore:line\n  this.conversationAttributes = payload.conversation_attributes; // jshint ignore:line\n  this.conversationDateCreated = deserialize.iso8601DateTime(payload.conversation_date_created); // jshint ignore:line\n  this.conversationDateUpdated = deserialize.iso8601DateTime(payload.conversation_date_updated); // jshint ignore:line\n  this.conversationCreatedBy = payload.conversation_created_by; // jshint ignore:line\n  this.conversationState = payload.conversation_state; // jshint ignore:line\n  this.conversationTimers = payload.conversation_timers; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {chatServiceSid: chatServiceSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.ParticipantConversationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantConversationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantConversationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ParticipantConversationList: ParticipantConversationList,\n  ParticipantConversationPage: ParticipantConversationPage,\n  ParticipantConversationInstance: ParticipantConversationInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RoleList;\nvar RolePage;\nvar RoleInstance;\nvar RoleContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.RoleList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with\n */\n/* jshint ignore:end */\nRoleList = function RoleList(version, chatServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function roles\n   * @memberof Twilio.Conversations.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  function RoleListInstance(sid) {\n    return RoleListInstance.get(sid);\n  }\n\n  RoleListInstance._version = version;\n  // Path Solution\n  RoleListInstance._solution = {chatServiceSid: chatServiceSid};\n  RoleListInstance._uri = `/Services/${chatServiceSid}/Roles`;\n  /* jshint ignore:start */\n  /**\n   * create a RoleInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ServiceContext.RoleList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the new resource\n   * @param {role.role_type} opts.type - The type of role\n   * @param {string|list} opts.permission - A permission the role should have\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RoleInstance\n   */\n  /* jshint ignore:end */\n  RoleListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n    if (_.isUndefined(opts['permission'])) {\n      throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoleInstance(\n        this._version,\n        payload,\n        this._solution.chatServiceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams RoleInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RoleListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RoleInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.RoleList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a role\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.RoleList#\n   *\n   * @param {string} sid - The SID of the Role resource to fetch\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  RoleListInstance.get = function get(sid) {\n    return new RoleContext(this._version, this._solution.chatServiceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.RoleList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RoleListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RoleListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RoleListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RolePage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.RolePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RoleSolution} solution - Path solution\n *\n * @returns RolePage\n */\n/* jshint ignore:end */\nRolePage = function RolePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RolePage.prototype, Page.prototype);\nRolePage.prototype.constructor = RolePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RoleInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.RolePage#\n *\n * @param {RolePayload} payload - Payload response from the API\n *\n * @returns RoleInstance\n */\n/* jshint ignore:end */\nRolePage.prototype.getInstance = function getInstance(payload) {\n  return new RoleInstance(this._version, payload, this._solution.chatServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.RolePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRolePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRolePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.RoleInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {role.role_type} type - The type of role\n * @property {string} permissions -\n *          An array of the permissions the role has been granted\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - An absolute URL for this user role.\n *\n * @param {V1} version - Version of the resource\n * @param {RolePayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with\n * @param {sid} sid - The SID of the Role resource to fetch\n */\n/* jshint ignore:end */\nRoleInstance = function RoleInstance(version, payload, chatServiceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.permissions = payload.permissions; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {chatServiceSid: chatServiceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RoleInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RoleContext(this._version, this._solution.chatServiceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.RoleInstance#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - A permission the role should have\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.RoleInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoleInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.RoleContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service to fetch the resource from\n * @param {sid} sid - The SID of the Role resource to fetch\n */\n/* jshint ignore:end */\nRoleContext = function RoleContext(version, chatServiceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, sid: sid, };\n  this._uri = `/Services/${chatServiceSid}/Roles/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.RoleContext#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - A permission the role should have\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['permission'])) {\n    throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.RoleContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRoleContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RoleList: RoleList,\n  RolePage: RolePage,\n  RoleInstance: RoleInstance,\n  RoleContext: RoleContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar UserConversationList;\nvar UserConversationPage;\nvar UserConversationInstance;\nvar UserConversationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserConversationList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n * @param {string} userSid - The unique ID for the User.\n */\n/* jshint ignore:end */\nUserConversationList = function UserConversationList(version, chatServiceSid,\n                                                      userSid) {\n  /* jshint ignore:start */\n  /**\n   * @function userConversations\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationContext}\n   */\n  /* jshint ignore:end */\n  function UserConversationListInstance(sid) {\n    return UserConversationListInstance.get(sid);\n  }\n\n  UserConversationListInstance._version = version;\n  // Path Solution\n  UserConversationListInstance._solution = {chatServiceSid: chatServiceSid, userSid: userSid};\n  UserConversationListInstance._uri = `/Services/${chatServiceSid}/Users/${userSid}/Conversations`;\n  /* jshint ignore:start */\n  /**\n   * Streams UserConversationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserConversationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user_conversation\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationList#\n   *\n   * @param {string} conversationSid - The unique SID identifier of the Conversation.\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationContext}\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.get = function get(conversationSid) {\n    return new UserConversationContext(\n      this._version,\n      this._solution.chatServiceSid,\n      this._solution.userSid,\n      conversationSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserConversationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserConversationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserConversationPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserConversationSolution} solution - Path solution\n *\n * @returns UserConversationPage\n */\n/* jshint ignore:end */\nUserConversationPage = function UserConversationPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserConversationPage.prototype, Page.prototype);\nUserConversationPage.prototype.constructor = UserConversationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserConversationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationPage#\n *\n * @param {UserConversationPayload} payload - Payload response from the API\n *\n * @returns UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationPage.prototype.getInstance = function getInstance(payload) {\n  return new UserConversationInstance(\n    this._version,\n    payload,\n    this._solution.chatServiceSid,\n    this._solution.userSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserConversationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserConversationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserConversationContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this conversation.\n * @property {string} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this User Conversation.\n * @property {number} unreadMessagesCount -\n *          The number of unread Messages in the Conversation.\n * @property {number} lastReadMessageIndex - The index of the last read Message .\n * @property {string} participantSid - Participant Sid.\n * @property {string} userSid - The unique ID for the User.\n * @property {string} friendlyName - The human-readable name of this conversation.\n * @property {user_conversation.state} conversationState -\n *          The current state of this User Conversation\n * @property {object} timers - Timer date values for this conversation.\n * @property {string} attributes -\n *          An optional string metadata field you can use to store any data you wish.\n * @property {Date} dateCreated - The date that this conversation was created.\n * @property {Date} dateUpdated - The date that this conversation was last updated.\n * @property {string} createdBy - Creator of this conversation.\n * @property {user_conversation.notification_level} notificationLevel -\n *          The Notification Level of this User Conversation.\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the Conversation resource.\n * @property {string} url - The url\n * @property {string} links -\n *          Absolute URLs to access the participant and conversation of this user conversation.\n *\n * @param {V1} version - Version of the resource\n * @param {UserConversationPayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n * @param {sid} userSid - The unique ID for the User.\n * @param {sid_like} conversationSid -\n *          The unique SID identifier of the Conversation.\n */\n/* jshint ignore:end */\nUserConversationInstance = function UserConversationInstance(version, payload,\n    chatServiceSid, userSid, conversationSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.unreadMessagesCount = deserialize.integer(payload.unread_messages_count); // jshint ignore:line\n  this.lastReadMessageIndex = deserialize.integer(payload.last_read_message_index); // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.userSid = payload.user_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.conversationState = payload.conversation_state; // jshint ignore:line\n  this.timers = payload.timers; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.notificationLevel = payload.notification_level; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    chatServiceSid: chatServiceSid,\n    userSid: userSid,\n    conversationSid: conversationSid || this.conversationSid,\n  };\n};\n\nObject.defineProperty(UserConversationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserConversationContext(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.userSid,\n          this._solution.conversationSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a UserConversationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {user_conversation.notification_level} [opts.notificationLevel] -\n *          The Notification Level of this User Conversation.\n * @param {Date} [opts.lastReadTimestamp] -\n *          The date of the last message read in conversation by the user.\n * @param {number} [opts.lastReadMessageIndex] -\n *          The index of the last read Message.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserConversationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserConversationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserConversationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserConversationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserConversationContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with.\n * @param {sid_like} userSid - The unique SID identifier of the User.\n * @param {sid_like} conversationSid -\n *          The unique SID identifier of the Conversation.\n */\n/* jshint ignore:end */\nUserConversationContext = function UserConversationContext(version,\n                                                            chatServiceSid,\n                                                            userSid,\n                                                            conversationSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {\n    chatServiceSid: chatServiceSid,\n    userSid: userSid,\n    conversationSid: conversationSid,\n  };\n  this._uri = `/Services/${chatServiceSid}/Users/${userSid}/Conversations/${conversationSid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserConversationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {user_conversation.notification_level} [opts.notificationLevel] -\n *          The Notification Level of this User Conversation.\n * @param {Date} [opts.lastReadTimestamp] -\n *          The date of the last message read in conversation by the user.\n * @param {number} [opts.lastReadMessageIndex] -\n *          The index of the last read Message.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'NotificationLevel': _.get(opts, 'notificationLevel'),\n    'LastReadTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastReadTimestamp')),\n    'LastReadMessageIndex': _.get(opts, 'lastReadMessageIndex')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserConversationInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.userSid,\n      this._solution.conversationSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserConversationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserConversationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserConversationInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.userSid,\n      this._solution.conversationSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserConversationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserConversationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserConversationList: UserConversationList,\n  UserConversationPage: UserConversationPage,\n  UserConversationInstance: UserConversationInstance,\n  UserConversationContext: UserConversationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar UserConversationList = require(\n    './user/userConversation').UserConversationList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UserList;\nvar UserPage;\nvar UserInstance;\nvar UserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserList\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.UserList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with\n */\n/* jshint ignore:end */\nUserList = function UserList(version, chatServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function users\n   * @memberof Twilio.Conversations.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  function UserListInstance(sid) {\n    return UserListInstance.get(sid);\n  }\n\n  UserListInstance._version = version;\n  // Path Solution\n  UserListInstance._solution = {chatServiceSid: chatServiceSid};\n  UserListInstance._uri = `/Services/${chatServiceSid}/Users`;\n  /* jshint ignore:start */\n  /**\n   * create a UserInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - The string that identifies the resource's User\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.attributes] -\n   *          The JSON Object string that stores application-specific data\n   * @param {string} [opts.roleSid] -\n   *          The SID of a service-level Role to assign to the user\n   * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed UserInstance\n   */\n  /* jshint ignore:end */\n  UserListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Attributes': _.get(opts, 'attributes'),\n      'RoleSid': _.get(opts, 'roleSid')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserInstance(\n        this._version,\n        payload,\n        this._solution.chatServiceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams UserInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserList#\n   *\n   * @param {string} sid - The SID of the User resource to fetch\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  UserListInstance.get = function get(sid) {\n    return new UserContext(this._version, this._solution.chatServiceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceContext.UserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserPage\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.UserPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserSolution} solution - Path solution\n *\n * @returns UserPage\n */\n/* jshint ignore:end */\nUserPage = function UserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserPage.prototype, Page.prototype);\nUserPage.prototype.constructor = UserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServiceContext.UserPage#\n *\n * @param {UserPayload} payload - Payload response from the API\n *\n * @returns UserInstance\n */\n/* jshint ignore:end */\nUserPage.prototype.getInstance = function getInstance(payload) {\n  return new UserInstance(this._version, payload, this._solution.chatServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.UserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.UserInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with\n * @property {string} roleSid -\n *          The SID of a service-level Role assigned to the user\n * @property {string} identity - The string that identifies the resource's User\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} attributes -\n *          The JSON Object string that stores application-specific data\n * @property {boolean} isOnline -\n *          Whether the User is actively connected to this Conversations Service and online\n * @property {boolean} isNotifiable -\n *          Whether the User has a potentially valid Push Notification registration for this Conversations Service\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - An absolute URL for this user.\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {UserPayload} payload - The instance payload\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with\n * @param {sid_like} sid - The SID of the User resource to fetch\n */\n/* jshint ignore:end */\nUserInstance = function UserInstance(version, payload, chatServiceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.isOnline = payload.is_online; // jshint ignore:line\n  this.isNotifiable = payload.is_notifiable; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {chatServiceSid: chatServiceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(UserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserContext(this._version, this._solution.chatServiceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.UserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.attributes] -\n *          The JSON Object string that stores application-specific data\n * @param {string} [opts.roleSid] -\n *          The SID of a service-level Role to assign to the user\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.UserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the userConversations\n *\n * @function userConversations\n * @memberof Twilio.Conversations.V1.ServiceContext.UserInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationList}\n */\n/* jshint ignore:end */\nUserInstance.prototype.userConversations = function userConversations() {\n  return this._proxy.userConversations;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.UserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext.UserContext\n *\n * @property {Twilio.Conversations.V1.ServiceContext.UserContext.UserConversationList} userConversations -\n *          userConversations resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} chatServiceSid -\n *          The SID of the Conversation Service to fetch the resource from\n * @param {sid_like} sid - The SID of the User resource to fetch\n */\n/* jshint ignore:end */\nUserContext = function UserContext(version, chatServiceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {chatServiceSid: chatServiceSid, sid: sid, };\n  this._uri = `/Services/${chatServiceSid}/Users/${sid}`;\n\n  // Dependents\n  this._userConversations = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.attributes] -\n *          The JSON Object string that stores application-specific data\n * @param {string} [opts.roleSid] -\n *          The SID of a service-level Role to assign to the user\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Attributes': _.get(opts, 'attributes'),\n    'RoleSid': _.get(opts, 'roleSid')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.chatServiceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(UserContext.prototype,\n  'userConversations', {\n    get: function() {\n      if (!this._userConversations) {\n        this._userConversations = new UserConversationList(\n          this._version,\n          this._solution.chatServiceSid,\n          this._solution.sid\n        );\n      }\n      return this._userConversations;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext.UserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserList: UserList,\n  UserPage: UserPage,\n  UserInstance: UserInstance,\n  UserContext: UserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BindingList = require('./service/binding').BindingList;\nvar ConfigurationList = require('./service/configuration').ConfigurationList;\nvar ConversationList = require('./service/conversation').ConversationList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar ParticipantConversationList = require(\n    './service/participantConversation').ParticipantConversationList;\nvar RoleList = require('./service/role').RoleList;\nvar UserList = require('./service/user').UserList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * @constructor Twilio.Conversations.V1.ServiceList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Conversations.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.ServiceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - The human-readable name of this service.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.ServiceList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Conversations.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * @constructor Twilio.Conversations.V1.ServicePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Conversations.V1.ServiceInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this service.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} friendlyName - The human-readable name of this service.\n * @property {Date} dateCreated - The date that this resource was created.\n * @property {Date} dateUpdated - The date that this resource was last updated.\n * @property {string} url - An absolute URL for this service.\n * @property {string} links -\n *          Absolute URLs to access the conversations, users, roles, bindings and configuration of this service.\n *\n * @param {V1} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the conversations\n *\n * @function conversations\n * @memberof Twilio.Conversations.V1.ServiceInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.ConversationList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.conversations = function conversations() {\n  return this._proxy.conversations;\n};\n\n/* jshint ignore:start */\n/**\n * Access the bindings\n *\n * @function bindings\n * @memberof Twilio.Conversations.V1.ServiceInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.BindingList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.bindings = function bindings() {\n  return this._proxy.bindings;\n};\n\n/* jshint ignore:start */\n/**\n * Access the users\n *\n * @function users\n * @memberof Twilio.Conversations.V1.ServiceInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.UserList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.users = function users() {\n  return this._proxy.users;\n};\n\n/* jshint ignore:start */\n/**\n * Access the roles\n *\n * @function roles\n * @memberof Twilio.Conversations.V1.ServiceInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.RoleList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.roles = function roles() {\n  return this._proxy.roles;\n};\n\n/* jshint ignore:start */\n/**\n * Access the configuration\n *\n * @function configuration\n * @memberof Twilio.Conversations.V1.ServiceInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.ConfigurationList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.configuration = function configuration() {\n  return this._proxy.configuration;\n};\n\n/* jshint ignore:start */\n/**\n * Access the participantConversations\n *\n * @function participantConversations\n * @memberof Twilio.Conversations.V1.ServiceInstance#\n *\n * @returns {Twilio.Conversations.V1.ServiceContext.ParticipantConversationList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.participantConversations = function\n    participantConversations() {\n  return this._proxy.participantConversations;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Conversations.V1.ServiceContext\n *\n * @property {Twilio.Conversations.V1.ServiceContext.ConversationList} conversations -\n *          conversations resource\n * @property {Twilio.Conversations.V1.ServiceContext.BindingList} bindings -\n *          bindings resource\n * @property {Twilio.Conversations.V1.ServiceContext.UserList} users -\n *          users resource\n * @property {Twilio.Conversations.V1.ServiceContext.RoleList} roles -\n *          roles resource\n * @property {Twilio.Conversations.V1.ServiceContext.ConfigurationList} configuration -\n *          configuration resource\n * @property {Twilio.Conversations.V1.ServiceContext.ParticipantConversationList} participantConversations -\n *          participantConversations resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._conversations = undefined;\n  this._bindings = undefined;\n  this._users = undefined;\n  this._roles = undefined;\n  this._configuration = undefined;\n  this._participantConversations = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'conversations', {\n    get: function() {\n      if (!this._conversations) {\n        this._conversations = new ConversationList(this._version, this._solution.sid);\n      }\n      return this._conversations;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'bindings', {\n    get: function() {\n      if (!this._bindings) {\n        this._bindings = new BindingList(this._version, this._solution.sid);\n      }\n      return this._bindings;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'users', {\n    get: function() {\n      if (!this._users) {\n        this._users = new UserList(this._version, this._solution.sid);\n      }\n      return this._users;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'roles', {\n    get: function() {\n      if (!this._roles) {\n        this._roles = new RoleList(this._version, this._solution.sid);\n      }\n      return this._roles;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'configuration', {\n    get: function() {\n      if (!this._configuration) {\n        this._configuration = new ConfigurationList(this._version, this._solution.sid);\n      }\n      return this._configuration;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'participantConversations', {\n    get: function() {\n      if (!this._participantConversations) {\n        this._participantConversations = new ParticipantConversationList(this._version, this._solution.sid);\n      }\n      return this._participantConversations;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UserConversationList;\nvar UserConversationPage;\nvar UserConversationInstance;\nvar UserConversationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserConversationList\n *\n * @constructor Twilio.Conversations.V1.UserContext.UserConversationList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n * @param {string} userSid - The unique ID for the User.\n */\n/* jshint ignore:end */\nUserConversationList = function UserConversationList(version, userSid) {\n  /* jshint ignore:start */\n  /**\n   * @function userConversations\n   * @memberof Twilio.Conversations.V1.UserContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.UserContext.UserConversationContext}\n   */\n  /* jshint ignore:end */\n  function UserConversationListInstance(sid) {\n    return UserConversationListInstance.get(sid);\n  }\n\n  UserConversationListInstance._version = version;\n  // Path Solution\n  UserConversationListInstance._solution = {userSid: userSid};\n  UserConversationListInstance._uri = `/Users/${userSid}/Conversations`;\n  /* jshint ignore:start */\n  /**\n   * Streams UserConversationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.UserContext.UserConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserConversationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.UserContext.UserConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.UserContext.UserConversationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserConversationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.UserContext.UserConversationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserConversationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user_conversation\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.UserContext.UserConversationList#\n   *\n   * @param {string} conversationSid - The unique SID identifier of the Conversation.\n   *\n   * @returns {Twilio.Conversations.V1.UserContext.UserConversationContext}\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.get = function get(conversationSid) {\n    return new UserConversationContext(this._version, this._solution.userSid, conversationSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.UserContext.UserConversationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserConversationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserConversationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserConversationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserConversationPage\n *\n * @constructor Twilio.Conversations.V1.UserContext.UserConversationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserConversationSolution} solution - Path solution\n *\n * @returns UserConversationPage\n */\n/* jshint ignore:end */\nUserConversationPage = function UserConversationPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserConversationPage.prototype, Page.prototype);\nUserConversationPage.prototype.constructor = UserConversationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserConversationInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationPage#\n *\n * @param {UserConversationPayload} payload - Payload response from the API\n *\n * @returns UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationPage.prototype.getInstance = function getInstance(payload) {\n  return new UserConversationInstance(this._version, payload, this._solution.userSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserConversationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserConversationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserConversationContext\n *\n * @constructor Twilio.Conversations.V1.UserContext.UserConversationInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account responsible for this conversation.\n * @property {string} chatServiceSid -\n *          The unique ID of the Conversation Service this conversation belongs to.\n * @property {string} conversationSid -\n *          The unique ID of the Conversation for this User Conversation.\n * @property {number} unreadMessagesCount -\n *          The number of unread Messages in the Conversation.\n * @property {number} lastReadMessageIndex - The index of the last read Message .\n * @property {string} participantSid - Participant Sid.\n * @property {string} userSid - The unique ID for the User.\n * @property {string} friendlyName - The human-readable name of this conversation.\n * @property {user_conversation.state} conversationState -\n *          The current state of this User Conversation\n * @property {object} timers - Timer date values for this conversation.\n * @property {string} attributes -\n *          An optional string metadata field you can use to store any data you wish.\n * @property {Date} dateCreated - The date that this conversation was created.\n * @property {Date} dateUpdated - The date that this conversation was last updated.\n * @property {string} createdBy - Creator of this conversation.\n * @property {user_conversation.notification_level} notificationLevel -\n *          The Notification Level of this User Conversation.\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the Conversation resource.\n * @property {string} url - The url\n * @property {string} links -\n *          Absolute URLs to access the participant and conversation of this user conversation.\n *\n * @param {V1} version - Version of the resource\n * @param {UserConversationPayload} payload - The instance payload\n * @param {sid} userSid - The unique ID for the User.\n * @param {sid_like} conversationSid -\n *          The unique SID identifier of the Conversation.\n */\n/* jshint ignore:end */\nUserConversationInstance = function UserConversationInstance(version, payload,\n    userSid, conversationSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.conversationSid = payload.conversation_sid; // jshint ignore:line\n  this.unreadMessagesCount = deserialize.integer(payload.unread_messages_count); // jshint ignore:line\n  this.lastReadMessageIndex = deserialize.integer(payload.last_read_message_index); // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.userSid = payload.user_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.conversationState = payload.conversation_state; // jshint ignore:line\n  this.timers = payload.timers; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.notificationLevel = payload.notification_level; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {userSid: userSid, conversationSid: conversationSid || this.conversationSid, };\n};\n\nObject.defineProperty(UserConversationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserConversationContext(\n          this._version,\n          this._solution.userSid,\n          this._solution.conversationSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a UserConversationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {user_conversation.notification_level} [opts.notificationLevel] -\n *          The Notification Level of this User Conversation.\n * @param {Date} [opts.lastReadTimestamp] -\n *          The date of the last message read in conversation by the user.\n * @param {number} [opts.lastReadMessageIndex] -\n *          The index of the last read Message.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserConversationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserConversationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserConversationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserConversationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserConversationContext\n *\n * @constructor Twilio.Conversations.V1.UserContext.UserConversationContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} userSid - The unique SID identifier of the User.\n * @param {sid_like} conversationSid -\n *          The unique SID identifier of the Conversation.\n */\n/* jshint ignore:end */\nUserConversationContext = function UserConversationContext(version, userSid,\n                                                            conversationSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {userSid: userSid, conversationSid: conversationSid, };\n  this._uri = `/Users/${userSid}/Conversations/${conversationSid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserConversationInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {user_conversation.notification_level} [opts.notificationLevel] -\n *          The Notification Level of this User Conversation.\n * @param {Date} [opts.lastReadTimestamp] -\n *          The date of the last message read in conversation by the user.\n * @param {number} [opts.lastReadMessageIndex] -\n *          The index of the last read Message.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'NotificationLevel': _.get(opts, 'notificationLevel'),\n    'LastReadTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastReadTimestamp')),\n    'LastReadMessageIndex': _.get(opts, 'lastReadMessageIndex')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserConversationInstance(\n      this._version,\n      payload,\n      this._solution.userSid,\n      this._solution.conversationSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserConversationInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserConversationInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserConversationInstance\n */\n/* jshint ignore:end */\nUserConversationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserConversationInstance(\n      this._version,\n      payload,\n      this._solution.userSid,\n      this._solution.conversationSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.UserContext.UserConversationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserConversationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserConversationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserConversationList: UserConversationList,\n  UserConversationPage: UserConversationPage,\n  UserConversationInstance: UserConversationInstance,\n  UserConversationContext: UserConversationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar UserConversationList = require(\n    './user/userConversation').UserConversationList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar UserList;\nvar UserPage;\nvar UserInstance;\nvar UserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserList\n *\n * @constructor Twilio.Conversations.V1.UserList\n *\n * @param {Twilio.Conversations.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nUserList = function UserList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function users\n   * @memberof Twilio.Conversations.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Conversations.V1.UserContext}\n   */\n  /* jshint ignore:end */\n  function UserListInstance(sid) {\n    return UserListInstance.get(sid);\n  }\n\n  UserListInstance._version = version;\n  // Path Solution\n  UserListInstance._solution = {};\n  UserListInstance._uri = `/Users`;\n  /* jshint ignore:start */\n  /**\n   * create a UserInstance\n   *\n   * @function create\n   * @memberof Twilio.Conversations.V1.UserList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - The string that identifies the resource's User\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.attributes] -\n   *          The JSON Object string that stores application-specific data\n   * @param {string} [opts.roleSid] -\n   *          The SID of a service-level Role to assign to the user\n   * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed UserInstance\n   */\n  /* jshint ignore:end */\n  UserListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Attributes': _.get(opts, 'attributes'),\n      'RoleSid': _.get(opts, 'roleSid')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams UserInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Conversations.V1.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Conversations.V1.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Conversations.V1.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Conversations.V1.UserList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user\n   *\n   * @function get\n   * @memberof Twilio.Conversations.V1.UserList#\n   *\n   * @param {string} sid - The SID of the User resource to fetch\n   *\n   * @returns {Twilio.Conversations.V1.UserContext}\n   */\n  /* jshint ignore:end */\n  UserListInstance.get = function get(sid) {\n    return new UserContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Conversations.V1.UserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserPage\n *\n * @constructor Twilio.Conversations.V1.UserPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserSolution} solution - Path solution\n *\n * @returns UserPage\n */\n/* jshint ignore:end */\nUserPage = function UserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserPage.prototype, Page.prototype);\nUserPage.prototype.constructor = UserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserInstance\n *\n * @function getInstance\n * @memberof Twilio.Conversations.V1.UserPage#\n *\n * @param {UserPayload} payload - Payload response from the API\n *\n * @returns UserInstance\n */\n/* jshint ignore:end */\nUserPage.prototype.getInstance = function getInstance(payload) {\n  return new UserInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.UserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.Conversations.V1.UserInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} chatServiceSid -\n *          The SID of the Conversation Service that the resource is associated with\n * @property {string} roleSid -\n *          The SID of a service-level Role assigned to the user\n * @property {string} identity - The string that identifies the resource's User\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} attributes -\n *          The JSON Object string that stores application-specific data\n * @property {boolean} isOnline -\n *          Whether the User is actively connected to this Conversations Service and online\n * @property {boolean} isNotifiable -\n *          Whether the User has a potentially valid Push Notification registration for this Conversations Service\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - An absolute URL for this user.\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {UserPayload} payload - The instance payload\n * @param {sid_like} sid - The SID of the User resource to fetch\n */\n/* jshint ignore:end */\nUserInstance = function UserInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.isOnline = payload.is_online; // jshint ignore:line\n  this.isNotifiable = payload.is_notifiable; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(UserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.UserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.attributes] -\n *          The JSON Object string that stores application-specific data\n * @param {string} [opts.roleSid] -\n *          The SID of a service-level Role to assign to the user\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.UserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the userConversations\n *\n * @function userConversations\n * @memberof Twilio.Conversations.V1.UserInstance#\n *\n * @returns {Twilio.Conversations.V1.UserContext.UserConversationList}\n */\n/* jshint ignore:end */\nUserInstance.prototype.userConversations = function userConversations() {\n  return this._proxy.userConversations;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.UserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.Conversations.V1.UserContext\n *\n * @property {Twilio.Conversations.V1.UserContext.UserConversationList} userConversations -\n *          userConversations resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID of the User resource to fetch\n */\n/* jshint ignore:end */\nUserContext = function UserContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Users/${sid}`;\n\n  // Dependents\n  this._userConversations = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.Conversations.V1.UserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.attributes] -\n *          The JSON Object string that stores application-specific data\n * @param {string} [opts.roleSid] -\n *          The SID of a service-level Role to assign to the user\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Attributes': _.get(opts, 'attributes'),\n    'RoleSid': _.get(opts, 'roleSid')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.Conversations.V1.UserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.Conversations.V1.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(UserContext.prototype,\n  'userConversations', {\n    get: function() {\n      if (!this._userConversations) {\n        this._userConversations = new UserConversationList(this._version, this._solution.sid);\n      }\n      return this._userConversations;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Conversations.V1.UserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserList: UserList,\n  UserPage: UserPage,\n  UserInstance: UserInstance,\n  UserContext: UserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar AddressConfigurationList = require(\n    './v1/addressConfiguration').AddressConfigurationList;\nvar ConfigurationList = require('./v1/configuration').ConfigurationList;\nvar ConversationList = require('./v1/conversation').ConversationList;\nvar CredentialList = require('./v1/credential').CredentialList;\nvar ParticipantConversationList = require(\n    './v1/participantConversation').ParticipantConversationList;\nvar RoleList = require('./v1/role').RoleList;\nvar ServiceList = require('./v1/service').ServiceList;\nvar UserList = require('./v1/user').UserList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Conversations\n *\n * @constructor Twilio.Conversations.V1\n *\n * @property {Twilio.Conversations.V1.ConfigurationList} configuration -\n *          configuration resource\n * @property {Twilio.Conversations.V1.AddressConfigurationList} addressConfigurations -\n *          addressConfigurations resource\n * @property {Twilio.Conversations.V1.ConversationList} conversations -\n *          conversations resource\n * @property {Twilio.Conversations.V1.CredentialList} credentials -\n *          credentials resource\n * @property {Twilio.Conversations.V1.ParticipantConversationList} participantConversations -\n *          participantConversations resource\n * @property {Twilio.Conversations.V1.RoleList} roles - roles resource\n * @property {Twilio.Conversations.V1.ServiceList} services - services resource\n * @property {Twilio.Conversations.V1.UserList} users - users resource\n *\n * @param {Twilio.Conversations} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._configuration = undefined;\n  this._addressConfigurations = undefined;\n  this._conversations = undefined;\n  this._credentials = undefined;\n  this._participantConversations = undefined;\n  this._roles = undefined;\n  this._services = undefined;\n  this._users = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'configuration', {\n    get: function() {\n      this._configuration = this._configuration || new ConfigurationList(this);\n      return this._configuration;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'addressConfigurations', {\n    get: function() {\n      this._addressConfigurations = this._addressConfigurations || new AddressConfigurationList(this);\n      return this._addressConfigurations;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'conversations', {\n    get: function() {\n      this._conversations = this._conversations || new ConversationList(this);\n      return this._conversations;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'credentials', {\n    get: function() {\n      this._credentials = this._credentials || new CredentialList(this);\n      return this._credentials;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'participantConversations', {\n    get: function() {\n      this._participantConversations = this._participantConversations || new ParticipantConversationList(this);\n      return this._participantConversations;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'roles', {\n    get: function() {\n      this._roles = this._roles || new RoleList(this);\n      return this._roles;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'users', {\n    get: function() {\n      this._users = this._users || new UserList(this);\n      return this._users;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./conversations/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize conversations domain\n *\n * @constructor Twilio.Conversations\n *\n * @property {Twilio.Conversations.V1} v1 - v1 version\n * @property {Twilio.Conversations.V1.ConfigurationList} configuration -\n *          configuration resource\n * @property {Twilio.Conversations.V1.AddressConfigurationList} addressConfigurations -\n *          addressConfigurations resource\n * @property {Twilio.Conversations.V1.ConversationList} conversations -\n *          conversations resource\n * @property {Twilio.Conversations.V1.CredentialList} credentials -\n *          credentials resource\n * @property {Twilio.Conversations.V1.ParticipantConversationList} participantConversations -\n *          participantConversations resource\n * @property {Twilio.Conversations.V1.RoleList} roles - roles resource\n * @property {Twilio.Conversations.V1.ServiceList} services - services resource\n * @property {Twilio.Conversations.V1.UserList} users - users resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Conversations(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://conversations.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Conversations.prototype, Domain.prototype);\nConversations.prototype.constructor = Conversations;\n\nObject.defineProperty(Conversations.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Conversations.prototype,\n  'configuration', {\n    get: function() {\n      return this.v1.configuration;\n    }\n});\n\nObject.defineProperty(Conversations.prototype,\n  'addressConfigurations', {\n    get: function() {\n      return this.v1.addressConfigurations;\n    }\n});\n\nObject.defineProperty(Conversations.prototype,\n  'conversations', {\n    get: function() {\n      return this.v1.conversations;\n    }\n});\n\nObject.defineProperty(Conversations.prototype,\n  'credentials', {\n    get: function() {\n      return this.v1.credentials;\n    }\n});\n\nObject.defineProperty(Conversations.prototype,\n  'participantConversations', {\n    get: function() {\n      return this.v1.participantConversations;\n    }\n});\n\nObject.defineProperty(Conversations.prototype,\n  'roles', {\n    get: function() {\n      return this.v1.roles;\n    }\n});\n\nObject.defineProperty(Conversations.prototype,\n  'services', {\n    get: function() {\n      return this.v1.services;\n    }\n});\n\nObject.defineProperty(Conversations.prototype,\n  'users', {\n    get: function() {\n      return this.v1.users;\n    }\n});\n\nmodule.exports = Conversations;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar EventTypeList;\nvar EventTypePage;\nvar EventTypeInstance;\nvar EventTypeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EventTypeList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.EventTypeList\n *\n * @param {Twilio.Events.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nEventTypeList = function EventTypeList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function eventTypes\n   * @memberof Twilio.Events.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Events.V1.EventTypeContext}\n   */\n  /* jshint ignore:end */\n  function EventTypeListInstance(sid) {\n    return EventTypeListInstance.get(sid);\n  }\n\n  EventTypeListInstance._version = version;\n  // Path Solution\n  EventTypeListInstance._solution = {};\n  EventTypeListInstance._uri = `/Types`;\n  /* jshint ignore:start */\n  /**\n   * Streams EventTypeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Events.V1.EventTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.schemaId] - A string to filter Event Types by schema.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EventTypeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EventTypeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Events.V1.EventTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.schemaId] - A string to filter Event Types by schema.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventTypeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EventTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Events.V1.EventTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.schemaId] - A string to filter Event Types by schema.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventTypeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'SchemaId': _.get(opts, 'schemaId'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EventTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Events.V1.EventTypeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventTypeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a event_type\n   *\n   * @function get\n   * @memberof Twilio.Events.V1.EventTypeList#\n   *\n   * @param {string} type - A string that uniquely identifies this Event Type.\n   *\n   * @returns {Twilio.Events.V1.EventTypeContext}\n   */\n  /* jshint ignore:end */\n  EventTypeListInstance.get = function get(type) {\n    return new EventTypeContext(this._version, type);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Events.V1.EventTypeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EventTypeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EventTypeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EventTypeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventTypePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.EventTypePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EventTypeSolution} solution - Path solution\n *\n * @returns EventTypePage\n */\n/* jshint ignore:end */\nEventTypePage = function EventTypePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EventTypePage.prototype, Page.prototype);\nEventTypePage.prototype.constructor = EventTypePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EventTypeInstance\n *\n * @function getInstance\n * @memberof Twilio.Events.V1.EventTypePage#\n *\n * @param {EventTypePayload} payload - Payload response from the API\n *\n * @returns EventTypeInstance\n */\n/* jshint ignore:end */\nEventTypePage.prototype.getInstance = function getInstance(payload) {\n  return new EventTypeInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.EventTypePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventTypePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventTypePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventTypeContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.EventTypeInstance\n *\n * @property {string} type - The Event Type identifier.\n * @property {string} schemaId - The Schema identifier for this Event Type.\n * @property {Date} dateCreated - The date this Event Type was created.\n * @property {Date} dateUpdated - The date this Event Type was updated.\n * @property {string} description - Event Type description.\n * @property {string} url - The URL of this resource.\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {EventTypePayload} payload - The instance payload\n * @param {string} type - A string that uniquely identifies this Event Type.\n */\n/* jshint ignore:end */\nEventTypeInstance = function EventTypeInstance(version, payload, type) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.type = payload.type; // jshint ignore:line\n  this.schemaId = payload.schema_id; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {type: type || this.type, };\n};\n\nObject.defineProperty(EventTypeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EventTypeContext(this._version, this._solution.type);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EventTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.EventTypeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EventTypeInstance\n */\n/* jshint ignore:end */\nEventTypeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.EventTypeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventTypeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventTypeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventTypeContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.EventTypeContext\n *\n * @param {V1} version - Version of the resource\n * @param {string} type - A string that uniquely identifies this Event Type.\n */\n/* jshint ignore:end */\nEventTypeContext = function EventTypeContext(version, type) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {type: type, };\n  this._uri = `/Types/${type}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EventTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.EventTypeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EventTypeInstance\n */\n/* jshint ignore:end */\nEventTypeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EventTypeInstance(this._version, payload, this._solution.type));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.EventTypeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventTypeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEventTypeContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EventTypeList: EventTypeList,\n  EventTypePage: EventTypePage,\n  EventTypeInstance: EventTypeInstance,\n  EventTypeContext: EventTypeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SchemaVersionList;\nvar SchemaVersionPage;\nvar SchemaVersionInstance;\nvar SchemaVersionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SchemaVersionList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SchemaContext.SchemaVersionList\n *\n * @param {Twilio.Events.V1} version - Version of the resource\n * @param {string} id - The unique identifier of the schema.\n */\n/* jshint ignore:end */\nSchemaVersionList = function SchemaVersionList(version, id) {\n  /* jshint ignore:start */\n  /**\n   * @function versions\n   * @memberof Twilio.Events.V1.SchemaContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Events.V1.SchemaContext.SchemaVersionContext}\n   */\n  /* jshint ignore:end */\n  function SchemaVersionListInstance(sid) {\n    return SchemaVersionListInstance.get(sid);\n  }\n\n  SchemaVersionListInstance._version = version;\n  // Path Solution\n  SchemaVersionListInstance._solution = {id: id};\n  SchemaVersionListInstance._uri = `/Schemas/${id}/Versions`;\n  /* jshint ignore:start */\n  /**\n   * Streams SchemaVersionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SchemaVersionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SchemaVersionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SchemaVersionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SchemaVersionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SchemaVersionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SchemaVersionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SchemaVersionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SchemaVersionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SchemaVersionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a schema_version\n   *\n   * @function get\n   * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionList#\n   *\n   * @param {string} schemaVersion - The version of the schema\n   *\n   * @returns {Twilio.Events.V1.SchemaContext.SchemaVersionContext}\n   */\n  /* jshint ignore:end */\n  SchemaVersionListInstance.get = function get(schemaVersion) {\n    return new SchemaVersionContext(this._version, this._solution.id, schemaVersion);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SchemaVersionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SchemaVersionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SchemaVersionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SchemaVersionPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SchemaContext.SchemaVersionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SchemaVersionSolution} solution - Path solution\n *\n * @returns SchemaVersionPage\n */\n/* jshint ignore:end */\nSchemaVersionPage = function SchemaVersionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SchemaVersionPage.prototype, Page.prototype);\nSchemaVersionPage.prototype.constructor = SchemaVersionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SchemaVersionInstance\n *\n * @function getInstance\n * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionPage#\n *\n * @param {SchemaVersionPayload} payload - Payload response from the API\n *\n * @returns SchemaVersionInstance\n */\n/* jshint ignore:end */\nSchemaVersionPage.prototype.getInstance = function getInstance(payload) {\n  return new SchemaVersionInstance(this._version, payload, this._solution.id);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSchemaVersionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSchemaVersionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SchemaVersionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SchemaContext.SchemaVersionInstance\n *\n * @property {string} id - The unique identifier of the schema.\n * @property {number} schemaVersion - The version of this schema.\n * @property {Date} dateCreated - The date the schema version was created.\n * @property {string} url - The URL of this resource.\n * @property {string} raw - The raw\n *\n * @param {V1} version - Version of the resource\n * @param {SchemaVersionPayload} payload - The instance payload\n * @param {string} id - The unique identifier of the schema.\n * @param {integer} schemaVersion - The version of the schema\n */\n/* jshint ignore:end */\nSchemaVersionInstance = function SchemaVersionInstance(version, payload, id,\n                                                        schemaVersion) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.id = payload.id; // jshint ignore:line\n  this.schemaVersion = deserialize.integer(payload.schema_version); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.raw = payload.raw; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {id: id, schemaVersion: schemaVersion || this.schemaVersion, };\n};\n\nObject.defineProperty(SchemaVersionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SchemaVersionContext(\n          this._version,\n          this._solution.id,\n          this._solution.schemaVersion\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SchemaVersionInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SchemaVersionInstance\n */\n/* jshint ignore:end */\nSchemaVersionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSchemaVersionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSchemaVersionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SchemaVersionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SchemaContext.SchemaVersionContext\n *\n * @param {V1} version - Version of the resource\n * @param {string} id - The unique identifier of the schema.\n * @param {integer} schemaVersion - The version of the schema\n */\n/* jshint ignore:end */\nSchemaVersionContext = function SchemaVersionContext(version, id, schemaVersion)\n                                                      {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {id: id, schemaVersion: schemaVersion, };\n  this._uri = `/Schemas/${id}/Versions/${schemaVersion}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SchemaVersionInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SchemaVersionInstance\n */\n/* jshint ignore:end */\nSchemaVersionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SchemaVersionInstance(\n      this._version,\n      payload,\n      this._solution.id,\n      this._solution.schemaVersion\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SchemaContext.SchemaVersionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSchemaVersionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSchemaVersionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SchemaVersionList: SchemaVersionList,\n  SchemaVersionPage: SchemaVersionPage,\n  SchemaVersionInstance: SchemaVersionInstance,\n  SchemaVersionContext: SchemaVersionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar SchemaVersionList = require('./schema/version').SchemaVersionList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SchemaList;\nvar SchemaPage;\nvar SchemaInstance;\nvar SchemaContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SchemaList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SchemaList\n *\n * @param {Twilio.Events.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSchemaList = function SchemaList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function schemas\n   * @memberof Twilio.Events.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Events.V1.SchemaContext}\n   */\n  /* jshint ignore:end */\n  function SchemaListInstance(sid) {\n    return SchemaListInstance.get(sid);\n  }\n\n  SchemaListInstance._version = version;\n  // Path Solution\n  SchemaListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a schema\n   *\n   * @function get\n   * @memberof Twilio.Events.V1.SchemaList#\n   *\n   * @param {string} id - The unique identifier of the schema.\n   *\n   * @returns {Twilio.Events.V1.SchemaContext}\n   */\n  /* jshint ignore:end */\n  SchemaListInstance.get = function get(id) {\n    return new SchemaContext(this._version, id);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Events.V1.SchemaList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SchemaListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SchemaListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SchemaListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SchemaPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SchemaPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SchemaSolution} solution - Path solution\n *\n * @returns SchemaPage\n */\n/* jshint ignore:end */\nSchemaPage = function SchemaPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SchemaPage.prototype, Page.prototype);\nSchemaPage.prototype.constructor = SchemaPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SchemaInstance\n *\n * @function getInstance\n * @memberof Twilio.Events.V1.SchemaPage#\n *\n * @param {SchemaPayload} payload - Payload response from the API\n *\n * @returns SchemaInstance\n */\n/* jshint ignore:end */\nSchemaPage.prototype.getInstance = function getInstance(payload) {\n  return new SchemaInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SchemaPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSchemaPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSchemaPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SchemaContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SchemaInstance\n *\n * @property {string} id - Schema Identifier.\n * @property {string} url - The URL of this resource.\n * @property {string} links - Nested resource URLs.\n * @property {Date} latestVersionDateCreated -\n *          The date that the latest schema version was created.\n * @property {number} latestVersion - Latest schema version.\n *\n * @param {V1} version - Version of the resource\n * @param {SchemaPayload} payload - The instance payload\n * @param {string} id - The unique identifier of the schema.\n */\n/* jshint ignore:end */\nSchemaInstance = function SchemaInstance(version, payload, id) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.id = payload.id; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.latestVersionDateCreated = deserialize.iso8601DateTime(payload.latest_version_date_created); // jshint ignore:line\n  this.latestVersion = deserialize.integer(payload.latest_version); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {id: id || this.id, };\n};\n\nObject.defineProperty(SchemaInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SchemaContext(this._version, this._solution.id);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SchemaInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SchemaInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SchemaInstance\n */\n/* jshint ignore:end */\nSchemaInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the versions\n *\n * @function versions\n * @memberof Twilio.Events.V1.SchemaInstance#\n *\n * @returns {Twilio.Events.V1.SchemaContext.SchemaVersionList}\n */\n/* jshint ignore:end */\nSchemaInstance.prototype.versions = function versions() {\n  return this._proxy.versions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SchemaInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSchemaInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSchemaInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SchemaContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SchemaContext\n *\n * @property {Twilio.Events.V1.SchemaContext.SchemaVersionList} versions -\n *          versions resource\n *\n * @param {V1} version - Version of the resource\n * @param {string} id - The unique identifier of the schema.\n */\n/* jshint ignore:end */\nSchemaContext = function SchemaContext(version, id) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {id: id, };\n  this._uri = `/Schemas/${id}`;\n\n  // Dependents\n  this._versions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SchemaInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SchemaContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SchemaInstance\n */\n/* jshint ignore:end */\nSchemaContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SchemaInstance(this._version, payload, this._solution.id));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SchemaContext.prototype,\n  'versions', {\n    get: function() {\n      if (!this._versions) {\n        this._versions = new SchemaVersionList(this._version, this._solution.id);\n      }\n      return this._versions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SchemaContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSchemaContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSchemaContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SchemaList: SchemaList,\n  SchemaPage: SchemaPage,\n  SchemaInstance: SchemaInstance,\n  SchemaContext: SchemaContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SinkTestList;\nvar SinkTestPage;\nvar SinkTestInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkTestList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkContext.SinkTestList\n *\n * @param {Twilio.Events.V1} version - Version of the resource\n * @param {string} sid - A string that uniquely identifies this Sink.\n */\n/* jshint ignore:end */\nSinkTestList = function SinkTestList(version, sid) {\n  /* jshint ignore:start */\n  /**\n   * @function sinkTest\n   * @memberof Twilio.Events.V1.SinkContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Events.V1.SinkContext.SinkTestContext}\n   */\n  /* jshint ignore:end */\n  function SinkTestListInstance(sid) {\n    return SinkTestListInstance.get(sid);\n  }\n\n  SinkTestListInstance._version = version;\n  // Path Solution\n  SinkTestListInstance._solution = {sid: sid};\n  SinkTestListInstance._uri = `/Sinks/${sid}/Test`;\n  /* jshint ignore:start */\n  /**\n   * create a SinkTestInstance\n   *\n   * @function create\n   * @memberof Twilio.Events.V1.SinkContext.SinkTestList#\n   *\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SinkTestInstance\n   */\n  /* jshint ignore:end */\n  SinkTestListInstance.create = function create(callback) {\n    var deferred = Q.defer();\n    var promise = this._version.create({uri: this._uri, method: 'POST'});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SinkTestInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Events.V1.SinkContext.SinkTestList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SinkTestListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SinkTestListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SinkTestListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkTestPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkContext.SinkTestPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SinkTestSolution} solution - Path solution\n *\n * @returns SinkTestPage\n */\n/* jshint ignore:end */\nSinkTestPage = function SinkTestPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SinkTestPage.prototype, Page.prototype);\nSinkTestPage.prototype.constructor = SinkTestPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SinkTestInstance\n *\n * @function getInstance\n * @memberof Twilio.Events.V1.SinkContext.SinkTestPage#\n *\n * @param {SinkTestPayload} payload - Payload response from the API\n *\n * @returns SinkTestInstance\n */\n/* jshint ignore:end */\nSinkTestPage.prototype.getInstance = function getInstance(payload) {\n  return new SinkTestInstance(this._version, payload, this._solution.sid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SinkContext.SinkTestPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSinkTestPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSinkTestPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkTestContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkContext.SinkTestInstance\n *\n * @property {string} result -\n *          Feedback indicating whether the test event was generated.\n *\n * @param {V1} version - Version of the resource\n * @param {SinkTestPayload} payload - The instance payload\n * @param {sid} sid - A string that uniquely identifies this Sink.\n */\n/* jshint ignore:end */\nSinkTestInstance = function SinkTestInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.result = payload.result; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SinkContext.SinkTestInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSinkTestInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSinkTestInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SinkTestList: SinkTestList,\n  SinkTestPage: SinkTestPage,\n  SinkTestInstance: SinkTestInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SinkValidateList;\nvar SinkValidatePage;\nvar SinkValidateInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkValidateList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkContext.SinkValidateList\n *\n * @param {Twilio.Events.V1} version - Version of the resource\n * @param {string} sid - A string that uniquely identifies this Sink.\n */\n/* jshint ignore:end */\nSinkValidateList = function SinkValidateList(version, sid) {\n  /* jshint ignore:start */\n  /**\n   * @function sinkValidate\n   * @memberof Twilio.Events.V1.SinkContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Events.V1.SinkContext.SinkValidateContext}\n   */\n  /* jshint ignore:end */\n  function SinkValidateListInstance(sid) {\n    return SinkValidateListInstance.get(sid);\n  }\n\n  SinkValidateListInstance._version = version;\n  // Path Solution\n  SinkValidateListInstance._solution = {sid: sid};\n  SinkValidateListInstance._uri = `/Sinks/${sid}/Validate`;\n  /* jshint ignore:start */\n  /**\n   * create a SinkValidateInstance\n   *\n   * @function create\n   * @memberof Twilio.Events.V1.SinkContext.SinkValidateList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.testId -\n   *          A string that uniquely identifies the test event for a Sink being validated.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SinkValidateInstance\n   */\n  /* jshint ignore:end */\n  SinkValidateListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['testId'])) {\n      throw new Error('Required parameter \"opts[\\'testId\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'TestId': _.get(opts, 'testId')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SinkValidateInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Events.V1.SinkContext.SinkValidateList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SinkValidateListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SinkValidateListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SinkValidateListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkValidatePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkContext.SinkValidatePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SinkValidateSolution} solution - Path solution\n *\n * @returns SinkValidatePage\n */\n/* jshint ignore:end */\nSinkValidatePage = function SinkValidatePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SinkValidatePage.prototype, Page.prototype);\nSinkValidatePage.prototype.constructor = SinkValidatePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SinkValidateInstance\n *\n * @function getInstance\n * @memberof Twilio.Events.V1.SinkContext.SinkValidatePage#\n *\n * @param {SinkValidatePayload} payload - Payload response from the API\n *\n * @returns SinkValidateInstance\n */\n/* jshint ignore:end */\nSinkValidatePage.prototype.getInstance = function getInstance(payload) {\n  return new SinkValidateInstance(this._version, payload, this._solution.sid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SinkContext.SinkValidatePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSinkValidatePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSinkValidatePage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkValidateContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkContext.SinkValidateInstance\n *\n * @property {string} result -\n *          Feedback indicating whether the given Sink was validated.\n *\n * @param {V1} version - Version of the resource\n * @param {SinkValidatePayload} payload - The instance payload\n * @param {sid} sid - A string that uniquely identifies this Sink.\n */\n/* jshint ignore:end */\nSinkValidateInstance = function SinkValidateInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.result = payload.result; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SinkContext.SinkValidateInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSinkValidateInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSinkValidateInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SinkValidateList: SinkValidateList,\n  SinkValidatePage: SinkValidatePage,\n  SinkValidateInstance: SinkValidateInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar SinkTestList = require('./sink/sinkTest').SinkTestList;\nvar SinkValidateList = require('./sink/sinkValidate').SinkValidateList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SinkList;\nvar SinkPage;\nvar SinkInstance;\nvar SinkContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkList\n *\n * @param {Twilio.Events.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSinkList = function SinkList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function sinks\n   * @memberof Twilio.Events.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Events.V1.SinkContext}\n   */\n  /* jshint ignore:end */\n  function SinkListInstance(sid) {\n    return SinkListInstance.get(sid);\n  }\n\n  SinkListInstance._version = version;\n  // Path Solution\n  SinkListInstance._solution = {};\n  SinkListInstance._uri = `/Sinks`;\n  /* jshint ignore:start */\n  /**\n   * create a SinkInstance\n   *\n   * @function create\n   * @memberof Twilio.Events.V1.SinkList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.description - Sink Description.\n   * @param {object} opts.sinkConfiguration - JSON Sink configuration.\n   * @param {sink.sink_type} opts.sinkType - Sink type.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SinkInstance\n   */\n  /* jshint ignore:end */\n  SinkListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['description'])) {\n      throw new Error('Required parameter \"opts[\\'description\\']\" missing.');\n    }\n    if (_.isUndefined(opts['sinkConfiguration'])) {\n      throw new Error('Required parameter \"opts[\\'sinkConfiguration\\']\" missing.');\n    }\n    if (_.isUndefined(opts['sinkType'])) {\n      throw new Error('Required parameter \"opts[\\'sinkType\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Description': _.get(opts, 'description'),\n      'SinkConfiguration': serialize.object(_.get(opts, 'sinkConfiguration')),\n      'SinkType': _.get(opts, 'sinkType')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SinkInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SinkInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Events.V1.SinkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.inUse] -\n   *          A boolean to return sinks used/not used by a subscription.\n   * @param {string} [opts.status] - A string to filter sinks by status.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SinkListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SinkInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Events.V1.SinkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.inUse] -\n   *          A boolean to return sinks used/not used by a subscription.\n   * @param {string} [opts.status] - A string to filter sinks by status.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SinkListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SinkInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Events.V1.SinkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.inUse] -\n   *          A boolean to return sinks used/not used by a subscription.\n   * @param {string} [opts.status] - A string to filter sinks by status.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SinkListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'InUse': serialize.bool(_.get(opts, 'inUse')),\n      'Status': _.get(opts, 'status'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SinkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SinkInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Events.V1.SinkList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SinkListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SinkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sink\n   *\n   * @function get\n   * @memberof Twilio.Events.V1.SinkList#\n   *\n   * @param {string} sid - A string that uniquely identifies this Sink.\n   *\n   * @returns {Twilio.Events.V1.SinkContext}\n   */\n  /* jshint ignore:end */\n  SinkListInstance.get = function get(sid) {\n    return new SinkContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Events.V1.SinkList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SinkListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SinkListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SinkListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SinkSolution} solution - Path solution\n *\n * @returns SinkPage\n */\n/* jshint ignore:end */\nSinkPage = function SinkPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SinkPage.prototype, Page.prototype);\nSinkPage.prototype.constructor = SinkPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SinkInstance\n *\n * @function getInstance\n * @memberof Twilio.Events.V1.SinkPage#\n *\n * @param {SinkPayload} payload - Payload response from the API\n *\n * @returns SinkInstance\n */\n/* jshint ignore:end */\nSinkPage.prototype.getInstance = function getInstance(payload) {\n  return new SinkInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SinkPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSinkPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSinkPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkInstance\n *\n * @property {Date} dateCreated - The date this Sink was created\n * @property {Date} dateUpdated - The date this Sink was updated\n * @property {string} description - Sink Description\n * @property {string} sid - A string that uniquely identifies this Sink.\n * @property {object} sinkConfiguration - JSON Sink configuration.\n * @property {sink.sink_type} sinkType - Sink type.\n * @property {sink.status} status - The Status of this Sink\n * @property {string} url - The URL of this resource.\n * @property {string} links - Nested resource URLs.\n *\n * @param {V1} version - Version of the resource\n * @param {SinkPayload} payload - The instance payload\n * @param {sid} sid - A string that uniquely identifies this Sink.\n */\n/* jshint ignore:end */\nSinkInstance = function SinkInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.sinkConfiguration = payload.sink_configuration; // jshint ignore:line\n  this.sinkType = payload.sink_type; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SinkInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SinkContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SinkInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SinkInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SinkInstance\n */\n/* jshint ignore:end */\nSinkInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SinkInstance\n *\n * @function remove\n * @memberof Twilio.Events.V1.SinkInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SinkInstance\n */\n/* jshint ignore:end */\nSinkInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SinkInstance\n *\n * @function update\n * @memberof Twilio.Events.V1.SinkInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.description - Sink Description\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SinkInstance\n */\n/* jshint ignore:end */\nSinkInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the sinkTest\n *\n * @function sinkTest\n * @memberof Twilio.Events.V1.SinkInstance#\n *\n * @returns {Twilio.Events.V1.SinkContext.SinkTestList}\n */\n/* jshint ignore:end */\nSinkInstance.prototype.sinkTest = function sinkTest() {\n  return this._proxy.sinkTest;\n};\n\n/* jshint ignore:start */\n/**\n * Access the sinkValidate\n *\n * @function sinkValidate\n * @memberof Twilio.Events.V1.SinkInstance#\n *\n * @returns {Twilio.Events.V1.SinkContext.SinkValidateList}\n */\n/* jshint ignore:end */\nSinkInstance.prototype.sinkValidate = function sinkValidate() {\n  return this._proxy.sinkValidate;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SinkInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSinkInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSinkInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SinkContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SinkContext\n *\n * @property {Twilio.Events.V1.SinkContext.SinkTestList} sinkTest -\n *          sinkTest resource\n * @property {Twilio.Events.V1.SinkContext.SinkValidateList} sinkValidate -\n *          sinkValidate resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - A string that uniquely identifies this Sink.\n */\n/* jshint ignore:end */\nSinkContext = function SinkContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Sinks/${sid}`;\n\n  // Dependents\n  this._sinkTest = undefined;\n  this._sinkValidate = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SinkInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SinkContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SinkInstance\n */\n/* jshint ignore:end */\nSinkContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SinkInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SinkInstance\n *\n * @function remove\n * @memberof Twilio.Events.V1.SinkContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SinkInstance\n */\n/* jshint ignore:end */\nSinkContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SinkInstance\n *\n * @function update\n * @memberof Twilio.Events.V1.SinkContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.description - Sink Description\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SinkInstance\n */\n/* jshint ignore:end */\nSinkContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['description'])) {\n    throw new Error('Required parameter \"opts[\\'description\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Description': _.get(opts, 'description')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SinkInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SinkContext.prototype,\n  'sinkTest', {\n    get: function() {\n      if (!this._sinkTest) {\n        this._sinkTest = new SinkTestList(this._version, this._solution.sid);\n      }\n      return this._sinkTest;\n    }\n});\n\nObject.defineProperty(SinkContext.prototype,\n  'sinkValidate', {\n    get: function() {\n      if (!this._sinkValidate) {\n        this._sinkValidate = new SinkValidateList(this._version, this._solution.sid);\n      }\n      return this._sinkValidate;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SinkContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSinkContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSinkContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SinkList: SinkList,\n  SinkPage: SinkPage,\n  SinkInstance: SinkInstance,\n  SinkContext: SinkContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SubscribedEventList;\nvar SubscribedEventPage;\nvar SubscribedEventInstance;\nvar SubscribedEventContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribedEventList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SubscriptionContext.SubscribedEventList\n *\n * @param {Twilio.Events.V1} version - Version of the resource\n * @param {string} subscriptionSid - Subscription SID.\n */\n/* jshint ignore:end */\nSubscribedEventList = function SubscribedEventList(version, subscriptionSid) {\n  /* jshint ignore:start */\n  /**\n   * @function subscribedEvents\n   * @memberof Twilio.Events.V1.SubscriptionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Events.V1.SubscriptionContext.SubscribedEventContext}\n   */\n  /* jshint ignore:end */\n  function SubscribedEventListInstance(sid) {\n    return SubscribedEventListInstance.get(sid);\n  }\n\n  SubscribedEventListInstance._version = version;\n  // Path Solution\n  SubscribedEventListInstance._solution = {subscriptionSid: subscriptionSid};\n  SubscribedEventListInstance._uri = `/Subscriptions/${subscriptionSid}/SubscribedEvents`;\n  /* jshint ignore:start */\n  /**\n   * Streams SubscribedEventInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SubscribedEventListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SubscribedEventInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SubscribedEventListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SubscribedEventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SubscribedEventListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscribedEventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SubscribedEventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SubscribedEventListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscribedEventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a SubscribedEventInstance\n   *\n   * @function create\n   * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.type - Type of event being subscribed to.\n   * @param {number} [opts.schemaVersion] -\n   *          The schema version that the subscription should use.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SubscribedEventInstance\n   */\n  /* jshint ignore:end */\n  SubscribedEventListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Type': _.get(opts, 'type'), 'SchemaVersion': _.get(opts, 'schemaVersion')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscribedEventInstance(\n        this._version,\n        payload,\n        this._solution.subscriptionSid,\n        this._solution.type\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a subscribed_event\n   *\n   * @function get\n   * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventList#\n   *\n   * @param {string} type - Type of event being subscribed to.\n   *\n   * @returns {Twilio.Events.V1.SubscriptionContext.SubscribedEventContext}\n   */\n  /* jshint ignore:end */\n  SubscribedEventListInstance.get = function get(type) {\n    return new SubscribedEventContext(this._version, this._solution.subscriptionSid, type);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SubscribedEventListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SubscribedEventListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SubscribedEventListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribedEventPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SubscriptionContext.SubscribedEventPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SubscribedEventSolution} solution - Path solution\n *\n * @returns SubscribedEventPage\n */\n/* jshint ignore:end */\nSubscribedEventPage = function SubscribedEventPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SubscribedEventPage.prototype, Page.prototype);\nSubscribedEventPage.prototype.constructor = SubscribedEventPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SubscribedEventInstance\n *\n * @function getInstance\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventPage#\n *\n * @param {SubscribedEventPayload} payload - Payload response from the API\n *\n * @returns SubscribedEventInstance\n */\n/* jshint ignore:end */\nSubscribedEventPage.prototype.getInstance = function getInstance(payload) {\n  return new SubscribedEventInstance(this._version, payload, this._solution.subscriptionSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscribedEventPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSubscribedEventPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribedEventContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SubscriptionContext.SubscribedEventInstance\n *\n * @property {string} accountSid - Account SID.\n * @property {string} type - Type of event being subscribed to.\n * @property {number} schemaVersion -\n *          The schema version that the subscription should use.\n * @property {string} subscriptionSid - Subscription SID.\n * @property {string} url - The URL of this resource.\n *\n * @param {V1} version - Version of the resource\n * @param {SubscribedEventPayload} payload - The instance payload\n * @param {sid} subscriptionSid - Subscription SID.\n * @param {string} type - Type of event being subscribed to.\n */\n/* jshint ignore:end */\nSubscribedEventInstance = function SubscribedEventInstance(version, payload,\n                                                            subscriptionSid,\n                                                            type) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.schemaVersion = deserialize.integer(payload.schema_version); // jshint ignore:line\n  this.subscriptionSid = payload.subscription_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {subscriptionSid: subscriptionSid, type: type || this.type, };\n};\n\nObject.defineProperty(SubscribedEventInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SubscribedEventContext(\n          this._version,\n          this._solution.subscriptionSid,\n          this._solution.type\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SubscribedEventInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscribedEventInstance\n */\n/* jshint ignore:end */\nSubscribedEventInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SubscribedEventInstance\n *\n * @function update\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.schemaVersion] -\n *          The schema version that the subscription should use.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscribedEventInstance\n */\n/* jshint ignore:end */\nSubscribedEventInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SubscribedEventInstance\n *\n * @function remove\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscribedEventInstance\n */\n/* jshint ignore:end */\nSubscribedEventInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscribedEventInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSubscribedEventInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribedEventContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SubscriptionContext.SubscribedEventContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} subscriptionSid - Subscription SID.\n * @param {string} type - Type of event being subscribed to.\n */\n/* jshint ignore:end */\nSubscribedEventContext = function SubscribedEventContext(version,\n                                                          subscriptionSid, type)\n                                                          {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {subscriptionSid: subscriptionSid, type: type, };\n  this._uri = `/Subscriptions/${subscriptionSid}/SubscribedEvents/${type}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SubscribedEventInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscribedEventInstance\n */\n/* jshint ignore:end */\nSubscribedEventContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SubscribedEventInstance(\n      this._version,\n      payload,\n      this._solution.subscriptionSid,\n      this._solution.type\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SubscribedEventInstance\n *\n * @function update\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.schemaVersion] -\n *          The schema version that the subscription should use.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscribedEventInstance\n */\n/* jshint ignore:end */\nSubscribedEventContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'SchemaVersion': _.get(opts, 'schemaVersion')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SubscribedEventInstance(\n      this._version,\n      payload,\n      this._solution.subscriptionSid,\n      this._solution.type\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SubscribedEventInstance\n *\n * @function remove\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscribedEventInstance\n */\n/* jshint ignore:end */\nSubscribedEventContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SubscriptionContext.SubscribedEventContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscribedEventContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSubscribedEventContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SubscribedEventList: SubscribedEventList,\n  SubscribedEventPage: SubscribedEventPage,\n  SubscribedEventInstance: SubscribedEventInstance,\n  SubscribedEventContext: SubscribedEventContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar SubscribedEventList = require(\n    './subscription/subscribedEvent').SubscribedEventList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SubscriptionList;\nvar SubscriptionPage;\nvar SubscriptionInstance;\nvar SubscriptionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscriptionList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SubscriptionList\n *\n * @param {Twilio.Events.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSubscriptionList = function SubscriptionList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function subscriptions\n   * @memberof Twilio.Events.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Events.V1.SubscriptionContext}\n   */\n  /* jshint ignore:end */\n  function SubscriptionListInstance(sid) {\n    return SubscriptionListInstance.get(sid);\n  }\n\n  SubscriptionListInstance._version = version;\n  // Path Solution\n  SubscriptionListInstance._solution = {};\n  SubscriptionListInstance._uri = `/Subscriptions`;\n  /* jshint ignore:start */\n  /**\n   * Streams SubscriptionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Events.V1.SubscriptionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sinkSid] - Sink SID.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SubscriptionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SubscriptionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Events.V1.SubscriptionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sinkSid] - Sink SID.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SubscriptionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SubscriptionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Events.V1.SubscriptionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sinkSid] - Sink SID.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SubscriptionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'SinkSid': _.get(opts, 'sinkSid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscriptionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SubscriptionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Events.V1.SubscriptionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SubscriptionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscriptionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a SubscriptionInstance\n   *\n   * @function create\n   * @memberof Twilio.Events.V1.SubscriptionList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.description - Subscription description\n   * @param {string} opts.sinkSid - Sink SID.\n   * @param {object|list} opts.types - Subscribed Event Types\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SubscriptionInstance\n   */\n  /* jshint ignore:end */\n  SubscriptionListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['description'])) {\n      throw new Error('Required parameter \"opts[\\'description\\']\" missing.');\n    }\n    if (_.isUndefined(opts['sinkSid'])) {\n      throw new Error('Required parameter \"opts[\\'sinkSid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['types'])) {\n      throw new Error('Required parameter \"opts[\\'types\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Description': _.get(opts, 'description'),\n      'SinkSid': _.get(opts, 'sinkSid'),\n      'Types': serialize.map(_.get(opts, 'types'), function(e) { return serialize.object(e); })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscriptionInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a subscription\n   *\n   * @function get\n   * @memberof Twilio.Events.V1.SubscriptionList#\n   *\n   * @param {string} sid - A string that uniquely identifies this Subscription.\n   *\n   * @returns {Twilio.Events.V1.SubscriptionContext}\n   */\n  /* jshint ignore:end */\n  SubscriptionListInstance.get = function get(sid) {\n    return new SubscriptionContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Events.V1.SubscriptionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SubscriptionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SubscriptionListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SubscriptionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscriptionPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SubscriptionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SubscriptionSolution} solution - Path solution\n *\n * @returns SubscriptionPage\n */\n/* jshint ignore:end */\nSubscriptionPage = function SubscriptionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SubscriptionPage.prototype, Page.prototype);\nSubscriptionPage.prototype.constructor = SubscriptionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SubscriptionInstance\n *\n * @function getInstance\n * @memberof Twilio.Events.V1.SubscriptionPage#\n *\n * @param {SubscriptionPayload} payload - Payload response from the API\n *\n * @returns SubscriptionInstance\n */\n/* jshint ignore:end */\nSubscriptionPage.prototype.getInstance = function getInstance(payload) {\n  return new SubscriptionInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SubscriptionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscriptionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSubscriptionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscriptionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SubscriptionInstance\n *\n * @property {string} accountSid - Account SID.\n * @property {string} sid - A string that uniquely identifies this Subscription.\n * @property {Date} dateCreated - The date this Subscription was created\n * @property {Date} dateUpdated - The date this Subscription was updated\n * @property {string} description - Subscription description\n * @property {string} sinkSid - Sink SID.\n * @property {string} url - The URL of this resource.\n * @property {string} links - Nested resource URLs.\n *\n * @param {V1} version - Version of the resource\n * @param {SubscriptionPayload} payload - The instance payload\n * @param {sid} sid - A string that uniquely identifies this Subscription.\n */\n/* jshint ignore:end */\nSubscriptionInstance = function SubscriptionInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.sinkSid = payload.sink_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SubscriptionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SubscriptionContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SubscriptionInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SubscriptionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscriptionInstance\n */\n/* jshint ignore:end */\nSubscriptionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SubscriptionInstance\n *\n * @function update\n * @memberof Twilio.Events.V1.SubscriptionInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.description] - Subscription description.\n * @param {string} [opts.sinkSid] - Sink SID.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscriptionInstance\n */\n/* jshint ignore:end */\nSubscriptionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SubscriptionInstance\n *\n * @function remove\n * @memberof Twilio.Events.V1.SubscriptionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscriptionInstance\n */\n/* jshint ignore:end */\nSubscriptionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the subscribedEvents\n *\n * @function subscribedEvents\n * @memberof Twilio.Events.V1.SubscriptionInstance#\n *\n * @returns {Twilio.Events.V1.SubscriptionContext.SubscribedEventList}\n */\n/* jshint ignore:end */\nSubscriptionInstance.prototype.subscribedEvents = function subscribedEvents() {\n  return this._proxy.subscribedEvents;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SubscriptionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscriptionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSubscriptionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscriptionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Events.V1.SubscriptionContext\n *\n * @property {Twilio.Events.V1.SubscriptionContext.SubscribedEventList} subscribedEvents -\n *          subscribedEvents resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - A string that uniquely identifies this Subscription.\n */\n/* jshint ignore:end */\nSubscriptionContext = function SubscriptionContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Subscriptions/${sid}`;\n\n  // Dependents\n  this._subscribedEvents = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SubscriptionInstance\n *\n * @function fetch\n * @memberof Twilio.Events.V1.SubscriptionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscriptionInstance\n */\n/* jshint ignore:end */\nSubscriptionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SubscriptionInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SubscriptionInstance\n *\n * @function update\n * @memberof Twilio.Events.V1.SubscriptionContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.description] - Subscription description.\n * @param {string} [opts.sinkSid] - Sink SID.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscriptionInstance\n */\n/* jshint ignore:end */\nSubscriptionContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Description': _.get(opts, 'description'),\n    'SinkSid': _.get(opts, 'sinkSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SubscriptionInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SubscriptionInstance\n *\n * @function remove\n * @memberof Twilio.Events.V1.SubscriptionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscriptionInstance\n */\n/* jshint ignore:end */\nSubscriptionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SubscriptionContext.prototype,\n  'subscribedEvents', {\n    get: function() {\n      if (!this._subscribedEvents) {\n        this._subscribedEvents = new SubscribedEventList(this._version, this._solution.sid);\n      }\n      return this._subscribedEvents;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Events.V1.SubscriptionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscriptionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSubscriptionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SubscriptionList: SubscriptionList,\n  SubscriptionPage: SubscriptionPage,\n  SubscriptionInstance: SubscriptionInstance,\n  SubscriptionContext: SubscriptionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar EventTypeList = require('./v1/eventType').EventTypeList;\nvar SchemaList = require('./v1/schema').SchemaList;\nvar SinkList = require('./v1/sink').SinkList;\nvar SubscriptionList = require('./v1/subscription').SubscriptionList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Events\n *\n * @constructor Twilio.Events.V1\n *\n * @property {Twilio.Events.V1.EventTypeList} eventTypes - eventTypes resource\n * @property {Twilio.Events.V1.SchemaList} schemas - schemas resource\n * @property {Twilio.Events.V1.SinkList} sinks - sinks resource\n * @property {Twilio.Events.V1.SubscriptionList} subscriptions -\n *          subscriptions resource\n *\n * @param {Twilio.Events} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._eventTypes = undefined;\n  this._schemas = undefined;\n  this._sinks = undefined;\n  this._subscriptions = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'eventTypes', {\n    get: function() {\n      this._eventTypes = this._eventTypes || new EventTypeList(this);\n      return this._eventTypes;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'schemas', {\n    get: function() {\n      this._schemas = this._schemas || new SchemaList(this);\n      return this._schemas;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'sinks', {\n    get: function() {\n      this._sinks = this._sinks || new SinkList(this);\n      return this._sinks;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'subscriptions', {\n    get: function() {\n      this._subscriptions = this._subscriptions || new SubscriptionList(this);\n      return this._subscriptions;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./events/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize events domain\n *\n * @constructor Twilio.Events\n *\n * @property {Twilio.Events.V1} v1 - v1 version\n * @property {Twilio.Events.V1.EventTypeList} eventTypes - eventTypes resource\n * @property {Twilio.Events.V1.SchemaList} schemas - schemas resource\n * @property {Twilio.Events.V1.SinkList} sinks - sinks resource\n * @property {Twilio.Events.V1.SubscriptionList} subscriptions -\n *          subscriptions resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Events(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://events.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Events.prototype, Domain.prototype);\nEvents.prototype.constructor = Events;\n\nObject.defineProperty(Events.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Events.prototype,\n  'eventTypes', {\n    get: function() {\n      return this.v1.eventTypes;\n    }\n});\n\nObject.defineProperty(Events.prototype,\n  'schemas', {\n    get: function() {\n      return this.v1.schemas;\n    }\n});\n\nObject.defineProperty(Events.prototype,\n  'sinks', {\n    get: function() {\n      return this.v1.sinks;\n    }\n});\n\nObject.defineProperty(Events.prototype,\n  'subscriptions', {\n    get: function() {\n      return this.v1.subscriptions;\n    }\n});\n\nmodule.exports = Events;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar FaxMediaList;\nvar FaxMediaPage;\nvar FaxMediaInstance;\nvar FaxMediaContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FaxMediaList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Fax.V1.FaxContext.FaxMediaList\n *\n * @param {Twilio.Fax.V1} version - Version of the resource\n * @param {string} faxSid -\n *          The SID of the fax the FaxMedia resource is associated with\n */\n/* jshint ignore:end */\nFaxMediaList = function FaxMediaList(version, faxSid) {\n  /* jshint ignore:start */\n  /**\n   * @function media\n   * @memberof Twilio.Fax.V1.FaxContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Fax.V1.FaxContext.FaxMediaContext}\n   */\n  /* jshint ignore:end */\n  function FaxMediaListInstance(sid) {\n    return FaxMediaListInstance.get(sid);\n  }\n\n  FaxMediaListInstance._version = version;\n  // Path Solution\n  FaxMediaListInstance._solution = {faxSid: faxSid};\n  FaxMediaListInstance._uri = `/Faxes/${faxSid}/Media`;\n  /* jshint ignore:start */\n  /**\n   * Streams FaxMediaInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Fax.V1.FaxContext.FaxMediaList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FaxMediaListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FaxMediaInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Fax.V1.FaxContext.FaxMediaList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FaxMediaListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FaxMediaInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Fax.V1.FaxContext.FaxMediaList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FaxMediaListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FaxMediaPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FaxMediaInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Fax.V1.FaxContext.FaxMediaList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FaxMediaListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FaxMediaPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a fax_media\n   *\n   * @function get\n   * @memberof Twilio.Fax.V1.FaxContext.FaxMediaList#\n   *\n   * @param {string} sid - The unique string that identifies the resource to fetch\n   *\n   * @returns {Twilio.Fax.V1.FaxContext.FaxMediaContext}\n   */\n  /* jshint ignore:end */\n  FaxMediaListInstance.get = function get(sid) {\n    return new FaxMediaContext(this._version, this._solution.faxSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Fax.V1.FaxContext.FaxMediaList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FaxMediaListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FaxMediaListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FaxMediaListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FaxMediaPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Fax.V1.FaxContext.FaxMediaPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FaxMediaSolution} solution - Path solution\n *\n * @returns FaxMediaPage\n */\n/* jshint ignore:end */\nFaxMediaPage = function FaxMediaPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FaxMediaPage.prototype, Page.prototype);\nFaxMediaPage.prototype.constructor = FaxMediaPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FaxMediaInstance\n *\n * @function getInstance\n * @memberof Twilio.Fax.V1.FaxContext.FaxMediaPage#\n *\n * @param {FaxMediaPayload} payload - Payload response from the API\n *\n * @returns FaxMediaInstance\n */\n/* jshint ignore:end */\nFaxMediaPage.prototype.getInstance = function getInstance(payload) {\n  return new FaxMediaInstance(this._version, payload, this._solution.faxSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Fax.V1.FaxContext.FaxMediaPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFaxMediaPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFaxMediaPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FaxMediaContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Fax.V1.FaxContext.FaxMediaInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} faxSid -\n *          The SID of the fax the FaxMedia resource is associated with\n * @property {string} contentType - The content type of the stored fax media\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the FaxMedia resource\n *\n * @param {V1} version - Version of the resource\n * @param {FaxMediaPayload} payload - The instance payload\n * @param {sid} faxSid -\n *          The SID of the fax the FaxMedia resource is associated with\n * @param {sid} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFaxMediaInstance = function FaxMediaInstance(version, payload, faxSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.faxSid = payload.fax_sid; // jshint ignore:line\n  this.contentType = payload.content_type; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {faxSid: faxSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FaxMediaInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FaxMediaContext(this._version, this._solution.faxSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FaxMediaInstance\n *\n * @function fetch\n * @memberof Twilio.Fax.V1.FaxContext.FaxMediaInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxMediaInstance\n */\n/* jshint ignore:end */\nFaxMediaInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FaxMediaInstance\n *\n * @function remove\n * @memberof Twilio.Fax.V1.FaxContext.FaxMediaInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxMediaInstance\n */\n/* jshint ignore:end */\nFaxMediaInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Fax.V1.FaxContext.FaxMediaInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFaxMediaInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFaxMediaInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FaxMediaContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Fax.V1.FaxContext.FaxMediaContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} faxSid - The SID of the fax with the FaxMedia resource to fetch\n * @param {sid} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFaxMediaContext = function FaxMediaContext(version, faxSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {faxSid: faxSid, sid: sid, };\n  this._uri = `/Faxes/${faxSid}/Media/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FaxMediaInstance\n *\n * @function fetch\n * @memberof Twilio.Fax.V1.FaxContext.FaxMediaContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxMediaInstance\n */\n/* jshint ignore:end */\nFaxMediaContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FaxMediaInstance(\n      this._version,\n      payload,\n      this._solution.faxSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FaxMediaInstance\n *\n * @function remove\n * @memberof Twilio.Fax.V1.FaxContext.FaxMediaContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxMediaInstance\n */\n/* jshint ignore:end */\nFaxMediaContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Fax.V1.FaxContext.FaxMediaContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFaxMediaContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFaxMediaContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FaxMediaList: FaxMediaList,\n  FaxMediaPage: FaxMediaPage,\n  FaxMediaInstance: FaxMediaInstance,\n  FaxMediaContext: FaxMediaContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar FaxMediaList = require('./fax/faxMedia').FaxMediaList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar FaxList;\nvar FaxPage;\nvar FaxInstance;\nvar FaxContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FaxList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Fax.V1.FaxList\n *\n * @param {Twilio.Fax.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nFaxList = function FaxList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function faxes\n   * @memberof Twilio.Fax.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Fax.V1.FaxContext}\n   */\n  /* jshint ignore:end */\n  function FaxListInstance(sid) {\n    return FaxListInstance.get(sid);\n  }\n\n  FaxListInstance._version = version;\n  // Path Solution\n  FaxListInstance._solution = {};\n  FaxListInstance._uri = `/Faxes`;\n  /* jshint ignore:start */\n  /**\n   * Streams FaxInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Fax.V1.FaxList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.from] -\n   *          Retrieve only those faxes sent from this phone number\n   * @param {string} [opts.to] - Retrieve only those faxes sent to this phone number\n   * @param {Date} [opts.dateCreatedOnOrBefore] -\n   *          Retrieve only faxes created on or before this date\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Retrieve only faxes created after this date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FaxListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FaxInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Fax.V1.FaxList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.from] -\n   *          Retrieve only those faxes sent from this phone number\n   * @param {string} [opts.to] - Retrieve only those faxes sent to this phone number\n   * @param {Date} [opts.dateCreatedOnOrBefore] -\n   *          Retrieve only faxes created on or before this date\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Retrieve only faxes created after this date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FaxListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FaxInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Fax.V1.FaxList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.from] -\n   *          Retrieve only those faxes sent from this phone number\n   * @param {string} [opts.to] - Retrieve only those faxes sent to this phone number\n   * @param {Date} [opts.dateCreatedOnOrBefore] -\n   *          Retrieve only faxes created on or before this date\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Retrieve only faxes created after this date\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FaxListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'From': _.get(opts, 'from'),\n      'To': _.get(opts, 'to'),\n      'DateCreatedOnOrBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedOnOrBefore')),\n      'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FaxPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FaxInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Fax.V1.FaxList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FaxListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FaxPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a FaxInstance\n   *\n   * @function create\n   * @memberof Twilio.Fax.V1.FaxList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.to - The phone number to receive the fax\n   * @param {string} opts.mediaUrl - The URL of the PDF that contains the fax\n   * @param {fax.quality} [opts.quality] - The quality of this fax\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string} [opts.from] - The number the fax was sent from\n   * @param {string} [opts.sipAuthUsername] - The username for SIP authentication\n   * @param {string} [opts.sipAuthPassword] - The password for SIP authentication\n   * @param {boolean} [opts.storeMedia] - Whether to store a copy of the sent media\n   * @param {number} [opts.ttl] - How long in minutes to try to send the fax\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FaxInstance\n   */\n  /* jshint ignore:end */\n  FaxListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['to'])) {\n      throw new Error('Required parameter \"opts[\\'to\\']\" missing.');\n    }\n    if (_.isUndefined(opts['mediaUrl'])) {\n      throw new Error('Required parameter \"opts[\\'mediaUrl\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'To': _.get(opts, 'to'),\n      'MediaUrl': _.get(opts, 'mediaUrl'),\n      'Quality': _.get(opts, 'quality'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'From': _.get(opts, 'from'),\n      'SipAuthUsername': _.get(opts, 'sipAuthUsername'),\n      'SipAuthPassword': _.get(opts, 'sipAuthPassword'),\n      'StoreMedia': serialize.bool(_.get(opts, 'storeMedia')),\n      'Ttl': _.get(opts, 'ttl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FaxInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a fax\n   *\n   * @function get\n   * @memberof Twilio.Fax.V1.FaxList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Fax.V1.FaxContext}\n   */\n  /* jshint ignore:end */\n  FaxListInstance.get = function get(sid) {\n    return new FaxContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Fax.V1.FaxList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FaxListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FaxListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FaxListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FaxPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Fax.V1.FaxPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FaxSolution} solution - Path solution\n *\n * @returns FaxPage\n */\n/* jshint ignore:end */\nFaxPage = function FaxPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FaxPage.prototype, Page.prototype);\nFaxPage.prototype.constructor = FaxPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FaxInstance\n *\n * @function getInstance\n * @memberof Twilio.Fax.V1.FaxPage#\n *\n * @param {FaxPayload} payload - Payload response from the API\n *\n * @returns FaxInstance\n */\n/* jshint ignore:end */\nFaxPage.prototype.getInstance = function getInstance(payload) {\n  return new FaxInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Fax.V1.FaxPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFaxPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFaxPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FaxContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Fax.V1.FaxInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} from - The number the fax was sent from\n * @property {string} to - The phone number that received the fax\n * @property {fax.quality} quality - The quality of the fax\n * @property {string} mediaSid -\n *          The SID of the FaxMedia resource that is associated with the Fax\n * @property {string} mediaUrl -\n *          The Twilio-hosted URL that can be used to download fax media\n * @property {number} numPages - The number of pages contained in the fax document\n * @property {number} duration - The time it took to transmit the fax\n * @property {fax.status} status - The status of the fax\n * @property {fax.direction} direction - The direction of the fax\n * @property {string} apiVersion - The API version used to transmit the fax\n * @property {number} price - The fax transmission price\n * @property {string} priceUnit - The ISO 4217 currency used for billing\n * @property {Date} dateCreated -\n *          The ISO 8601 formatted date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 formatted date and time in GMT when the resource was last updated\n * @property {string} links - The URLs of the fax's related resources\n * @property {string} url - The absolute URL of the fax resource\n *\n * @param {V1} version - Version of the resource\n * @param {FaxPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nFaxInstance = function FaxInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.quality = payload.quality; // jshint ignore:line\n  this.mediaSid = payload.media_sid; // jshint ignore:line\n  this.mediaUrl = payload.media_url; // jshint ignore:line\n  this.numPages = deserialize.integer(payload.num_pages); // jshint ignore:line\n  this.duration = deserialize.integer(payload.duration); // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.direction = payload.direction; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.price = deserialize.decimal(payload.price); // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(FaxInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FaxContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FaxInstance\n *\n * @function fetch\n * @memberof Twilio.Fax.V1.FaxInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxInstance\n */\n/* jshint ignore:end */\nFaxInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FaxInstance\n *\n * @function update\n * @memberof Twilio.Fax.V1.FaxInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {fax.update_status} [opts.status] - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxInstance\n */\n/* jshint ignore:end */\nFaxInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FaxInstance\n *\n * @function remove\n * @memberof Twilio.Fax.V1.FaxInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxInstance\n */\n/* jshint ignore:end */\nFaxInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the media\n *\n * @function media\n * @memberof Twilio.Fax.V1.FaxInstance#\n *\n * @returns {Twilio.Fax.V1.FaxContext.FaxMediaList}\n */\n/* jshint ignore:end */\nFaxInstance.prototype.media = function media() {\n  return this._proxy.media;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Fax.V1.FaxInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFaxInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFaxInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FaxContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Fax.V1.FaxContext\n *\n * @property {Twilio.Fax.V1.FaxContext.FaxMediaList} media - media resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nFaxContext = function FaxContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Faxes/${sid}`;\n\n  // Dependents\n  this._media = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FaxInstance\n *\n * @function fetch\n * @memberof Twilio.Fax.V1.FaxContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxInstance\n */\n/* jshint ignore:end */\nFaxContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FaxInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FaxInstance\n *\n * @function update\n * @memberof Twilio.Fax.V1.FaxContext#\n *\n * @param {object} [opts] - Options for request\n * @param {fax.update_status} [opts.status] - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxInstance\n */\n/* jshint ignore:end */\nFaxContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FaxInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FaxInstance\n *\n * @function remove\n * @memberof Twilio.Fax.V1.FaxContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FaxInstance\n */\n/* jshint ignore:end */\nFaxContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(FaxContext.prototype,\n  'media', {\n    get: function() {\n      if (!this._media) {\n        this._media = new FaxMediaList(this._version, this._solution.sid);\n      }\n      return this._media;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Fax.V1.FaxContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFaxContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFaxContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FaxList: FaxList,\n  FaxPage: FaxPage,\n  FaxInstance: FaxInstance,\n  FaxContext: FaxContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar FaxList = require('./v1/fax').FaxList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Fax\n *\n * @constructor Twilio.Fax.V1\n *\n * @property {Twilio.Fax.V1.FaxList} faxes - faxes resource\n *\n * @param {Twilio.Fax} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._faxes = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'faxes', {\n    get: function() {\n      this._faxes = this._faxes || new FaxList(this);\n      return this._faxes;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./fax/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize fax domain\n *\n * @constructor Twilio.Fax\n *\n * @property {Twilio.Fax.V1} v1 - v1 version\n * @property {Twilio.Fax.V1.FaxList} faxes - faxes resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Fax(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://fax.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Fax.prototype, Domain.prototype);\nFax.prototype.constructor = Fax;\n\nObject.defineProperty(Fax.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Fax.prototype,\n  'faxes', {\n    get: function() {\n      return this.v1.faxes;\n    }\n});\n\nmodule.exports = Fax;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ChannelList;\nvar ChannelPage;\nvar ChannelInstance;\nvar ChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelList\n *\n * @constructor Twilio.FlexApi.V1.ChannelList\n *\n * @param {Twilio.FlexApi.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nChannelList = function ChannelList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function channel\n   * @memberof Twilio.FlexApi.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.FlexApi.V1.ChannelContext}\n   */\n  /* jshint ignore:end */\n  function ChannelListInstance(sid) {\n    return ChannelListInstance.get(sid);\n  }\n\n  ChannelListInstance._version = version;\n  // Path Solution\n  ChannelListInstance._solution = {};\n  ChannelListInstance._uri = `/Channels`;\n  /* jshint ignore:start */\n  /**\n   * Streams ChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.FlexApi.V1.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.FlexApi.V1.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.FlexApi.V1.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.FlexApi.V1.ChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ChannelInstance\n   *\n   * @function create\n   * @memberof Twilio.FlexApi.V1.ChannelList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.flexFlowSid - The SID of the Flex Flow\n   * @param {string} opts.identity -\n   *          The identity value that identifies the new resource's chat User\n   * @param {string} opts.chatUserFriendlyName - The chat participant's friendly name\n   * @param {string} opts.chatFriendlyName - The chat channel's friendly name\n   * @param {string} [opts.target] - The Target Contact Identity\n   * @param {string} [opts.chatUniqueName] - The chat channel's unique name\n   * @param {string} [opts.preEngagementData] - The pre-engagement data\n   * @param {string} [opts.taskSid] - The SID of the TaskRouter Task\n   * @param {string} [opts.taskAttributes] -\n   *          The Task attributes to be added for the TaskRouter Task\n   * @param {boolean} [opts.longLived] - Whether to create the channel as long-lived\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ChannelInstance\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['flexFlowSid'])) {\n      throw new Error('Required parameter \"opts[\\'flexFlowSid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n    if (_.isUndefined(opts['chatUserFriendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'chatUserFriendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['chatFriendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'chatFriendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FlexFlowSid': _.get(opts, 'flexFlowSid'),\n      'Identity': _.get(opts, 'identity'),\n      'ChatUserFriendlyName': _.get(opts, 'chatUserFriendlyName'),\n      'ChatFriendlyName': _.get(opts, 'chatFriendlyName'),\n      'Target': _.get(opts, 'target'),\n      'ChatUniqueName': _.get(opts, 'chatUniqueName'),\n      'PreEngagementData': _.get(opts, 'preEngagementData'),\n      'TaskSid': _.get(opts, 'taskSid'),\n      'TaskAttributes': _.get(opts, 'taskAttributes'),\n      'LongLived': serialize.bool(_.get(opts, 'longLived'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a channel\n   *\n   * @function get\n   * @memberof Twilio.FlexApi.V1.ChannelList#\n   *\n   * @param {string} sid -\n   *          The SID that identifies the Flex chat channel resource to fetch\n   *\n   * @returns {Twilio.FlexApi.V1.ChannelContext}\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.get = function get(sid) {\n    return new ChannelContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.FlexApi.V1.ChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ChannelListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelPage\n *\n * @constructor Twilio.FlexApi.V1.ChannelPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ChannelSolution} solution - Path solution\n *\n * @returns ChannelPage\n */\n/* jshint ignore:end */\nChannelPage = function ChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ChannelPage.prototype, Page.prototype);\nChannelPage.prototype.constructor = ChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.FlexApi.V1.ChannelPage#\n *\n * @param {ChannelPayload} payload - Payload response from the API\n *\n * @returns ChannelInstance\n */\n/* jshint ignore:end */\nChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new ChannelInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.ChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.FlexApi.V1.ChannelInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that created the resource and owns this Workflow\n * @property {string} flexFlowSid - The SID of the Flex Flow\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} userSid - The SID of the chat user\n * @property {string} taskSid - The SID of the TaskRouter Task\n * @property {string} url - The absolute URL of the Flex chat channel resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Flex chat channel was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Flex chat channel was last updated\n *\n * @param {V1} version - Version of the resource\n * @param {ChannelPayload} payload - The instance payload\n * @param {sid} sid -\n *          The SID that identifies the Flex chat channel resource to fetch\n */\n/* jshint ignore:end */\nChannelInstance = function ChannelInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.flexFlowSid = payload.flex_flow_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.userSid = payload.user_sid; // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ChannelContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.ChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.FlexApi.V1.ChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.ChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.FlexApi.V1.ChannelContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid -\n *          The SID that identifies the Flex chat channel resource to fetch\n */\n/* jshint ignore:end */\nChannelContext = function ChannelContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Channels/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.ChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.FlexApi.V1.ChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.ChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nChannelContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ChannelList: ChannelList,\n  ChannelPage: ChannelPage,\n  ChannelInstance: ChannelInstance,\n  ChannelContext: ChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ConfigurationList;\nvar ConfigurationPage;\nvar ConfigurationInstance;\nvar ConfigurationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationList\n *\n * @constructor Twilio.FlexApi.V1.ConfigurationList\n *\n * @param {Twilio.FlexApi.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nConfigurationList = function ConfigurationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function configuration\n   * @memberof Twilio.FlexApi.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.FlexApi.V1.ConfigurationContext}\n   */\n  /* jshint ignore:end */\n  function ConfigurationListInstance(sid) {\n    return ConfigurationListInstance.get(sid);\n  }\n\n  ConfigurationListInstance._version = version;\n  // Path Solution\n  ConfigurationListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a configuration\n   *\n   * @function get\n   * @memberof Twilio.FlexApi.V1.ConfigurationList#\n   *\n   * @returns {Twilio.FlexApi.V1.ConfigurationContext}\n   */\n  /* jshint ignore:end */\n  ConfigurationListInstance.get = function get() {\n    return new ConfigurationContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.FlexApi.V1.ConfigurationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConfigurationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConfigurationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConfigurationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationPage\n *\n * @constructor Twilio.FlexApi.V1.ConfigurationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConfigurationSolution} solution - Path solution\n *\n * @returns ConfigurationPage\n */\n/* jshint ignore:end */\nConfigurationPage = function ConfigurationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConfigurationPage.prototype, Page.prototype);\nConfigurationPage.prototype.constructor = ConfigurationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConfigurationInstance\n *\n * @function getInstance\n * @memberof Twilio.FlexApi.V1.ConfigurationPage#\n *\n * @param {ConfigurationPayload} payload - Payload response from the API\n *\n * @returns ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationPage.prototype.getInstance = function getInstance(payload) {\n  return new ConfigurationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.ConfigurationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConfigurationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConfigurationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationContext\n *\n * @constructor Twilio.FlexApi.V1.ConfigurationInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Configuration resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Configuration resource was last updated\n * @property {object} attributes -\n *          An object that contains application-specific data\n * @property {configuration.status} status - The status of the Flex onboarding\n * @property {string} taskrouterWorkspaceSid - The SID of the TaskRouter Workspace\n * @property {string} taskrouterTargetWorkflowSid -\n *          The SID of the TaskRouter target Workflow\n * @property {string} taskrouterTargetTaskqueueSid -\n *          The SID of the TaskRouter Target TaskQueue\n * @property {object} taskrouterTaskqueues - The list of TaskRouter TaskQueues\n * @property {object} taskrouterSkills -\n *          The Skill description for TaskRouter workers\n * @property {object} taskrouterWorkerChannels -\n *          The TaskRouter default channel capacities and availability for workers\n * @property {object} taskrouterWorkerAttributes - The TaskRouter Worker attributes\n * @property {string} taskrouterOfflineActivitySid -\n *          The TaskRouter SID of the offline activity\n * @property {string} runtimeDomain - The URL where the Flex instance is hosted\n * @property {string} messagingServiceInstanceSid -\n *          The SID of the Messaging service instance\n * @property {string} chatServiceInstanceSid -\n *          The SID of the chat service this user belongs to\n * @property {string} flexServiceInstanceSid - The SID of the Flex service instance\n * @property {string} uiLanguage - The primary language of the Flex UI\n * @property {object} uiAttributes -\n *          The object that describes Flex UI characteristics and settings\n * @property {object} uiDependencies -\n *          The object that defines the NPM packages and versions to be used in Hosted Flex\n * @property {string} uiVersion - The Pinned UI version\n * @property {string} serviceVersion - The Flex Service version\n * @property {boolean} callRecordingEnabled - Whether call recording is enabled\n * @property {string} callRecordingWebhookUrl - The call recording webhook URL\n * @property {boolean} crmEnabled - Whether CRM is present for Flex\n * @property {string} crmType - The CRM Type\n * @property {string} crmCallbackUrl - The CRM Callback URL\n * @property {string} crmFallbackUrl - The CRM Fallback URL\n * @property {object} crmAttributes - An object that contains the CRM attributes\n * @property {object} publicAttributes - The list of public attributes\n * @property {boolean} pluginServiceEnabled - Whether the plugin service enabled\n * @property {object} pluginServiceAttributes - The plugin service attributes\n * @property {object} integrations -\n *          A list of objects that contain the configurations for the Integrations supported in this configuration\n * @property {object} outboundCallFlows - The list of outbound call flows\n * @property {string} serverlessServiceSids - The list of serverless service SIDs\n * @property {object} queueStatsConfiguration -\n *          Configurable parameters for Queues Statistics\n * @property {object} notifications - Configurable parameters for Notifications\n * @property {object} markdown - Configurable parameters for Markdown\n * @property {string} url - The absolute URL of the Configuration resource\n * @property {object} flexInsightsHr - Object that controls workspace reporting\n * @property {boolean} flexInsightsDrilldown -\n *          Setting to enable Flex UI redirection\n * @property {string} flexUrl - URL to redirect to in case drilldown is enabled.\n * @property {object} channelConfigs -\n *          Flex Conversations channels' attachments configurations\n *\n * @param {V1} version - Version of the resource\n * @param {ConfigurationPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nConfigurationInstance = function ConfigurationInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.taskrouterWorkspaceSid = payload.taskrouter_workspace_sid; // jshint ignore:line\n  this.taskrouterTargetWorkflowSid = payload.taskrouter_target_workflow_sid; // jshint ignore:line\n  this.taskrouterTargetTaskqueueSid = payload.taskrouter_target_taskqueue_sid; // jshint ignore:line\n  this.taskrouterTaskqueues = payload.taskrouter_taskqueues; // jshint ignore:line\n  this.taskrouterSkills = payload.taskrouter_skills; // jshint ignore:line\n  this.taskrouterWorkerChannels = payload.taskrouter_worker_channels; // jshint ignore:line\n  this.taskrouterWorkerAttributes = payload.taskrouter_worker_attributes; // jshint ignore:line\n  this.taskrouterOfflineActivitySid = payload.taskrouter_offline_activity_sid; // jshint ignore:line\n  this.runtimeDomain = payload.runtime_domain; // jshint ignore:line\n  this.messagingServiceInstanceSid = payload.messaging_service_instance_sid; // jshint ignore:line\n  this.chatServiceInstanceSid = payload.chat_service_instance_sid; // jshint ignore:line\n  this.flexServiceInstanceSid = payload.flex_service_instance_sid; // jshint ignore:line\n  this.uiLanguage = payload.ui_language; // jshint ignore:line\n  this.uiAttributes = payload.ui_attributes; // jshint ignore:line\n  this.uiDependencies = payload.ui_dependencies; // jshint ignore:line\n  this.uiVersion = payload.ui_version; // jshint ignore:line\n  this.serviceVersion = payload.service_version; // jshint ignore:line\n  this.callRecordingEnabled = payload.call_recording_enabled; // jshint ignore:line\n  this.callRecordingWebhookUrl = payload.call_recording_webhook_url; // jshint ignore:line\n  this.crmEnabled = payload.crm_enabled; // jshint ignore:line\n  this.crmType = payload.crm_type; // jshint ignore:line\n  this.crmCallbackUrl = payload.crm_callback_url; // jshint ignore:line\n  this.crmFallbackUrl = payload.crm_fallback_url; // jshint ignore:line\n  this.crmAttributes = payload.crm_attributes; // jshint ignore:line\n  this.publicAttributes = payload.public_attributes; // jshint ignore:line\n  this.pluginServiceEnabled = payload.plugin_service_enabled; // jshint ignore:line\n  this.pluginServiceAttributes = payload.plugin_service_attributes; // jshint ignore:line\n  this.integrations = payload.integrations; // jshint ignore:line\n  this.outboundCallFlows = payload.outbound_call_flows; // jshint ignore:line\n  this.serverlessServiceSids = payload.serverless_service_sids; // jshint ignore:line\n  this.queueStatsConfiguration = payload.queue_stats_configuration; // jshint ignore:line\n  this.notifications = payload.notifications; // jshint ignore:line\n  this.markdown = payload.markdown; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.flexInsightsHr = payload.flex_insights_hr; // jshint ignore:line\n  this.flexInsightsDrilldown = payload.flex_insights_drilldown; // jshint ignore:line\n  this.flexUrl = payload.flex_url; // jshint ignore:line\n  this.channelConfigs = payload.channel_configs; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(ConfigurationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConfigurationContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.ConfigurationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uiVersion] -\n *          The Pinned UI version of the Configuration resource to fetch\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * create a ConfigurationInstance\n *\n * @function create\n * @memberof Twilio.FlexApi.V1.ConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.create = function create(callback) {\n  return this._proxy.create(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ConfigurationInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.ConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.update = function update(callback) {\n  return this._proxy.update(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.ConfigurationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConfigurationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConfigurationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConfigurationContext\n *\n * @constructor Twilio.FlexApi.V1.ConfigurationContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nConfigurationContext = function ConfigurationContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/Configuration`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.ConfigurationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uiVersion] -\n *          The Pinned UI version of the Configuration resource to fetch\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'UiVersion': _.get(opts, 'uiVersion')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConfigurationInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * create a ConfigurationInstance\n *\n * @function create\n * @memberof Twilio.FlexApi.V1.ConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.create = function create(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.create({uri: this._uri, method: 'POST'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConfigurationInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ConfigurationInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.ConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConfigurationInstance\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.update = function update(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.update({uri: this._uri, method: 'POST'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConfigurationInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.ConfigurationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConfigurationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConfigurationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConfigurationList: ConfigurationList,\n  ConfigurationPage: ConfigurationPage,\n  ConfigurationInstance: ConfigurationInstance,\n  ConfigurationContext: ConfigurationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar FlexFlowList;\nvar FlexFlowPage;\nvar FlexFlowInstance;\nvar FlexFlowContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FlexFlowList\n *\n * @constructor Twilio.FlexApi.V1.FlexFlowList\n *\n * @param {Twilio.FlexApi.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nFlexFlowList = function FlexFlowList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function flexFlow\n   * @memberof Twilio.FlexApi.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.FlexApi.V1.FlexFlowContext}\n   */\n  /* jshint ignore:end */\n  function FlexFlowListInstance(sid) {\n    return FlexFlowListInstance.get(sid);\n  }\n\n  FlexFlowListInstance._version = version;\n  // Path Solution\n  FlexFlowListInstance._solution = {};\n  FlexFlowListInstance._uri = `/FlexFlows`;\n  /* jshint ignore:start */\n  /**\n   * Streams FlexFlowInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.FlexApi.V1.FlexFlowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The `friendly_name` of the Flex Flow resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FlexFlowListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FlexFlowInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.FlexApi.V1.FlexFlowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The `friendly_name` of the Flex Flow resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlexFlowListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FlexFlowInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.FlexApi.V1.FlexFlowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The `friendly_name` of the Flex Flow resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlexFlowListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlexFlowPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FlexFlowInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.FlexApi.V1.FlexFlowList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlexFlowListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlexFlowPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a FlexFlowInstance\n   *\n   * @function create\n   * @memberof Twilio.FlexApi.V1.FlexFlowList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the resource\n   * @param {string} opts.chatServiceSid - The SID of the chat service\n   * @param {flex_flow.channel_type} opts.channelType - The channel type\n   * @param {string} [opts.contactIdentity] - The channel contact's Identity\n   * @param {boolean} [opts.enabled] - Whether the new Flex Flow is enabled\n   * @param {flex_flow.integration_type} [opts.integrationType] -\n   *          The software that will handle inbound messages.\n   * @param {string} [opts.integration.flowSid] - The SID of the Studio Flow\n   * @param {string} [opts.integration.url] - The External Webhook URL\n   * @param {string} [opts.integration.workspaceSid] -\n   *          The Workspace SID for a new Task\n   * @param {string} [opts.integration.workflowSid] - The Workflow SID for a new Task\n   * @param {string} [opts.integration.channel] - The Task Channel for a new Task\n   * @param {number} [opts.integration.timeout] -\n   *          The Task timeout in seconds for a new Task\n   * @param {number} [opts.integration.priority] - The Task priority of a new Task\n   * @param {boolean} [opts.integration.creationOnMessage] -\n   *          Whether to create a Task when the first message arrives\n   * @param {boolean} [opts.longLived] -\n   *          Reuse this chat channel for future interactions with a contact\n   * @param {boolean} [opts.janitorEnabled] -\n   *          Remove active Proxy sessions if the corresponding Task is deleted\n   * @param {number} [opts.integration.retryCount] -\n   *          The number of times to retry the Studio Flow or webhook in case of failure\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FlexFlowInstance\n   */\n  /* jshint ignore:end */\n  FlexFlowListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['chatServiceSid'])) {\n      throw new Error('Required parameter \"opts[\\'chatServiceSid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['channelType'])) {\n      throw new Error('Required parameter \"opts[\\'channelType\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'ChatServiceSid': _.get(opts, 'chatServiceSid'),\n      'ChannelType': _.get(opts, 'channelType'),\n      'ContactIdentity': _.get(opts, 'contactIdentity'),\n      'Enabled': serialize.bool(_.get(opts, 'enabled')),\n      'IntegrationType': _.get(opts, 'integrationType'),\n      'Integration.FlowSid': _.get(opts, 'integration.flowSid'),\n      'Integration.Url': _.get(opts, 'integration.url'),\n      'Integration.WorkspaceSid': _.get(opts, 'integration.workspaceSid'),\n      'Integration.WorkflowSid': _.get(opts, 'integration.workflowSid'),\n      'Integration.Channel': _.get(opts, 'integration.channel'),\n      'Integration.Timeout': _.get(opts, 'integration.timeout'),\n      'Integration.Priority': _.get(opts, 'integration.priority'),\n      'Integration.CreationOnMessage': serialize.bool(_.get(opts, 'integration.creationOnMessage')),\n      'LongLived': serialize.bool(_.get(opts, 'longLived')),\n      'JanitorEnabled': serialize.bool(_.get(opts, 'janitorEnabled')),\n      'Integration.RetryCount': _.get(opts, 'integration.retryCount')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlexFlowInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a flex_flow\n   *\n   * @function get\n   * @memberof Twilio.FlexApi.V1.FlexFlowList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.FlexApi.V1.FlexFlowContext}\n   */\n  /* jshint ignore:end */\n  FlexFlowListInstance.get = function get(sid) {\n    return new FlexFlowContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.FlexApi.V1.FlexFlowList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FlexFlowListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FlexFlowListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FlexFlowListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlexFlowPage\n *\n * @constructor Twilio.FlexApi.V1.FlexFlowPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FlexFlowSolution} solution - Path solution\n *\n * @returns FlexFlowPage\n */\n/* jshint ignore:end */\nFlexFlowPage = function FlexFlowPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FlexFlowPage.prototype, Page.prototype);\nFlexFlowPage.prototype.constructor = FlexFlowPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FlexFlowInstance\n *\n * @function getInstance\n * @memberof Twilio.FlexApi.V1.FlexFlowPage#\n *\n * @param {FlexFlowPayload} payload - Payload response from the API\n *\n * @returns FlexFlowInstance\n */\n/* jshint ignore:end */\nFlexFlowPage.prototype.getInstance = function getInstance(payload) {\n  return new FlexFlowInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.FlexFlowPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlexFlowPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlexFlowPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlexFlowContext\n *\n * @constructor Twilio.FlexApi.V1.FlexFlowInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} chatServiceSid - The SID of the chat service\n * @property {flex_flow.channel_type} channelType - The channel type\n * @property {string} contactIdentity - The channel contact's Identity\n * @property {boolean} enabled - Whether the Flex Flow is enabled\n * @property {flex_flow.integration_type} integrationType -\n *          The software that will handle inbound messages.\n * @property {object} integration -\n *          An object that contains specific parameters for the integration\n * @property {boolean} longLived -\n *          Re-use this chat channel for future interactions with a contact\n * @property {boolean} janitorEnabled -\n *          Remove active Proxy sessions if the corresponding Task is deleted.\n * @property {string} url - The absolute URL of the Flex Flow resource\n *\n * @param {V1} version - Version of the resource\n * @param {FlexFlowPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFlexFlowInstance = function FlexFlowInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.chatServiceSid = payload.chat_service_sid; // jshint ignore:line\n  this.channelType = payload.channel_type; // jshint ignore:line\n  this.contactIdentity = payload.contact_identity; // jshint ignore:line\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.integrationType = payload.integration_type; // jshint ignore:line\n  this.integration = payload.integration; // jshint ignore:line\n  this.longLived = payload.long_lived; // jshint ignore:line\n  this.janitorEnabled = payload.janitor_enabled; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(FlexFlowInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FlexFlowContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FlexFlowInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.FlexFlowInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlexFlowInstance\n */\n/* jshint ignore:end */\nFlexFlowInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FlexFlowInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.FlexFlowInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.chatServiceSid] - The SID of the chat service\n * @param {flex_flow.channel_type} [opts.channelType] - The channel type\n * @param {string} [opts.contactIdentity] - The channel contact's Identity\n * @param {boolean} [opts.enabled] - Whether the new Flex Flow is enabled\n * @param {flex_flow.integration_type} [opts.integrationType] -\n *          The software that will handle inbound messages.\n * @param {string} [opts.integration.flowSid] - The SID of the Studio Flow\n * @param {string} [opts.integration.url] - The External Webhook URL\n * @param {string} [opts.integration.workspaceSid] -\n *          The Workspace SID for a new Task\n * @param {string} [opts.integration.workflowSid] - The Workflow SID for a new Task\n * @param {string} [opts.integration.channel] - The Task Channel for a new Task\n * @param {number} [opts.integration.timeout] -\n *          The Task timeout in seconds for a new Task\n * @param {number} [opts.integration.priority] - The Task priority of a new Task\n * @param {boolean} [opts.integration.creationOnMessage] -\n *          Whether to create a Task when the first message arrives\n * @param {boolean} [opts.longLived] -\n *          Reuse this chat channel for future interactions with a contact\n * @param {boolean} [opts.janitorEnabled] -\n *          Remove active Proxy sessions if the corresponding Task is deleted\n * @param {number} [opts.integration.retryCount] -\n *          The number of times to retry the Studio Flow or webhook in case of failure\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlexFlowInstance\n */\n/* jshint ignore:end */\nFlexFlowInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FlexFlowInstance\n *\n * @function remove\n * @memberof Twilio.FlexApi.V1.FlexFlowInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlexFlowInstance\n */\n/* jshint ignore:end */\nFlexFlowInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.FlexFlowInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlexFlowInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlexFlowInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlexFlowContext\n *\n * @constructor Twilio.FlexApi.V1.FlexFlowContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFlexFlowContext = function FlexFlowContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/FlexFlows/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FlexFlowInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.FlexFlowContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlexFlowInstance\n */\n/* jshint ignore:end */\nFlexFlowContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FlexFlowInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FlexFlowInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.FlexFlowContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.chatServiceSid] - The SID of the chat service\n * @param {flex_flow.channel_type} [opts.channelType] - The channel type\n * @param {string} [opts.contactIdentity] - The channel contact's Identity\n * @param {boolean} [opts.enabled] - Whether the new Flex Flow is enabled\n * @param {flex_flow.integration_type} [opts.integrationType] -\n *          The software that will handle inbound messages.\n * @param {string} [opts.integration.flowSid] - The SID of the Studio Flow\n * @param {string} [opts.integration.url] - The External Webhook URL\n * @param {string} [opts.integration.workspaceSid] -\n *          The Workspace SID for a new Task\n * @param {string} [opts.integration.workflowSid] - The Workflow SID for a new Task\n * @param {string} [opts.integration.channel] - The Task Channel for a new Task\n * @param {number} [opts.integration.timeout] -\n *          The Task timeout in seconds for a new Task\n * @param {number} [opts.integration.priority] - The Task priority of a new Task\n * @param {boolean} [opts.integration.creationOnMessage] -\n *          Whether to create a Task when the first message arrives\n * @param {boolean} [opts.longLived] -\n *          Reuse this chat channel for future interactions with a contact\n * @param {boolean} [opts.janitorEnabled] -\n *          Remove active Proxy sessions if the corresponding Task is deleted\n * @param {number} [opts.integration.retryCount] -\n *          The number of times to retry the Studio Flow or webhook in case of failure\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlexFlowInstance\n */\n/* jshint ignore:end */\nFlexFlowContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'ChatServiceSid': _.get(opts, 'chatServiceSid'),\n    'ChannelType': _.get(opts, 'channelType'),\n    'ContactIdentity': _.get(opts, 'contactIdentity'),\n    'Enabled': serialize.bool(_.get(opts, 'enabled')),\n    'IntegrationType': _.get(opts, 'integrationType'),\n    'Integration.FlowSid': _.get(opts, 'integration.flowSid'),\n    'Integration.Url': _.get(opts, 'integration.url'),\n    'Integration.WorkspaceSid': _.get(opts, 'integration.workspaceSid'),\n    'Integration.WorkflowSid': _.get(opts, 'integration.workflowSid'),\n    'Integration.Channel': _.get(opts, 'integration.channel'),\n    'Integration.Timeout': _.get(opts, 'integration.timeout'),\n    'Integration.Priority': _.get(opts, 'integration.priority'),\n    'Integration.CreationOnMessage': serialize.bool(_.get(opts, 'integration.creationOnMessage')),\n    'LongLived': serialize.bool(_.get(opts, 'longLived')),\n    'JanitorEnabled': serialize.bool(_.get(opts, 'janitorEnabled')),\n    'Integration.RetryCount': _.get(opts, 'integration.retryCount')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FlexFlowInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FlexFlowInstance\n *\n * @function remove\n * @memberof Twilio.FlexApi.V1.FlexFlowContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlexFlowInstance\n */\n/* jshint ignore:end */\nFlexFlowContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.FlexFlowContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlexFlowContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFlexFlowContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FlexFlowList: FlexFlowList,\n  FlexFlowPage: FlexFlowPage,\n  FlexFlowInstance: FlexFlowInstance,\n  FlexFlowContext: FlexFlowContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar InteractionChannelInviteList;\nvar InteractionChannelInvitePage;\nvar InteractionChannelInviteInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelInviteList\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList\n *\n * @param {Twilio.FlexApi.V1} version - Version of the resource\n * @param {string} interactionSid - The interaction_sid\n * @param {string} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nInteractionChannelInviteList = function InteractionChannelInviteList(version,\n    interactionSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function invites\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteContext}\n   */\n  /* jshint ignore:end */\n  function InteractionChannelInviteListInstance(sid) {\n    return InteractionChannelInviteListInstance.get(sid);\n  }\n\n  InteractionChannelInviteListInstance._version = version;\n  // Path Solution\n  InteractionChannelInviteListInstance._solution = {\n    interactionSid: interactionSid,\n    channelSid: channelSid\n  };\n  InteractionChannelInviteListInstance._uri = `/Interactions/${interactionSid}/Channels/${channelSid}/Invites`;\n  /* jshint ignore:start */\n  /**\n   * create a InteractionChannelInviteInstance\n   *\n   * @function create\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList#\n   *\n   * @param {object} opts - Options for request\n   * @param {object} opts.routing - The routing\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed InteractionChannelInviteInstance\n   */\n  /* jshint ignore:end */\n  InteractionChannelInviteListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['routing'])) {\n      throw new Error('Required parameter \"opts[\\'routing\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Routing': serialize.object(_.get(opts, 'routing'))});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionChannelInviteInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams InteractionChannelInviteInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InteractionChannelInviteListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InteractionChannelInviteInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionChannelInviteListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InteractionChannelInviteInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionChannelInviteListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionChannelInvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InteractionChannelInviteInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionChannelInviteListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionChannelInvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InteractionChannelInviteListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InteractionChannelInviteListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InteractionChannelInviteListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelInvitePage\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInvitePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InteractionChannelInviteSolution} solution - Path solution\n *\n * @returns InteractionChannelInvitePage\n */\n/* jshint ignore:end */\nInteractionChannelInvitePage = function InteractionChannelInvitePage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InteractionChannelInvitePage.prototype, Page.prototype);\nInteractionChannelInvitePage.prototype.constructor = InteractionChannelInvitePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InteractionChannelInviteInstance\n *\n * @function getInstance\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInvitePage#\n *\n * @param {InteractionChannelInvitePayload} payload - Payload response from the API\n *\n * @returns InteractionChannelInviteInstance\n */\n/* jshint ignore:end */\nInteractionChannelInvitePage.prototype.getInstance = function\n    getInstance(payload) {\n  return new InteractionChannelInviteInstance(\n    this._version,\n    payload,\n    this._solution.interactionSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInvitePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionChannelInvitePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionChannelInvitePage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelInviteContext\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteInstance\n *\n * @property {string} sid - The sid\n * @property {string} interactionSid - The interaction_sid\n * @property {string} channelSid - The channel_sid\n * @property {object} routing - The routing\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {InteractionChannelInvitePayload} payload - The instance payload\n * @param {sid} interactionSid - The interaction_sid\n * @param {sid} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nInteractionChannelInviteInstance = function\n    InteractionChannelInviteInstance(version, payload, interactionSid,\n    channelSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.interactionSid = payload.interaction_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.routing = payload.routing; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {interactionSid: interactionSid, channelSid: channelSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionChannelInviteInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionChannelInviteInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InteractionChannelInviteList: InteractionChannelInviteList,\n  InteractionChannelInvitePage: InteractionChannelInvitePage,\n  InteractionChannelInviteInstance: InteractionChannelInviteInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar InteractionChannelParticipantList;\nvar InteractionChannelParticipantPage;\nvar InteractionChannelParticipantInstance;\nvar InteractionChannelParticipantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelParticipantList\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList\n *\n * @param {Twilio.FlexApi.V1} version - Version of the resource\n * @param {string} interactionSid - The Interaction Sid for this channel.\n * @param {string} channelSid - The Channel Sid for this Participant.\n */\n/* jshint ignore:end */\nInteractionChannelParticipantList = function\n    InteractionChannelParticipantList(version, interactionSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function participants\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantContext}\n   */\n  /* jshint ignore:end */\n  function InteractionChannelParticipantListInstance(sid) {\n    return InteractionChannelParticipantListInstance.get(sid);\n  }\n\n  InteractionChannelParticipantListInstance._version = version;\n  // Path Solution\n  InteractionChannelParticipantListInstance._solution = {\n    interactionSid: interactionSid,\n    channelSid: channelSid\n  };\n  InteractionChannelParticipantListInstance._uri = `/Interactions/${interactionSid}/Channels/${channelSid}/Participants`;\n  /* jshint ignore:start */\n  /**\n   * create a InteractionChannelParticipantInstance\n   *\n   * @function create\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList#\n   *\n   * @param {object} opts - Options for request\n   * @param {interaction_channel_participant.type} opts.type - Participant type.\n   * @param {object} opts.mediaProperties -\n   *          JSON representing the Media Properties for the new Participant.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed InteractionChannelParticipantInstance\n   */\n  /* jshint ignore:end */\n  InteractionChannelParticipantListInstance.create = function create(opts,\n      callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n    if (_.isUndefined(opts['mediaProperties'])) {\n      throw new Error('Required parameter \"opts[\\'mediaProperties\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'MediaProperties': serialize.object(_.get(opts, 'mediaProperties'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionChannelParticipantInstance(\n        this._version,\n        payload,\n        this._solution.interactionSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams InteractionChannelParticipantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InteractionChannelParticipantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InteractionChannelParticipantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionChannelParticipantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InteractionChannelParticipantInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionChannelParticipantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionChannelParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InteractionChannelParticipantInstance records\n   * from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionChannelParticipantListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionChannelParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a interaction_channel_participant\n   *\n   * @function get\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantContext}\n   */\n  /* jshint ignore:end */\n  InteractionChannelParticipantListInstance.get = function get(sid) {\n    return new InteractionChannelParticipantContext(\n      this._version,\n      this._solution.interactionSid,\n      this._solution.channelSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InteractionChannelParticipantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InteractionChannelParticipantListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InteractionChannelParticipantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelParticipantPage\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InteractionChannelParticipantSolution} solution - Path solution\n *\n * @returns InteractionChannelParticipantPage\n */\n/* jshint ignore:end */\nInteractionChannelParticipantPage = function\n    InteractionChannelParticipantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InteractionChannelParticipantPage.prototype, Page.prototype);\nInteractionChannelParticipantPage.prototype.constructor = InteractionChannelParticipantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InteractionChannelParticipantInstance\n *\n * @function getInstance\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantPage#\n *\n * @param {InteractionChannelParticipantPayload} payload -\n *          Payload response from the API\n *\n * @returns InteractionChannelParticipantInstance\n */\n/* jshint ignore:end */\nInteractionChannelParticipantPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new InteractionChannelParticipantInstance(\n    this._version,\n    payload,\n    this._solution.interactionSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionChannelParticipantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionChannelParticipantPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelParticipantContext\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {interaction_channel_participant.type} type - Participant type.\n * @property {string} interactionSid - The Interaction Sid for this channel.\n * @property {string} channelSid - The Channel Sid for this Participant.\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {InteractionChannelParticipantPayload} payload - The instance payload\n * @param {sid} interactionSid - The Interaction Sid for this channel.\n * @param {sid} channelSid - The Channel Sid for this Participant.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nInteractionChannelParticipantInstance = function\n    InteractionChannelParticipantInstance(version, payload, interactionSid,\n    channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.interactionSid = payload.interaction_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {interactionSid: interactionSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(InteractionChannelParticipantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InteractionChannelParticipantContext(\n          this._version,\n          this._solution.interactionSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a InteractionChannelParticipantInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantInstance#\n *\n * @param {object} opts - Options for request\n * @param {interaction_channel_participant.status} opts.status -\n *          The Participant's status.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionChannelParticipantInstance\n */\n/* jshint ignore:end */\nInteractionChannelParticipantInstance.prototype.update = function update(opts,\n    callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionChannelParticipantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionChannelParticipantInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelParticipantContext\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} interactionSid - The Interaction Sid for this channel.\n * @param {sid} channelSid - The Channel Sid for this Participant.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nInteractionChannelParticipantContext = function\n    InteractionChannelParticipantContext(version, interactionSid, channelSid,\n    sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {interactionSid: interactionSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Interactions/${interactionSid}/Channels/${channelSid}/Participants/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a InteractionChannelParticipantInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantContext#\n *\n * @param {object} opts - Options for request\n * @param {interaction_channel_participant.status} opts.status -\n *          The Participant's status.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionChannelParticipantInstance\n */\n/* jshint ignore:end */\nInteractionChannelParticipantContext.prototype.update = function update(opts,\n    callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InteractionChannelParticipantInstance(\n      this._version,\n      payload,\n      this._solution.interactionSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionChannelParticipantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInteractionChannelParticipantContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InteractionChannelParticipantList: InteractionChannelParticipantList,\n  InteractionChannelParticipantPage: InteractionChannelParticipantPage,\n  InteractionChannelParticipantInstance: InteractionChannelParticipantInstance,\n  InteractionChannelParticipantContext: InteractionChannelParticipantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar InteractionChannelInviteList = require(\n    './interactionChannel/interactionChannelInvite').InteractionChannelInviteList;\nvar InteractionChannelParticipantList = require(\n    './interactionChannel/interactionChannelParticipant').InteractionChannelParticipantList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar InteractionChannelList;\nvar InteractionChannelPage;\nvar InteractionChannelInstance;\nvar InteractionChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelList\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelList\n *\n * @param {Twilio.FlexApi.V1} version - Version of the resource\n * @param {string} interactionSid - The Interaction Sid for this channel.\n */\n/* jshint ignore:end */\nInteractionChannelList = function InteractionChannelList(version,\n                                                          interactionSid) {\n  /* jshint ignore:start */\n  /**\n   * @function channels\n   * @memberof Twilio.FlexApi.V1.InteractionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext}\n   */\n  /* jshint ignore:end */\n  function InteractionChannelListInstance(sid) {\n    return InteractionChannelListInstance.get(sid);\n  }\n\n  InteractionChannelListInstance._version = version;\n  // Path Solution\n  InteractionChannelListInstance._solution = {interactionSid: interactionSid};\n  InteractionChannelListInstance._uri = `/Interactions/${interactionSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * Streams InteractionChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InteractionChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InteractionChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InteractionChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InteractionChannelInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a interaction_channel\n   *\n   * @function get\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelList#\n   *\n   * @param {string} sid - The Channel Sid for this Participant.\n   *\n   * @returns {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext}\n   */\n  /* jshint ignore:end */\n  InteractionChannelListInstance.get = function get(sid) {\n    return new InteractionChannelContext(this._version, this._solution.interactionSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InteractionChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InteractionChannelListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InteractionChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelPage\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InteractionChannelSolution} solution - Path solution\n *\n * @returns InteractionChannelPage\n */\n/* jshint ignore:end */\nInteractionChannelPage = function InteractionChannelPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InteractionChannelPage.prototype, Page.prototype);\nInteractionChannelPage.prototype.constructor = InteractionChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InteractionChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelPage#\n *\n * @param {InteractionChannelPayload} payload - Payload response from the API\n *\n * @returns InteractionChannelInstance\n */\n/* jshint ignore:end */\nInteractionChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new InteractionChannelInstance(this._version, payload, this._solution.interactionSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionChannelPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelContext\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} interactionSid - The Interaction Sid for this channel.\n * @property {interaction_channel.type} type - The Interaction Channel's type.\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {InteractionChannelPayload} payload - The instance payload\n * @param {sid} interactionSid - The Interaction Sid for this channel.\n * @param {sid} sid - The Channel Sid for this Participant.\n */\n/* jshint ignore:end */\nInteractionChannelInstance = function InteractionChannelInstance(version,\n    payload, interactionSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.interactionSid = payload.interaction_sid; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {interactionSid: interactionSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(InteractionChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InteractionChannelContext(\n          this._version,\n          this._solution.interactionSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a InteractionChannelInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionChannelInstance\n */\n/* jshint ignore:end */\nInteractionChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a InteractionChannelInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelInstance#\n *\n * @param {object} opts - Options for request\n * @param {interaction_channel.status} opts.status -\n *          The Interaction Channels's status\n * @param {object} [opts.routing] -\n *          The Interaction Channels's optional routing parameters\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionChannelInstance\n */\n/* jshint ignore:end */\nInteractionChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the invites\n *\n * @function invites\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelInstance#\n *\n * @returns {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList}\n */\n/* jshint ignore:end */\nInteractionChannelInstance.prototype.invites = function invites() {\n  return this._proxy.invites;\n};\n\n/* jshint ignore:start */\n/**\n * Access the participants\n *\n * @function participants\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelInstance#\n *\n * @returns {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList}\n */\n/* jshint ignore:end */\nInteractionChannelInstance.prototype.participants = function participants() {\n  return this._proxy.participants;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionChannelInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionChannelContext\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext\n *\n * @property {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelInviteList} invites -\n *          invites resource\n * @property {Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext.InteractionChannelParticipantList} participants -\n *          participants resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} interactionSid - The Interaction Sid for this channel.\n * @param {sid} sid - The Channel Sid for this Participant.\n */\n/* jshint ignore:end */\nInteractionChannelContext = function InteractionChannelContext(version,\n    interactionSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {interactionSid: interactionSid, sid: sid, };\n  this._uri = `/Interactions/${interactionSid}/Channels/${sid}`;\n\n  // Dependents\n  this._invites = undefined;\n  this._participants = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InteractionChannelInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionChannelInstance\n */\n/* jshint ignore:end */\nInteractionChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InteractionChannelInstance(\n      this._version,\n      payload,\n      this._solution.interactionSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a InteractionChannelInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext#\n *\n * @param {object} opts - Options for request\n * @param {interaction_channel.status} opts.status -\n *          The Interaction Channels's status\n * @param {object} [opts.routing] -\n *          The Interaction Channels's optional routing parameters\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionChannelInstance\n */\n/* jshint ignore:end */\nInteractionChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Status': _.get(opts, 'status'),\n    'Routing': serialize.object(_.get(opts, 'routing'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InteractionChannelInstance(\n      this._version,\n      payload,\n      this._solution.interactionSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(InteractionChannelContext.prototype,\n  'invites', {\n    get: function() {\n      if (!this._invites) {\n        this._invites = new InteractionChannelInviteList(\n          this._version,\n          this._solution.interactionSid,\n          this._solution.sid\n        );\n      }\n      return this._invites;\n    }\n});\n\nObject.defineProperty(InteractionChannelContext.prototype,\n  'participants', {\n    get: function() {\n      if (!this._participants) {\n        this._participants = new InteractionChannelParticipantList(\n          this._version,\n          this._solution.interactionSid,\n          this._solution.sid\n        );\n      }\n      return this._participants;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionContext.InteractionChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInteractionChannelContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InteractionChannelList: InteractionChannelList,\n  InteractionChannelPage: InteractionChannelPage,\n  InteractionChannelInstance: InteractionChannelInstance,\n  InteractionChannelContext: InteractionChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar InteractionChannelList = require(\n    './interaction/interactionChannel').InteractionChannelList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar InteractionList;\nvar InteractionPage;\nvar InteractionInstance;\nvar InteractionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionList\n *\n * @constructor Twilio.FlexApi.V1.InteractionList\n *\n * @param {Twilio.FlexApi.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nInteractionList = function InteractionList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function interaction\n   * @memberof Twilio.FlexApi.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.FlexApi.V1.InteractionContext}\n   */\n  /* jshint ignore:end */\n  function InteractionListInstance(sid) {\n    return InteractionListInstance.get(sid);\n  }\n\n  InteractionListInstance._version = version;\n  // Path Solution\n  InteractionListInstance._solution = {};\n  InteractionListInstance._uri = `/Interactions`;\n  /* jshint ignore:start */\n  /**\n   * create a InteractionInstance\n   *\n   * @function create\n   * @memberof Twilio.FlexApi.V1.InteractionList#\n   *\n   * @param {object} opts - Options for request\n   * @param {object} opts.channel - The Interaction's channel\n   * @param {object} opts.routing - The Interaction's routing logic\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed InteractionInstance\n   */\n  /* jshint ignore:end */\n  InteractionListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['channel'])) {\n      throw new Error('Required parameter \"opts[\\'channel\\']\" missing.');\n    }\n    if (_.isUndefined(opts['routing'])) {\n      throw new Error('Required parameter \"opts[\\'routing\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Channel': serialize.object(_.get(opts, 'channel')),\n      'Routing': serialize.object(_.get(opts, 'routing'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a interaction\n   *\n   * @function get\n   * @memberof Twilio.FlexApi.V1.InteractionList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.FlexApi.V1.InteractionContext}\n   */\n  /* jshint ignore:end */\n  InteractionListInstance.get = function get(sid) {\n    return new InteractionContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.FlexApi.V1.InteractionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InteractionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InteractionListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InteractionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionPage\n *\n * @constructor Twilio.FlexApi.V1.InteractionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InteractionSolution} solution - Path solution\n *\n * @returns InteractionPage\n */\n/* jshint ignore:end */\nInteractionPage = function InteractionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InteractionPage.prototype, Page.prototype);\nInteractionPage.prototype.constructor = InteractionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InteractionInstance\n *\n * @function getInstance\n * @memberof Twilio.FlexApi.V1.InteractionPage#\n *\n * @param {InteractionPayload} payload - Payload response from the API\n *\n * @returns InteractionInstance\n */\n/* jshint ignore:end */\nInteractionPage.prototype.getInstance = function getInstance(payload) {\n  return new InteractionInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionContext\n *\n * @constructor Twilio.FlexApi.V1.InteractionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {object} channel - The Interaction's channel\n * @property {object} routing - The Interaction's routing logic\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {InteractionPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nInteractionInstance = function InteractionInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.channel = payload.channel; // jshint ignore:line\n  this.routing = payload.routing; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(InteractionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InteractionContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a InteractionInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.InteractionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionInstance\n */\n/* jshint ignore:end */\nInteractionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the channels\n *\n * @function channels\n * @memberof Twilio.FlexApi.V1.InteractionInstance#\n *\n * @returns {Twilio.FlexApi.V1.InteractionContext.InteractionChannelList}\n */\n/* jshint ignore:end */\nInteractionInstance.prototype.channels = function channels() {\n  return this._proxy.channels;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionContext\n *\n * @constructor Twilio.FlexApi.V1.InteractionContext\n *\n * @property {Twilio.FlexApi.V1.InteractionContext.InteractionChannelList} channels -\n *          channels resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nInteractionContext = function InteractionContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Interactions/${sid}`;\n\n  // Dependents\n  this._channels = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InteractionInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.InteractionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionInstance\n */\n/* jshint ignore:end */\nInteractionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InteractionInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(InteractionContext.prototype,\n  'channels', {\n    get: function() {\n      if (!this._channels) {\n        this._channels = new InteractionChannelList(this._version, this._solution.sid);\n      }\n      return this._channels;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.InteractionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInteractionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InteractionList: InteractionList,\n  InteractionPage: InteractionPage,\n  InteractionInstance: InteractionInstance,\n  InteractionContext: InteractionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar WebChannelList;\nvar WebChannelPage;\nvar WebChannelInstance;\nvar WebChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WebChannelList\n *\n * @constructor Twilio.FlexApi.V1.WebChannelList\n *\n * @param {Twilio.FlexApi.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nWebChannelList = function WebChannelList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function webChannel\n   * @memberof Twilio.FlexApi.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.FlexApi.V1.WebChannelContext}\n   */\n  /* jshint ignore:end */\n  function WebChannelListInstance(sid) {\n    return WebChannelListInstance.get(sid);\n  }\n\n  WebChannelListInstance._version = version;\n  // Path Solution\n  WebChannelListInstance._solution = {};\n  WebChannelListInstance._uri = `/WebChannels`;\n  /* jshint ignore:start */\n  /**\n   * Streams WebChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.FlexApi.V1.WebChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WebChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WebChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.FlexApi.V1.WebChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WebChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.FlexApi.V1.WebChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WebChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.FlexApi.V1.WebChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a WebChannelInstance\n   *\n   * @function create\n   * @memberof Twilio.FlexApi.V1.WebChannelList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.flexFlowSid - The SID of the Flex Flow\n   * @param {string} opts.identity - The chat identity\n   * @param {string} opts.customerFriendlyName - The chat participant's friendly name\n   * @param {string} opts.chatFriendlyName - The chat channel's friendly name\n   * @param {string} [opts.chatUniqueName] - The chat channel's unique name\n   * @param {string} [opts.preEngagementData] - The pre-engagement data\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WebChannelInstance\n   */\n  /* jshint ignore:end */\n  WebChannelListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['flexFlowSid'])) {\n      throw new Error('Required parameter \"opts[\\'flexFlowSid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n    if (_.isUndefined(opts['customerFriendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'customerFriendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['chatFriendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'chatFriendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FlexFlowSid': _.get(opts, 'flexFlowSid'),\n      'Identity': _.get(opts, 'identity'),\n      'CustomerFriendlyName': _.get(opts, 'customerFriendlyName'),\n      'ChatFriendlyName': _.get(opts, 'chatFriendlyName'),\n      'ChatUniqueName': _.get(opts, 'chatUniqueName'),\n      'PreEngagementData': _.get(opts, 'preEngagementData')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebChannelInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a web_channel\n   *\n   * @function get\n   * @memberof Twilio.FlexApi.V1.WebChannelList#\n   *\n   * @param {string} sid - The SID of the WebChannel resource to fetch\n   *\n   * @returns {Twilio.FlexApi.V1.WebChannelContext}\n   */\n  /* jshint ignore:end */\n  WebChannelListInstance.get = function get(sid) {\n    return new WebChannelContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.FlexApi.V1.WebChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WebChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WebChannelListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WebChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebChannelPage\n *\n * @constructor Twilio.FlexApi.V1.WebChannelPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WebChannelSolution} solution - Path solution\n *\n * @returns WebChannelPage\n */\n/* jshint ignore:end */\nWebChannelPage = function WebChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WebChannelPage.prototype, Page.prototype);\nWebChannelPage.prototype.constructor = WebChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WebChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.FlexApi.V1.WebChannelPage#\n *\n * @param {WebChannelPayload} payload - Payload response from the API\n *\n * @returns WebChannelInstance\n */\n/* jshint ignore:end */\nWebChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new WebChannelInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.WebChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebChannelPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebChannelContext\n *\n * @constructor Twilio.FlexApi.V1.WebChannelInstance\n *\n * @property {string} accountSid -\n *          The SID of the Account that created the resource and owns this Workflow\n * @property {string} flexFlowSid - The SID of the Flex Flow\n * @property {string} sid -\n *          The unique string that identifies the WebChannel resource\n * @property {string} url - The absolute URL of the WebChannel resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n *\n * @param {V1} version - Version of the resource\n * @param {WebChannelPayload} payload - The instance payload\n * @param {sid} sid - The SID of the WebChannel resource to fetch\n */\n/* jshint ignore:end */\nWebChannelInstance = function WebChannelInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.flexFlowSid = payload.flex_flow_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(WebChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WebChannelContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WebChannelInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.WebChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebChannelInstance\n */\n/* jshint ignore:end */\nWebChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WebChannelInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.WebChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {web_channel.chat_status} [opts.chatStatus] - The chat status\n * @param {string} [opts.postEngagementData] - The post-engagement data\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebChannelInstance\n */\n/* jshint ignore:end */\nWebChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebChannelInstance\n *\n * @function remove\n * @memberof Twilio.FlexApi.V1.WebChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebChannelInstance\n */\n/* jshint ignore:end */\nWebChannelInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.WebChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebChannelContext\n *\n * @constructor Twilio.FlexApi.V1.WebChannelContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID of the WebChannel resource to fetch\n */\n/* jshint ignore:end */\nWebChannelContext = function WebChannelContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/WebChannels/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebChannelInstance\n *\n * @function fetch\n * @memberof Twilio.FlexApi.V1.WebChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebChannelInstance\n */\n/* jshint ignore:end */\nWebChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebChannelInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WebChannelInstance\n *\n * @function update\n * @memberof Twilio.FlexApi.V1.WebChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {web_channel.chat_status} [opts.chatStatus] - The chat status\n * @param {string} [opts.postEngagementData] - The post-engagement data\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebChannelInstance\n */\n/* jshint ignore:end */\nWebChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'ChatStatus': _.get(opts, 'chatStatus'),\n    'PostEngagementData': _.get(opts, 'postEngagementData')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebChannelInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebChannelInstance\n *\n * @function remove\n * @memberof Twilio.FlexApi.V1.WebChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebChannelInstance\n */\n/* jshint ignore:end */\nWebChannelContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FlexApi.V1.WebChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWebChannelContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WebChannelList: WebChannelList,\n  WebChannelPage: WebChannelPage,\n  WebChannelInstance: WebChannelInstance,\n  WebChannelContext: WebChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar ChannelList = require('./v1/channel').ChannelList;\nvar ConfigurationList = require('./v1/configuration').ConfigurationList;\nvar FlexFlowList = require('./v1/flexFlow').FlexFlowList;\nvar InteractionList = require('./v1/interaction').InteractionList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\nvar WebChannelList = require('./v1/webChannel').WebChannelList;\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of FlexApi\n *\n * @constructor Twilio.FlexApi.V1\n *\n * @property {Twilio.FlexApi.V1.ChannelList} channel - channel resource\n * @property {Twilio.FlexApi.V1.ConfigurationList} configuration -\n *          configuration resource\n * @property {Twilio.FlexApi.V1.FlexFlowList} flexFlow - flexFlow resource\n * @property {Twilio.FlexApi.V1.InteractionList} interaction - interaction resource\n * @property {Twilio.FlexApi.V1.WebChannelList} webChannel - webChannel resource\n *\n * @param {Twilio.FlexApi} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._channel = undefined;\n  this._configuration = undefined;\n  this._flexFlow = undefined;\n  this._interaction = undefined;\n  this._webChannel = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'channel', {\n    get: function() {\n      this._channel = this._channel || new ChannelList(this);\n      return this._channel;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'configuration', {\n    get: function() {\n      this._configuration = this._configuration || new ConfigurationList(this);\n      return this._configuration;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'flexFlow', {\n    get: function() {\n      this._flexFlow = this._flexFlow || new FlexFlowList(this);\n      return this._flexFlow;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'interaction', {\n    get: function() {\n      this._interaction = this._interaction || new InteractionList(this);\n      return this._interaction;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'webChannel', {\n    get: function() {\n      this._webChannel = this._webChannel || new WebChannelList(this);\n      return this._webChannel;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./flexApi/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize flex_api domain\n *\n * @constructor Twilio.FlexApi\n *\n * @property {Twilio.FlexApi.V1} v1 - v1 version\n * @property {Twilio.FlexApi.V1.ChannelList} channel - channel resource\n * @property {Twilio.FlexApi.V1.ConfigurationList} configuration -\n *          configuration resource\n * @property {Twilio.FlexApi.V1.FlexFlowList} flexFlow - flexFlow resource\n * @property {Twilio.FlexApi.V1.InteractionList} interaction - interaction resource\n * @property {Twilio.FlexApi.V1.WebChannelList} webChannel - webChannel resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction FlexApi(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://flex-api.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(FlexApi.prototype, Domain.prototype);\nFlexApi.prototype.constructor = FlexApi;\n\nObject.defineProperty(FlexApi.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(FlexApi.prototype,\n  'channel', {\n    get: function() {\n      return this.v1.channel;\n    }\n});\n\nObject.defineProperty(FlexApi.prototype,\n  'configuration', {\n    get: function() {\n      return this.v1.configuration;\n    }\n});\n\nObject.defineProperty(FlexApi.prototype,\n  'flexFlow', {\n    get: function() {\n      return this.v1.flexFlow;\n    }\n});\n\nObject.defineProperty(FlexApi.prototype,\n  'interaction', {\n    get: function() {\n      return this.v1.interaction;\n    }\n});\n\nObject.defineProperty(FlexApi.prototype,\n  'webChannel', {\n    get: function() {\n      return this.v1.webChannel;\n    }\n});\n\nmodule.exports = FlexApi;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar UserList;\nvar UserPage;\nvar UserInstance;\nvar UserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.FrontlineApi.V1.UserList\n *\n * @param {Twilio.FrontlineApi.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nUserList = function UserList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function users\n   * @memberof Twilio.FrontlineApi.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.FrontlineApi.V1.UserContext}\n   */\n  /* jshint ignore:end */\n  function UserListInstance(sid) {\n    return UserListInstance.get(sid);\n  }\n\n  UserListInstance._version = version;\n  // Path Solution\n  UserListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a user\n   *\n   * @function get\n   * @memberof Twilio.FrontlineApi.V1.UserList#\n   *\n   * @param {string} sid - The SID of the User resource to fetch\n   *\n   * @returns {Twilio.FrontlineApi.V1.UserContext}\n   */\n  /* jshint ignore:end */\n  UserListInstance.get = function get(sid) {\n    return new UserContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.FrontlineApi.V1.UserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.FrontlineApi.V1.UserPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserSolution} solution - Path solution\n *\n * @returns UserPage\n */\n/* jshint ignore:end */\nUserPage = function UserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserPage.prototype, Page.prototype);\nUserPage.prototype.constructor = UserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserInstance\n *\n * @function getInstance\n * @memberof Twilio.FrontlineApi.V1.UserPage#\n *\n * @param {UserPayload} payload - Payload response from the API\n *\n * @returns UserInstance\n */\n/* jshint ignore:end */\nUserPage.prototype.getInstance = function getInstance(payload) {\n  return new UserInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FrontlineApi.V1.UserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.FrontlineApi.V1.UserInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} identity - The string that identifies the resource's User\n * @property {string} friendlyName -\n *          The string that you assigned to describe the User\n * @property {string} avatar -\n *          The avatar URL which will be shown in Frontline application\n * @property {user.state_type} state - Current state of this user\n * @property {boolean} isAvailable -\n *          Whether the User is available for new conversations\n * @property {string} url - An absolute URL for this user.\n *\n * @param {V1} version - Version of the resource\n * @param {UserPayload} payload - The instance payload\n * @param {string} sid - The SID of the User resource to fetch\n */\n/* jshint ignore:end */\nUserInstance = function UserInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.avatar = payload.avatar; // jshint ignore:line\n  this.state = payload.state; // jshint ignore:line\n  this.isAvailable = payload.is_available; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(UserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.FrontlineApi.V1.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.FrontlineApi.V1.UserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the User\n * @param {string} [opts.avatar] -\n *          The avatar URL which will be shown in Frontline application\n * @param {user.state_type} [opts.state] - Current state of this user\n * @param {boolean} [opts.isAvailable] -\n *          Whether the User is available for new conversations\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FrontlineApi.V1.UserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.FrontlineApi.V1.UserContext\n *\n * @param {V1} version - Version of the resource\n * @param {string} sid - The SID of the User resource to fetch\n */\n/* jshint ignore:end */\nUserContext = function UserContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Users/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.FrontlineApi.V1.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.FrontlineApi.V1.UserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the User\n * @param {string} [opts.avatar] -\n *          The avatar URL which will be shown in Frontline application\n * @param {user.state_type} [opts.state] - Current state of this user\n * @param {boolean} [opts.isAvailable] -\n *          Whether the User is available for new conversations\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Avatar': _.get(opts, 'avatar'),\n    'State': _.get(opts, 'state'),\n    'IsAvailable': serialize.bool(_.get(opts, 'isAvailable'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.FrontlineApi.V1.UserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserList: UserList,\n  UserPage: UserPage,\n  UserInstance: UserInstance,\n  UserContext: UserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar UserList = require('./v1/user').UserList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of FrontlineApi\n *\n * @constructor Twilio.FrontlineApi.V1\n *\n * @property {Twilio.FrontlineApi.V1.UserList} users - users resource\n *\n * @param {Twilio.FrontlineApi} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._users = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'users', {\n    get: function() {\n      this._users = this._users || new UserList(this);\n      return this._users;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./frontlineApi/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize frontline_api domain\n *\n * @constructor Twilio.FrontlineApi\n *\n * @property {Twilio.FrontlineApi.V1} v1 - v1 version\n * @property {Twilio.FrontlineApi.V1.UserList} users - users resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction FrontlineApi(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://frontline-api.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(FrontlineApi.prototype, Domain.prototype);\nFrontlineApi.prototype.constructor = FrontlineApi;\n\nObject.defineProperty(FrontlineApi.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(FrontlineApi.prototype,\n  'users', {\n    get: function() {\n      return this.v1.users;\n    }\n});\n\nmodule.exports = FrontlineApi;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar AnnotationList;\nvar AnnotationPage;\nvar AnnotationInstance;\nvar AnnotationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AnnotationList\n *\n * @constructor Twilio.Insights.V1.AnnotationList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nAnnotationList = function AnnotationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function annotation\n   * @memberof Twilio.Insights.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.AnnotationContext}\n   */\n  /* jshint ignore:end */\n  function AnnotationListInstance(sid) {\n    return AnnotationListInstance.get(sid);\n  }\n\n  AnnotationListInstance._version = version;\n  // Path Solution\n  AnnotationListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a annotation\n   *\n   * @function get\n   * @memberof Twilio.Insights.V1.AnnotationList#\n   *\n   * @param {string} callSid - The call_sid\n   *\n   * @returns {Twilio.Insights.V1.AnnotationContext}\n   */\n  /* jshint ignore:end */\n  AnnotationListInstance.get = function get(callSid) {\n    return new AnnotationContext(this._version, callSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.AnnotationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AnnotationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AnnotationListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AnnotationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AnnotationPage\n *\n * @constructor Twilio.Insights.V1.AnnotationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AnnotationSolution} solution - Path solution\n *\n * @returns AnnotationPage\n */\n/* jshint ignore:end */\nAnnotationPage = function AnnotationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AnnotationPage.prototype, Page.prototype);\nAnnotationPage.prototype.constructor = AnnotationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AnnotationInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.AnnotationPage#\n *\n * @param {AnnotationPayload} payload - Payload response from the API\n *\n * @returns AnnotationInstance\n */\n/* jshint ignore:end */\nAnnotationPage.prototype.getInstance = function getInstance(payload) {\n  return new AnnotationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.AnnotationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAnnotationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAnnotationPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AnnotationContext\n *\n * @constructor Twilio.Insights.V1.AnnotationInstance\n *\n * @property {string} callSid - The call_sid\n * @property {string} accountSid - The account_sid\n * @property {annotation.answered_by} answeredBy - The answered_by\n * @property {annotation.connectivity_issue} connectivityIssue -\n *          The connectivity_issue\n * @property {string} qualityIssues - The quality_issues\n * @property {boolean} spam - The spam\n * @property {number} callScore - The call_score\n * @property {string} comment - The comment\n * @property {string} incident - The incident\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {AnnotationPayload} payload - The instance payload\n * @param {sid} callSid - The call_sid\n */\n/* jshint ignore:end */\nAnnotationInstance = function AnnotationInstance(version, payload, callSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.answeredBy = payload.answered_by; // jshint ignore:line\n  this.connectivityIssue = payload.connectivity_issue; // jshint ignore:line\n  this.qualityIssues = payload.quality_issues; // jshint ignore:line\n  this.spam = payload.spam; // jshint ignore:line\n  this.callScore = deserialize.integer(payload.call_score); // jshint ignore:line\n  this.comment = payload.comment; // jshint ignore:line\n  this.incident = payload.incident; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {callSid: callSid || this.callSid, };\n};\n\nObject.defineProperty(AnnotationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AnnotationContext(this._version, this._solution.callSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a AnnotationInstance\n *\n * @function update\n * @memberof Twilio.Insights.V1.AnnotationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {annotation.answered_by} [opts.answeredBy] - The answered_by\n * @param {annotation.connectivity_issue} [opts.connectivityIssue] -\n *          The connectivity_issue\n * @param {string} [opts.qualityIssues] - The quality_issues\n * @param {boolean} [opts.spam] - The spam\n * @param {number} [opts.callScore] - The call_score\n * @param {string} [opts.comment] - The comment\n * @param {string} [opts.incident] - The incident\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AnnotationInstance\n */\n/* jshint ignore:end */\nAnnotationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AnnotationInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.AnnotationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AnnotationInstance\n */\n/* jshint ignore:end */\nAnnotationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.AnnotationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAnnotationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAnnotationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AnnotationContext\n *\n * @constructor Twilio.Insights.V1.AnnotationContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} callSid - The call_sid\n */\n/* jshint ignore:end */\nAnnotationContext = function AnnotationContext(version, callSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {callSid: callSid, };\n  this._uri = `/Voice/${callSid}/Annotation`;\n};\n\n/* jshint ignore:start */\n/**\n * update a AnnotationInstance\n *\n * @function update\n * @memberof Twilio.Insights.V1.AnnotationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {annotation.answered_by} [opts.answeredBy] - The answered_by\n * @param {annotation.connectivity_issue} [opts.connectivityIssue] -\n *          The connectivity_issue\n * @param {string} [opts.qualityIssues] - The quality_issues\n * @param {boolean} [opts.spam] - The spam\n * @param {number} [opts.callScore] - The call_score\n * @param {string} [opts.comment] - The comment\n * @param {string} [opts.incident] - The incident\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AnnotationInstance\n */\n/* jshint ignore:end */\nAnnotationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'AnsweredBy': _.get(opts, 'answeredBy'),\n    'ConnectivityIssue': _.get(opts, 'connectivityIssue'),\n    'QualityIssues': _.get(opts, 'qualityIssues'),\n    'Spam': serialize.bool(_.get(opts, 'spam')),\n    'CallScore': _.get(opts, 'callScore'),\n    'Comment': _.get(opts, 'comment'),\n    'Incident': _.get(opts, 'incident')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AnnotationInstance(this._version, payload, this._solution.callSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AnnotationInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.AnnotationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AnnotationInstance\n */\n/* jshint ignore:end */\nAnnotationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AnnotationInstance(this._version, payload, this._solution.callSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.AnnotationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAnnotationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAnnotationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AnnotationList: AnnotationList,\n  AnnotationPage: AnnotationPage,\n  AnnotationInstance: AnnotationInstance,\n  AnnotationContext: AnnotationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CallSummaryList;\nvar CallSummaryPage;\nvar CallSummaryInstance;\nvar CallSummaryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CallSummaryList\n *\n * @constructor Twilio.Insights.V1.CallContext.CallSummaryList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n * @param {string} callSid - The call_sid\n */\n/* jshint ignore:end */\nCallSummaryList = function CallSummaryList(version, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function summary\n   * @memberof Twilio.Insights.V1.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.CallContext.CallSummaryContext}\n   */\n  /* jshint ignore:end */\n  function CallSummaryListInstance(sid) {\n    return CallSummaryListInstance.get(sid);\n  }\n\n  CallSummaryListInstance._version = version;\n  // Path Solution\n  CallSummaryListInstance._solution = {callSid: callSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a call_summary\n   *\n   * @function get\n   * @memberof Twilio.Insights.V1.CallContext.CallSummaryList#\n   *\n   * @returns {Twilio.Insights.V1.CallContext.CallSummaryContext}\n   */\n  /* jshint ignore:end */\n  CallSummaryListInstance.get = function get() {\n    return new CallSummaryContext(this._version, this._solution.callSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.CallContext.CallSummaryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CallSummaryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CallSummaryListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CallSummaryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallSummaryPage\n *\n * @constructor Twilio.Insights.V1.CallContext.CallSummaryPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CallSummarySolution} solution - Path solution\n *\n * @returns CallSummaryPage\n */\n/* jshint ignore:end */\nCallSummaryPage = function CallSummaryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CallSummaryPage.prototype, Page.prototype);\nCallSummaryPage.prototype.constructor = CallSummaryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CallSummaryInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.CallContext.CallSummaryPage#\n *\n * @param {CallSummaryPayload} payload - Payload response from the API\n *\n * @returns CallSummaryInstance\n */\n/* jshint ignore:end */\nCallSummaryPage.prototype.getInstance = function getInstance(payload) {\n  return new CallSummaryInstance(this._version, payload, this._solution.callSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallContext.CallSummaryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallSummaryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCallSummaryPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallSummaryContext\n *\n * @constructor Twilio.Insights.V1.CallContext.CallSummaryInstance\n *\n * @property {string} accountSid - The account_sid\n * @property {string} callSid - The call_sid\n * @property {call_summary.call_type} callType - The call_type\n * @property {call_summary.call_state} callState - The call_state\n * @property {call_summary.processing_state} processingState - The processing_state\n * @property {Date} createdTime - The created_time\n * @property {Date} startTime - The start_time\n * @property {Date} endTime - The end_time\n * @property {number} duration - The duration\n * @property {number} connectDuration - The connect_duration\n * @property {object} from - The from\n * @property {object} to - The to\n * @property {object} carrierEdge - The carrier_edge\n * @property {object} clientEdge - The client_edge\n * @property {object} sdkEdge - The sdk_edge\n * @property {object} sipEdge - The sip_edge\n * @property {string} tags - The tags\n * @property {string} url - The url\n * @property {object} attributes - The attributes\n * @property {object} properties - The properties\n * @property {object} trust - The trust\n *\n * @param {V1} version - Version of the resource\n * @param {CallSummaryPayload} payload - The instance payload\n * @param {sid} callSid - The call_sid\n */\n/* jshint ignore:end */\nCallSummaryInstance = function CallSummaryInstance(version, payload, callSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.callType = payload.call_type; // jshint ignore:line\n  this.callState = payload.call_state; // jshint ignore:line\n  this.processingState = payload.processing_state; // jshint ignore:line\n  this.createdTime = deserialize.iso8601DateTime(payload.created_time); // jshint ignore:line\n  this.startTime = deserialize.iso8601DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.duration = deserialize.integer(payload.duration); // jshint ignore:line\n  this.connectDuration = deserialize.integer(payload.connect_duration); // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.carrierEdge = payload.carrier_edge; // jshint ignore:line\n  this.clientEdge = payload.client_edge; // jshint ignore:line\n  this.sdkEdge = payload.sdk_edge; // jshint ignore:line\n  this.sipEdge = payload.sip_edge; // jshint ignore:line\n  this.tags = payload.tags; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.properties = payload.properties; // jshint ignore:line\n  this.trust = payload.trust; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {callSid: callSid, };\n};\n\nObject.defineProperty(CallSummaryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CallSummaryContext(this._version, this._solution.callSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CallSummaryInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.CallContext.CallSummaryInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {call_summary.processing_state} [opts.processingState] -\n *          The processing_state\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallSummaryInstance\n */\n/* jshint ignore:end */\nCallSummaryInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallContext.CallSummaryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallSummaryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCallSummaryInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallSummaryContext\n *\n * @constructor Twilio.Insights.V1.CallContext.CallSummaryContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} callSid - The call_sid\n */\n/* jshint ignore:end */\nCallSummaryContext = function CallSummaryContext(version, callSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {callSid: callSid, };\n  this._uri = `/Voice/${callSid}/Summary`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CallSummaryInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.CallContext.CallSummaryContext#\n *\n * @param {object} [opts] - Options for request\n * @param {call_summary.processing_state} [opts.processingState] -\n *          The processing_state\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallSummaryInstance\n */\n/* jshint ignore:end */\nCallSummaryContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'ProcessingState': _.get(opts, 'processingState')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CallSummaryInstance(this._version, payload, this._solution.callSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallContext.CallSummaryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallSummaryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCallSummaryContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CallSummaryList: CallSummaryList,\n  CallSummaryPage: CallSummaryPage,\n  CallSummaryInstance: CallSummaryInstance,\n  CallSummaryContext: CallSummaryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar EventList;\nvar EventPage;\nvar EventInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the EventList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallContext.EventList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n * @param {string} callSid - The call_sid\n */\n/* jshint ignore:end */\nEventList = function EventList(version, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function events\n   * @memberof Twilio.Insights.V1.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.CallContext.EventContext}\n   */\n  /* jshint ignore:end */\n  function EventListInstance(sid) {\n    return EventListInstance.get(sid);\n  }\n\n  EventListInstance._version = version;\n  // Path Solution\n  EventListInstance._solution = {callSid: callSid};\n  EventListInstance._uri = `/Voice/${callSid}/Events`;\n  /* jshint ignore:start */\n  /**\n   * Streams EventInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Insights.V1.CallContext.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {event.twilio_edge} [opts.edge] - The edge\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EventListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EventInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Insights.V1.CallContext.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {event.twilio_edge} [opts.edge] - The edge\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Insights.V1.CallContext.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {event.twilio_edge} [opts.edge] - The edge\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Edge': _.get(opts, 'edge'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Insights.V1.CallContext.EventList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.CallContext.EventList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EventListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EventListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EventListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallContext.EventPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EventSolution} solution - Path solution\n *\n * @returns EventPage\n */\n/* jshint ignore:end */\nEventPage = function EventPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EventPage.prototype, Page.prototype);\nEventPage.prototype.constructor = EventPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EventInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.CallContext.EventPage#\n *\n * @param {EventPayload} payload - Payload response from the API\n *\n * @returns EventInstance\n */\n/* jshint ignore:end */\nEventPage.prototype.getInstance = function getInstance(payload) {\n  return new EventInstance(this._version, payload, this._solution.callSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallContext.EventPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallContext.EventInstance\n *\n * @property {string} timestamp - The timestamp\n * @property {string} callSid - The call_sid\n * @property {string} accountSid - The account_sid\n * @property {event.twilio_edge} edge - The edge\n * @property {string} group - The group\n * @property {event.level} level - The level\n * @property {string} name - The name\n * @property {object} carrierEdge - The carrier_edge\n * @property {object} sipEdge - The sip_edge\n * @property {object} sdkEdge - The sdk_edge\n * @property {object} clientEdge - The client_edge\n *\n * @param {V1} version - Version of the resource\n * @param {EventPayload} payload - The instance payload\n * @param {sid} callSid - The call_sid\n */\n/* jshint ignore:end */\nEventInstance = function EventInstance(version, payload, callSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.timestamp = payload.timestamp; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.edge = payload.edge; // jshint ignore:line\n  this.group = payload.group; // jshint ignore:line\n  this.level = payload.level; // jshint ignore:line\n  this.name = payload.name; // jshint ignore:line\n  this.carrierEdge = payload.carrier_edge; // jshint ignore:line\n  this.sipEdge = payload.sip_edge; // jshint ignore:line\n  this.sdkEdge = payload.sdk_edge; // jshint ignore:line\n  this.clientEdge = payload.client_edge; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {callSid: callSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallContext.EventInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EventList: EventList,\n  EventPage: EventPage,\n  EventInstance: EventInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar MetricList;\nvar MetricPage;\nvar MetricInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the MetricList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallContext.MetricList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n * @param {string} callSid - The call_sid\n */\n/* jshint ignore:end */\nMetricList = function MetricList(version, callSid) {\n  /* jshint ignore:start */\n  /**\n   * @function metrics\n   * @memberof Twilio.Insights.V1.CallContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.CallContext.MetricContext}\n   */\n  /* jshint ignore:end */\n  function MetricListInstance(sid) {\n    return MetricListInstance.get(sid);\n  }\n\n  MetricListInstance._version = version;\n  // Path Solution\n  MetricListInstance._solution = {callSid: callSid};\n  MetricListInstance._uri = `/Voice/${callSid}/Metrics`;\n  /* jshint ignore:start */\n  /**\n   * Streams MetricInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Insights.V1.CallContext.MetricList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {metric.twilio_edge} [opts.edge] - The edge\n   * @param {metric.stream_direction} [opts.direction] - The direction\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MetricListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MetricInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Insights.V1.CallContext.MetricList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {metric.twilio_edge} [opts.edge] - The edge\n   * @param {metric.stream_direction} [opts.direction] - The direction\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MetricListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MetricInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Insights.V1.CallContext.MetricList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {metric.twilio_edge} [opts.edge] - The edge\n   * @param {metric.stream_direction} [opts.direction] - The direction\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MetricListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Edge': _.get(opts, 'edge'),\n      'Direction': _.get(opts, 'direction'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MetricPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MetricInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Insights.V1.CallContext.MetricList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MetricListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MetricPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.CallContext.MetricList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MetricListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MetricListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MetricListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MetricPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallContext.MetricPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MetricSolution} solution - Path solution\n *\n * @returns MetricPage\n */\n/* jshint ignore:end */\nMetricPage = function MetricPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MetricPage.prototype, Page.prototype);\nMetricPage.prototype.constructor = MetricPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MetricInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.CallContext.MetricPage#\n *\n * @param {MetricPayload} payload - Payload response from the API\n *\n * @returns MetricInstance\n */\n/* jshint ignore:end */\nMetricPage.prototype.getInstance = function getInstance(payload) {\n  return new MetricInstance(this._version, payload, this._solution.callSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallContext.MetricPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMetricPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMetricPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MetricContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallContext.MetricInstance\n *\n * @property {string} timestamp - The timestamp\n * @property {string} callSid - The call_sid\n * @property {string} accountSid - The account_sid\n * @property {metric.twilio_edge} edge - The edge\n * @property {metric.stream_direction} direction - The direction\n * @property {object} carrierEdge - The carrier_edge\n * @property {object} sipEdge - The sip_edge\n * @property {object} sdkEdge - The sdk_edge\n * @property {object} clientEdge - The client_edge\n *\n * @param {V1} version - Version of the resource\n * @param {MetricPayload} payload - The instance payload\n * @param {sid} callSid - The call_sid\n */\n/* jshint ignore:end */\nMetricInstance = function MetricInstance(version, payload, callSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.timestamp = payload.timestamp; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.edge = payload.edge; // jshint ignore:line\n  this.direction = payload.direction; // jshint ignore:line\n  this.carrierEdge = payload.carrier_edge; // jshint ignore:line\n  this.sipEdge = payload.sip_edge; // jshint ignore:line\n  this.sdkEdge = payload.sdk_edge; // jshint ignore:line\n  this.clientEdge = payload.client_edge; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {callSid: callSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallContext.MetricInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMetricInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMetricInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MetricList: MetricList,\n  MetricPage: MetricPage,\n  MetricInstance: MetricInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CallSummaryList = require('./call/summary').CallSummaryList;\nvar EventList = require('./call/event').EventList;\nvar MetricList = require('./call/metric').MetricList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CallList;\nvar CallPage;\nvar CallInstance;\nvar CallContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CallList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCallList = function CallList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function calls\n   * @memberof Twilio.Insights.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.CallContext}\n   */\n  /* jshint ignore:end */\n  function CallListInstance(sid) {\n    return CallListInstance.get(sid);\n  }\n\n  CallListInstance._version = version;\n  // Path Solution\n  CallListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a call\n   *\n   * @function get\n   * @memberof Twilio.Insights.V1.CallList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Insights.V1.CallContext}\n   */\n  /* jshint ignore:end */\n  CallListInstance.get = function get(sid) {\n    return new CallContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.CallList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CallListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CallListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CallListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CallSolution} solution - Path solution\n *\n * @returns CallPage\n */\n/* jshint ignore:end */\nCallPage = function CallPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CallPage.prototype, Page.prototype);\nCallPage.prototype.constructor = CallPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CallInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.CallPage#\n *\n * @param {CallPayload} payload - Payload response from the API\n *\n * @returns CallInstance\n */\n/* jshint ignore:end */\nCallPage.prototype.getInstance = function getInstance(payload) {\n  return new CallInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCallPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallInstance\n *\n * @property {string} sid - The sid\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {CallPayload} payload - The instance payload\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nCallInstance = function CallInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CallInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CallContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CallInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.CallInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallInstance\n */\n/* jshint ignore:end */\nCallInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the events\n *\n * @function events\n * @memberof Twilio.Insights.V1.CallInstance#\n *\n * @returns {Twilio.Insights.V1.CallContext.EventList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.events = function events() {\n  return this._proxy.events;\n};\n\n/* jshint ignore:start */\n/**\n * Access the metrics\n *\n * @function metrics\n * @memberof Twilio.Insights.V1.CallInstance#\n *\n * @returns {Twilio.Insights.V1.CallContext.MetricList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.metrics = function metrics() {\n  return this._proxy.metrics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the summary\n *\n * @function summary\n * @memberof Twilio.Insights.V1.CallInstance#\n *\n * @returns {Twilio.Insights.V1.CallContext.CallSummaryList}\n */\n/* jshint ignore:end */\nCallInstance.prototype.summary = function summary() {\n  return this._proxy.summary;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCallInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Insights.V1.CallContext\n *\n * @property {Twilio.Insights.V1.CallContext.EventList} events - events resource\n * @property {Twilio.Insights.V1.CallContext.MetricList} metrics - metrics resource\n * @property {Twilio.Insights.V1.CallContext.CallSummaryList} summary -\n *          summary resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nCallContext = function CallContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Voice/${sid}`;\n\n  // Dependents\n  this._events = undefined;\n  this._metrics = undefined;\n  this._summary = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CallInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.CallContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CallInstance\n */\n/* jshint ignore:end */\nCallContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CallInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(CallContext.prototype,\n  'events', {\n    get: function() {\n      if (!this._events) {\n        this._events = new EventList(this._version, this._solution.sid);\n      }\n      return this._events;\n    }\n});\n\nObject.defineProperty(CallContext.prototype,\n  'metrics', {\n    get: function() {\n      if (!this._metrics) {\n        this._metrics = new MetricList(this._version, this._solution.sid);\n      }\n      return this._metrics;\n    }\n});\n\nObject.defineProperty(CallContext.prototype,\n  'summary', {\n    get: function() {\n      if (!this._summary) {\n        this._summary = new CallSummaryList(this._version, this._solution.sid);\n      }\n      return this._summary;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCallContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CallList: CallList,\n  CallPage: CallPage,\n  CallInstance: CallInstance,\n  CallContext: CallContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CallSummariesList;\nvar CallSummariesPage;\nvar CallSummariesInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the CallSummariesList\n *\n * @constructor Twilio.Insights.V1.CallSummariesList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCallSummariesList = function CallSummariesList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function callSummaries\n   * @memberof Twilio.Insights.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.CallSummariesContext}\n   */\n  /* jshint ignore:end */\n  function CallSummariesListInstance(sid) {\n    return CallSummariesListInstance.get(sid);\n  }\n\n  CallSummariesListInstance._version = version;\n  // Path Solution\n  CallSummariesListInstance._solution = {};\n  CallSummariesListInstance._uri = `/Voice/Summaries`;\n  /* jshint ignore:start */\n  /**\n   * Streams CallSummariesInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Insights.V1.CallSummariesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.from] - The from\n   * @param {string} [opts.to] - The to\n   * @param {string} [opts.fromCarrier] - The from_carrier\n   * @param {string} [opts.toCarrier] - The to_carrier\n   * @param {string} [opts.fromCountryCode] - The from_country_code\n   * @param {string} [opts.toCountryCode] - The to_country_code\n   * @param {boolean} [opts.branded] - The branded\n   * @param {boolean} [opts.verifiedCaller] - The verified_caller\n   * @param {boolean} [opts.hasTag] - The has_tag\n   * @param {string} [opts.startTime] - The start_time\n   * @param {string} [opts.endTime] - The end_time\n   * @param {string} [opts.callType] - The call_type\n   * @param {string} [opts.callState] - The call_state\n   * @param {string} [opts.direction] - The direction\n   * @param {call_summaries.processing_state_request} [opts.processingState] -\n   *          The processing_state\n   * @param {call_summaries.sort_by} [opts.sortBy] - The sort_by\n   * @param {string} [opts.subaccount] - The subaccount\n   * @param {boolean} [opts.abnormalSession] - The abnormal_session\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CallSummariesListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CallSummariesInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Insights.V1.CallSummariesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.from] - The from\n   * @param {string} [opts.to] - The to\n   * @param {string} [opts.fromCarrier] - The from_carrier\n   * @param {string} [opts.toCarrier] - The to_carrier\n   * @param {string} [opts.fromCountryCode] - The from_country_code\n   * @param {string} [opts.toCountryCode] - The to_country_code\n   * @param {boolean} [opts.branded] - The branded\n   * @param {boolean} [opts.verifiedCaller] - The verified_caller\n   * @param {boolean} [opts.hasTag] - The has_tag\n   * @param {string} [opts.startTime] - The start_time\n   * @param {string} [opts.endTime] - The end_time\n   * @param {string} [opts.callType] - The call_type\n   * @param {string} [opts.callState] - The call_state\n   * @param {string} [opts.direction] - The direction\n   * @param {call_summaries.processing_state_request} [opts.processingState] -\n   *          The processing_state\n   * @param {call_summaries.sort_by} [opts.sortBy] - The sort_by\n   * @param {string} [opts.subaccount] - The subaccount\n   * @param {boolean} [opts.abnormalSession] - The abnormal_session\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CallSummariesListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CallSummariesInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Insights.V1.CallSummariesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.from] - The from\n   * @param {string} [opts.to] - The to\n   * @param {string} [opts.fromCarrier] - The from_carrier\n   * @param {string} [opts.toCarrier] - The to_carrier\n   * @param {string} [opts.fromCountryCode] - The from_country_code\n   * @param {string} [opts.toCountryCode] - The to_country_code\n   * @param {boolean} [opts.branded] - The branded\n   * @param {boolean} [opts.verifiedCaller] - The verified_caller\n   * @param {boolean} [opts.hasTag] - The has_tag\n   * @param {string} [opts.startTime] - The start_time\n   * @param {string} [opts.endTime] - The end_time\n   * @param {string} [opts.callType] - The call_type\n   * @param {string} [opts.callState] - The call_state\n   * @param {string} [opts.direction] - The direction\n   * @param {call_summaries.processing_state_request} [opts.processingState] -\n   *          The processing_state\n   * @param {call_summaries.sort_by} [opts.sortBy] - The sort_by\n   * @param {string} [opts.subaccount] - The subaccount\n   * @param {boolean} [opts.abnormalSession] - The abnormal_session\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CallSummariesListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'From': _.get(opts, 'from'),\n      'To': _.get(opts, 'to'),\n      'FromCarrier': _.get(opts, 'fromCarrier'),\n      'ToCarrier': _.get(opts, 'toCarrier'),\n      'FromCountryCode': _.get(opts, 'fromCountryCode'),\n      'ToCountryCode': _.get(opts, 'toCountryCode'),\n      'Branded': serialize.bool(_.get(opts, 'branded')),\n      'VerifiedCaller': serialize.bool(_.get(opts, 'verifiedCaller')),\n      'HasTag': serialize.bool(_.get(opts, 'hasTag')),\n      'StartTime': _.get(opts, 'startTime'),\n      'EndTime': _.get(opts, 'endTime'),\n      'CallType': _.get(opts, 'callType'),\n      'CallState': _.get(opts, 'callState'),\n      'Direction': _.get(opts, 'direction'),\n      'ProcessingState': _.get(opts, 'processingState'),\n      'SortBy': _.get(opts, 'sortBy'),\n      'Subaccount': _.get(opts, 'subaccount'),\n      'AbnormalSession': serialize.bool(_.get(opts, 'abnormalSession')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CallSummariesPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CallSummariesInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Insights.V1.CallSummariesList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CallSummariesListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CallSummariesPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.CallSummariesList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CallSummariesListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CallSummariesListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CallSummariesListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallSummariesPage\n *\n * @constructor Twilio.Insights.V1.CallSummariesPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CallSummariesSolution} solution - Path solution\n *\n * @returns CallSummariesPage\n */\n/* jshint ignore:end */\nCallSummariesPage = function CallSummariesPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CallSummariesPage.prototype, Page.prototype);\nCallSummariesPage.prototype.constructor = CallSummariesPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CallSummariesInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.CallSummariesPage#\n *\n * @param {CallSummariesPayload} payload - Payload response from the API\n *\n * @returns CallSummariesInstance\n */\n/* jshint ignore:end */\nCallSummariesPage.prototype.getInstance = function getInstance(payload) {\n  return new CallSummariesInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallSummariesPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallSummariesPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCallSummariesPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CallSummariesContext\n *\n * @constructor Twilio.Insights.V1.CallSummariesInstance\n *\n * @property {string} accountSid - The account_sid\n * @property {string} callSid - The call_sid\n * @property {call_summaries.call_type} callType - The call_type\n * @property {call_summaries.call_state} callState - The call_state\n * @property {call_summaries.processing_state} processingState -\n *          The processing_state\n * @property {Date} createdTime - The created_time\n * @property {Date} startTime - The start_time\n * @property {Date} endTime - The end_time\n * @property {number} duration - The duration\n * @property {number} connectDuration - The connect_duration\n * @property {object} from - The from\n * @property {object} to - The to\n * @property {object} carrierEdge - The carrier_edge\n * @property {object} clientEdge - The client_edge\n * @property {object} sdkEdge - The sdk_edge\n * @property {object} sipEdge - The sip_edge\n * @property {string} tags - The tags\n * @property {string} url - The url\n * @property {object} attributes - The attributes\n * @property {object} properties - The properties\n * @property {object} trust - The trust\n *\n * @param {V1} version - Version of the resource\n * @param {CallSummariesPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nCallSummariesInstance = function CallSummariesInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.callType = payload.call_type; // jshint ignore:line\n  this.callState = payload.call_state; // jshint ignore:line\n  this.processingState = payload.processing_state; // jshint ignore:line\n  this.createdTime = deserialize.iso8601DateTime(payload.created_time); // jshint ignore:line\n  this.startTime = deserialize.iso8601DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.duration = deserialize.integer(payload.duration); // jshint ignore:line\n  this.connectDuration = deserialize.integer(payload.connect_duration); // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.carrierEdge = payload.carrier_edge; // jshint ignore:line\n  this.clientEdge = payload.client_edge; // jshint ignore:line\n  this.sdkEdge = payload.sdk_edge; // jshint ignore:line\n  this.sipEdge = payload.sip_edge; // jshint ignore:line\n  this.tags = payload.tags; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.properties = payload.properties; // jshint ignore:line\n  this.trust = payload.trust; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.CallSummariesInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCallSummariesInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCallSummariesInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CallSummariesList: CallSummariesList,\n  CallSummariesPage: CallSummariesPage,\n  CallSummariesInstance: CallSummariesInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ConferenceParticipantList;\nvar ConferenceParticipantPage;\nvar ConferenceParticipantInstance;\nvar ConferenceParticipantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceParticipantList\n *\n * @constructor Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n * @param {string} conferenceSid - Conference SID.\n */\n/* jshint ignore:end */\nConferenceParticipantList = function ConferenceParticipantList(version,\n    conferenceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function conferenceParticipants\n   * @memberof Twilio.Insights.V1.ConferenceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext}\n   */\n  /* jshint ignore:end */\n  function ConferenceParticipantListInstance(sid) {\n    return ConferenceParticipantListInstance.get(sid);\n  }\n\n  ConferenceParticipantListInstance._version = version;\n  // Path Solution\n  ConferenceParticipantListInstance._solution = {conferenceSid: conferenceSid};\n  ConferenceParticipantListInstance._uri = `/Conferences/${conferenceSid}/Participants`;\n  /* jshint ignore:start */\n  /**\n   * Streams ConferenceParticipantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.participantSid] - Participant SID.\n   * @param {string} [opts.label] - User-specified label for a participant.\n   * @param {string} [opts.events] -\n   *          Conference events generated by application or participant activity.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ConferenceParticipantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ConferenceParticipantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.participantSid] - Participant SID.\n   * @param {string} [opts.label] - User-specified label for a participant.\n   * @param {string} [opts.events] -\n   *          Conference events generated by application or participant activity.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConferenceParticipantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ConferenceParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.participantSid] - Participant SID.\n   * @param {string} [opts.label] - User-specified label for a participant.\n   * @param {string} [opts.events] -\n   *          Conference events generated by application or participant activity.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConferenceParticipantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ParticipantSid': _.get(opts, 'participantSid'),\n      'Label': _.get(opts, 'label'),\n      'Events': _.get(opts, 'events'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConferenceParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ConferenceParticipantInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConferenceParticipantListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConferenceParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a conference_participant\n   *\n   * @function get\n   * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#\n   *\n   * @param {string} participantSid - Participant SID.\n   *\n   * @returns {Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext}\n   */\n  /* jshint ignore:end */\n  ConferenceParticipantListInstance.get = function get(participantSid) {\n    return new ConferenceParticipantContext(\n      this._version,\n      this._solution.conferenceSid,\n      participantSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConferenceParticipantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConferenceParticipantListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConferenceParticipantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceParticipantPage\n *\n * @constructor Twilio.Insights.V1.ConferenceContext.ConferenceParticipantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConferenceParticipantSolution} solution - Path solution\n *\n * @returns ConferenceParticipantPage\n */\n/* jshint ignore:end */\nConferenceParticipantPage = function ConferenceParticipantPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConferenceParticipantPage.prototype, Page.prototype);\nConferenceParticipantPage.prototype.constructor = ConferenceParticipantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConferenceParticipantInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantPage#\n *\n * @param {ConferenceParticipantPayload} payload - Payload response from the API\n *\n * @returns ConferenceParticipantInstance\n */\n/* jshint ignore:end */\nConferenceParticipantPage.prototype.getInstance = function getInstance(payload)\n    {\n  return new ConferenceParticipantInstance(this._version, payload, this._solution.conferenceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConferenceParticipantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConferenceParticipantPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceParticipantContext\n *\n * @constructor Twilio.Insights.V1.ConferenceContext.ConferenceParticipantInstance\n *\n * @property {string} participantSid - SID for this participant.\n * @property {string} label - The user-specified label of this participant.\n * @property {string} conferenceSid - Conference SID.\n * @property {string} callSid - Unique SID identifier of the call.\n * @property {string} accountSid - Account SID.\n * @property {conference_participant.call_direction} callDirection -\n *          Call direction of the participant.\n * @property {string} from - Caller ID of the calling party.\n * @property {string} to - Called party.\n * @property {conference_participant.call_status} callStatus -\n *          Call status of the call that generated the participant.\n * @property {string} countryCode - ISO alpha-2 country code of the participant.\n * @property {boolean} isModerator -\n *          Boolean. Indicates whether participant had startConferenceOnEnter=true or endConferenceOnExit=true.\n * @property {Date} joinTime - ISO 8601 timestamp of participant join event.\n * @property {Date} leaveTime - ISO 8601 timestamp of participant leave event.\n * @property {number} durationSeconds - Participant durations in seconds.\n * @property {number} outboundQueueLength -\n *          Estimated time in queue at call creation.\n * @property {number} outboundTimeInQueue - Actual time in queue (seconds).\n * @property {conference_participant.jitter_buffer_size} jitterBufferSize -\n *          The Jitter Buffer Size of this Conference Participant.\n * @property {boolean} isCoach -\n *          Boolean. Indicated whether participant was a coach.\n * @property {string} coachedParticipants - Call SIDs coached by this participant.\n * @property {conference_participant.region} participantRegion -\n *          Twilio region where the participant media originates.\n * @property {conference_participant.region} conferenceRegion -\n *          The Conference Region of this Conference Participant.\n * @property {conference_participant.call_type} callType -\n *          The Call Type of this Conference Participant.\n * @property {conference_participant.processing_state} processingState -\n *          Processing state of the Participant Summary.\n * @property {object} properties - Participant properties and metadata.\n * @property {object} events -\n *          Object containing information of actions taken by participants. Nested resource URLs.\n * @property {object} metrics - Object. Contains participant quality metrics.\n * @property {string} url - The URL of this resource.\n *\n * @param {V1} version - Version of the resource\n * @param {ConferenceParticipantPayload} payload - The instance payload\n * @param {sid} conferenceSid - Conference SID.\n * @param {sid} participantSid - Participant SID.\n */\n/* jshint ignore:end */\nConferenceParticipantInstance = function ConferenceParticipantInstance(version,\n    payload, conferenceSid, participantSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.label = payload.label; // jshint ignore:line\n  this.conferenceSid = payload.conference_sid; // jshint ignore:line\n  this.callSid = payload.call_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.callDirection = payload.call_direction; // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.callStatus = payload.call_status; // jshint ignore:line\n  this.countryCode = payload.country_code; // jshint ignore:line\n  this.isModerator = payload.is_moderator; // jshint ignore:line\n  this.joinTime = deserialize.iso8601DateTime(payload.join_time); // jshint ignore:line\n  this.leaveTime = deserialize.iso8601DateTime(payload.leave_time); // jshint ignore:line\n  this.durationSeconds = deserialize.integer(payload.duration_seconds); // jshint ignore:line\n  this.outboundQueueLength = deserialize.integer(payload.outbound_queue_length); // jshint ignore:line\n  this.outboundTimeInQueue = deserialize.integer(payload.outbound_time_in_queue); // jshint ignore:line\n  this.jitterBufferSize = payload.jitter_buffer_size; // jshint ignore:line\n  this.isCoach = payload.is_coach; // jshint ignore:line\n  this.coachedParticipants = payload.coached_participants; // jshint ignore:line\n  this.participantRegion = payload.participant_region; // jshint ignore:line\n  this.conferenceRegion = payload.conference_region; // jshint ignore:line\n  this.callType = payload.call_type; // jshint ignore:line\n  this.processingState = payload.processing_state; // jshint ignore:line\n  this.properties = payload.properties; // jshint ignore:line\n  this.events = payload.events; // jshint ignore:line\n  this.metrics = payload.metrics; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    conferenceSid: conferenceSid,\n    participantSid: participantSid || this.participantSid,\n  };\n};\n\nObject.defineProperty(ConferenceParticipantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConferenceParticipantContext(\n          this._version,\n          this._solution.conferenceSid,\n          this._solution.participantSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ConferenceParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.events] -\n *          Conference events generated by application or participant activity.\n * @param {string} [opts.metrics] - Object. Contains call quality metrics.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConferenceParticipantInstance\n */\n/* jshint ignore:end */\nConferenceParticipantInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConferenceParticipantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConferenceParticipantInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceParticipantContext\n *\n * @constructor Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} conferenceSid - Conference SID.\n * @param {sid} participantSid - Participant SID.\n */\n/* jshint ignore:end */\nConferenceParticipantContext = function ConferenceParticipantContext(version,\n    conferenceSid, participantSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {conferenceSid: conferenceSid, participantSid: participantSid, };\n  this._uri = `/Conferences/${conferenceSid}/Participants/${participantSid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConferenceParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.events] -\n *          Conference events generated by application or participant activity.\n * @param {string} [opts.metrics] - Object. Contains call quality metrics.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConferenceParticipantInstance\n */\n/* jshint ignore:end */\nConferenceParticipantContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Events': _.get(opts, 'events'), 'Metrics': _.get(opts, 'metrics')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConferenceParticipantInstance(\n      this._version,\n      payload,\n      this._solution.conferenceSid,\n      this._solution.participantSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.ConferenceContext.ConferenceParticipantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConferenceParticipantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConferenceParticipantContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConferenceParticipantList: ConferenceParticipantList,\n  ConferenceParticipantPage: ConferenceParticipantPage,\n  ConferenceParticipantInstance: ConferenceParticipantInstance,\n  ConferenceParticipantContext: ConferenceParticipantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ConferenceParticipantList = require(\n    './conference/conferenceParticipant').ConferenceParticipantList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ConferenceList;\nvar ConferencePage;\nvar ConferenceInstance;\nvar ConferenceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceList\n *\n * @constructor Twilio.Insights.V1.ConferenceList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nConferenceList = function ConferenceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function conferences\n   * @memberof Twilio.Insights.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.ConferenceContext}\n   */\n  /* jshint ignore:end */\n  function ConferenceListInstance(sid) {\n    return ConferenceListInstance.get(sid);\n  }\n\n  ConferenceListInstance._version = version;\n  // Path Solution\n  ConferenceListInstance._solution = {};\n  ConferenceListInstance._uri = `/Conferences`;\n  /* jshint ignore:start */\n  /**\n   * Streams ConferenceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Insights.V1.ConferenceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.conferenceSid] - The SID of the conference.\n   * @param {string} [opts.friendlyName] - Custom label for the conference.\n   * @param {string} [opts.status] - Conference status.\n   * @param {string} [opts.createdAfter] - Conferences created after timestamp.\n   * @param {string} [opts.createdBefore] - Conferences created before timestamp.\n   * @param {string} [opts.mixerRegion] - Region where the conference was mixed.\n   * @param {string} [opts.tags] - Tags applied by Twilio for common issues.\n   * @param {string} [opts.subaccount] - Account SID for the subaccount.\n   * @param {string} [opts.detectedIssues] -\n   *          Potential issues detected during the conference.\n   * @param {string} [opts.endReason] - Conference end reason.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ConferenceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Insights.V1.ConferenceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.conferenceSid] - The SID of the conference.\n   * @param {string} [opts.friendlyName] - Custom label for the conference.\n   * @param {string} [opts.status] - Conference status.\n   * @param {string} [opts.createdAfter] - Conferences created after timestamp.\n   * @param {string} [opts.createdBefore] - Conferences created before timestamp.\n   * @param {string} [opts.mixerRegion] - Region where the conference was mixed.\n   * @param {string} [opts.tags] - Tags applied by Twilio for common issues.\n   * @param {string} [opts.subaccount] - Account SID for the subaccount.\n   * @param {string} [opts.detectedIssues] -\n   *          Potential issues detected during the conference.\n   * @param {string} [opts.endReason] - Conference end reason.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ConferenceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Insights.V1.ConferenceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.conferenceSid] - The SID of the conference.\n   * @param {string} [opts.friendlyName] - Custom label for the conference.\n   * @param {string} [opts.status] - Conference status.\n   * @param {string} [opts.createdAfter] - Conferences created after timestamp.\n   * @param {string} [opts.createdBefore] - Conferences created before timestamp.\n   * @param {string} [opts.mixerRegion] - Region where the conference was mixed.\n   * @param {string} [opts.tags] - Tags applied by Twilio for common issues.\n   * @param {string} [opts.subaccount] - Account SID for the subaccount.\n   * @param {string} [opts.detectedIssues] -\n   *          Potential issues detected during the conference.\n   * @param {string} [opts.endReason] - Conference end reason.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ConferenceSid': _.get(opts, 'conferenceSid'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Status': _.get(opts, 'status'),\n      'CreatedAfter': _.get(opts, 'createdAfter'),\n      'CreatedBefore': _.get(opts, 'createdBefore'),\n      'MixerRegion': _.get(opts, 'mixerRegion'),\n      'Tags': _.get(opts, 'tags'),\n      'Subaccount': _.get(opts, 'subaccount'),\n      'DetectedIssues': _.get(opts, 'detectedIssues'),\n      'EndReason': _.get(opts, 'endReason'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConferencePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ConferenceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Insights.V1.ConferenceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConferencePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a conference\n   *\n   * @function get\n   * @memberof Twilio.Insights.V1.ConferenceList#\n   *\n   * @param {string} conferenceSid - Conference SID.\n   *\n   * @returns {Twilio.Insights.V1.ConferenceContext}\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.get = function get(conferenceSid) {\n    return new ConferenceContext(this._version, conferenceSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.ConferenceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConferenceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConferenceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConferenceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferencePage\n *\n * @constructor Twilio.Insights.V1.ConferencePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConferenceSolution} solution - Path solution\n *\n * @returns ConferencePage\n */\n/* jshint ignore:end */\nConferencePage = function ConferencePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConferencePage.prototype, Page.prototype);\nConferencePage.prototype.constructor = ConferencePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConferenceInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.ConferencePage#\n *\n * @param {ConferencePayload} payload - Payload response from the API\n *\n * @returns ConferenceInstance\n */\n/* jshint ignore:end */\nConferencePage.prototype.getInstance = function getInstance(payload) {\n  return new ConferenceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.ConferencePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConferencePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConferencePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceContext\n *\n * @constructor Twilio.Insights.V1.ConferenceInstance\n *\n * @property {string} conferenceSid - Conference SID.\n * @property {string} accountSid - Account SID.\n * @property {string} friendlyName - Custom label for the conference.\n * @property {Date} createTime - Conference creation date/time.\n * @property {Date} startTime -\n *          Timestamp in ISO 8601 format when the conference started.\n * @property {Date} endTime - Conference end date/time.\n * @property {number} durationSeconds - Conference duration in seconds.\n * @property {number} connectDurationSeconds -\n *          Duration of the conference in seconds.\n * @property {conference.conference_status} status - Status of conference\n * @property {number} maxParticipants - Max participants specified in config.\n * @property {number} maxConcurrentParticipants -\n *          Actual maximum concurrent participants.\n * @property {number} uniqueParticipants - Unique conference participants.\n * @property {conference.conference_end_reason} endReason - Conference end reason.\n * @property {string} endedBy - Call SID that ended the conference.\n * @property {conference.region} mixerRegion -\n *          Region where the conference was mixed.\n * @property {conference.region} mixerRegionRequested -\n *          Configuration-requested conference mixer region.\n * @property {boolean} recordingEnabled -\n *          Boolean. Indicates whether recording was enabled.\n * @property {object} detectedIssues -\n *          Potential issues detected during the conference.\n * @property {conference.tag} tags -\n *          Tags for detected conference conditions and participant behaviors.\n * @property {object} tagInfo - Object. Contains details about conference tags.\n * @property {conference.processing_state} processingState -\n *          Processing state for the Conference Summary resource.\n * @property {string} url - The URL of this resource.\n * @property {string} links - Nested resource URLs.\n *\n * @param {V1} version - Version of the resource\n * @param {ConferencePayload} payload - The instance payload\n * @param {sid} conferenceSid - Conference SID.\n */\n/* jshint ignore:end */\nConferenceInstance = function ConferenceInstance(version, payload,\n                                                  conferenceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.conferenceSid = payload.conference_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.createTime = deserialize.iso8601DateTime(payload.create_time); // jshint ignore:line\n  this.startTime = deserialize.iso8601DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.durationSeconds = deserialize.integer(payload.duration_seconds); // jshint ignore:line\n  this.connectDurationSeconds = deserialize.integer(payload.connect_duration_seconds); // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.maxParticipants = deserialize.integer(payload.max_participants); // jshint ignore:line\n  this.maxConcurrentParticipants = deserialize.integer(payload.max_concurrent_participants); // jshint ignore:line\n  this.uniqueParticipants = deserialize.integer(payload.unique_participants); // jshint ignore:line\n  this.endReason = payload.end_reason; // jshint ignore:line\n  this.endedBy = payload.ended_by; // jshint ignore:line\n  this.mixerRegion = payload.mixer_region; // jshint ignore:line\n  this.mixerRegionRequested = payload.mixer_region_requested; // jshint ignore:line\n  this.recordingEnabled = payload.recording_enabled; // jshint ignore:line\n  this.detectedIssues = payload.detected_issues; // jshint ignore:line\n  this.tags = payload.tags; // jshint ignore:line\n  this.tagInfo = payload.tag_info; // jshint ignore:line\n  this.processingState = payload.processing_state; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {conferenceSid: conferenceSid || this.conferenceSid, };\n};\n\nObject.defineProperty(ConferenceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConferenceContext(this._version, this._solution.conferenceSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ConferenceInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.ConferenceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConferenceInstance\n */\n/* jshint ignore:end */\nConferenceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the conferenceParticipants\n *\n * @function conferenceParticipants\n * @memberof Twilio.Insights.V1.ConferenceInstance#\n *\n * @returns {Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList}\n */\n/* jshint ignore:end */\nConferenceInstance.prototype.conferenceParticipants = function\n    conferenceParticipants() {\n  return this._proxy.conferenceParticipants;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.ConferenceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConferenceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConferenceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConferenceContext\n *\n * @constructor Twilio.Insights.V1.ConferenceContext\n *\n * @property {Twilio.Insights.V1.ConferenceContext.ConferenceParticipantList} conferenceParticipants -\n *          conferenceParticipants resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} conferenceSid - Conference SID.\n */\n/* jshint ignore:end */\nConferenceContext = function ConferenceContext(version, conferenceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {conferenceSid: conferenceSid, };\n  this._uri = `/Conferences/${conferenceSid}`;\n\n  // Dependents\n  this._conferenceParticipants = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConferenceInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.ConferenceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConferenceInstance\n */\n/* jshint ignore:end */\nConferenceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConferenceInstance(this._version, payload, this._solution.conferenceSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ConferenceContext.prototype,\n  'conferenceParticipants', {\n    get: function() {\n      if (!this._conferenceParticipants) {\n        this._conferenceParticipants = new ConferenceParticipantList(\n          this._version,\n          this._solution.conferenceSid\n        );\n      }\n      return this._conferenceParticipants;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.ConferenceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConferenceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConferenceContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConferenceList: ConferenceList,\n  ConferencePage: ConferencePage,\n  ConferenceInstance: ConferenceInstance,\n  ConferenceContext: ConferenceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ParticipantList;\nvar ParticipantPage;\nvar ParticipantInstance;\nvar ParticipantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Insights.V1.RoomContext.ParticipantList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n * @param {string} roomSid - Unique identifier for the room.\n */\n/* jshint ignore:end */\nParticipantList = function ParticipantList(version, roomSid) {\n  /* jshint ignore:start */\n  /**\n   * @function participants\n   * @memberof Twilio.Insights.V1.RoomContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.RoomContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  function ParticipantListInstance(sid) {\n    return ParticipantListInstance.get(sid);\n  }\n\n  ParticipantListInstance._version = version;\n  // Path Solution\n  ParticipantListInstance._solution = {roomSid: roomSid};\n  ParticipantListInstance._uri = `/Video/Rooms/${roomSid}/Participants`;\n  /* jshint ignore:start */\n  /**\n   * Streams ParticipantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Insights.V1.RoomContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ParticipantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Insights.V1.RoomContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Insights.V1.RoomContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Insights.V1.RoomContext.ParticipantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a participant\n   *\n   * @function get\n   * @memberof Twilio.Insights.V1.RoomContext.ParticipantList#\n   *\n   * @param {string} participantSid - The SID of the Participant resource.\n   *\n   * @returns {Twilio.Insights.V1.RoomContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.get = function get(participantSid) {\n    return new ParticipantContext(this._version, this._solution.roomSid, participantSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.RoomContext.ParticipantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ParticipantListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ParticipantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Insights.V1.RoomContext.ParticipantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ParticipantSolution} solution - Path solution\n *\n * @returns ParticipantPage\n */\n/* jshint ignore:end */\nParticipantPage = function ParticipantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ParticipantPage.prototype, Page.prototype);\nParticipantPage.prototype.constructor = ParticipantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ParticipantInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.RoomContext.ParticipantPage#\n *\n * @param {ParticipantPayload} payload - Payload response from the API\n *\n * @returns ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantPage.prototype.getInstance = function getInstance(payload) {\n  return new ParticipantInstance(this._version, payload, this._solution.roomSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.RoomContext.ParticipantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Insights.V1.RoomContext.ParticipantInstance\n *\n * @property {string} participantSid - Unique identifier for the participant.\n * @property {string} participantIdentity -\n *          The application-defined string that uniquely identifies the participant within a Room.\n * @property {Date} joinTime - When the participant joined the room.\n * @property {Date} leaveTime - When the participant left the room\n * @property {number} durationSec -\n *          Amount of time in seconds the participant was in the room.\n * @property {string} accountSid - Account SID associated with the room.\n * @property {string} roomSid - Unique identifier for the room.\n * @property {participant.room_status} status - Status of the room.\n * @property {participant.codec} codecs - Codecs detected from the participant.\n * @property {string} endReason - Reason the participant left the room.\n * @property {number} errorCode - Errors encountered by the participant.\n * @property {string} errorCodeUrl - Twilio error code dictionary link.\n * @property {participant.twilio_realm} mediaRegion -\n *          Twilio media region the participant connected to.\n * @property {object} properties -\n *          Object containing information about the participant's data from the room.\n * @property {participant.edge_location} edgeLocation -\n *          Name of the edge location the participant connected to.\n * @property {object} publisherInfo -\n *          Object containing information about the SDK name and version.\n * @property {string} url - URL of the participant resource.\n *\n * @param {V1} version - Version of the resource\n * @param {ParticipantPayload} payload - The instance payload\n * @param {sid} roomSid - Unique identifier for the room.\n * @param {sid_like} participantSid - The SID of the Participant resource.\n */\n/* jshint ignore:end */\nParticipantInstance = function ParticipantInstance(version, payload, roomSid,\n                                                    participantSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.participantIdentity = payload.participant_identity; // jshint ignore:line\n  this.joinTime = deserialize.iso8601DateTime(payload.join_time); // jshint ignore:line\n  this.leaveTime = deserialize.iso8601DateTime(payload.leave_time); // jshint ignore:line\n  this.durationSec = deserialize.integer(payload.duration_sec); // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.roomSid = payload.room_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.codecs = payload.codecs; // jshint ignore:line\n  this.endReason = payload.end_reason; // jshint ignore:line\n  this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line\n  this.errorCodeUrl = payload.error_code_url; // jshint ignore:line\n  this.mediaRegion = payload.media_region; // jshint ignore:line\n  this.properties = payload.properties; // jshint ignore:line\n  this.edgeLocation = payload.edge_location; // jshint ignore:line\n  this.publisherInfo = payload.publisher_info; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {roomSid: roomSid, participantSid: participantSid || this.participantSid, };\n};\n\nObject.defineProperty(ParticipantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ParticipantContext(\n          this._version,\n          this._solution.roomSid,\n          this._solution.participantSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.RoomContext.ParticipantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.RoomContext.ParticipantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Insights.V1.RoomContext.ParticipantContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} roomSid - The SID of the Room resource.\n * @param {sid_like} participantSid - The SID of the Participant resource.\n */\n/* jshint ignore:end */\nParticipantContext = function ParticipantContext(version, roomSid,\n                                                  participantSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {roomSid: roomSid, participantSid: participantSid, };\n  this._uri = `/Video/Rooms/${roomSid}/Participants/${participantSid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.RoomContext.ParticipantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.roomSid,\n      this._solution.participantSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.RoomContext.ParticipantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nParticipantContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ParticipantList: ParticipantList,\n  ParticipantPage: ParticipantPage,\n  ParticipantInstance: ParticipantInstance,\n  ParticipantContext: ParticipantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar ParticipantList = require('./room/participant').ParticipantList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar RoomList;\nvar RoomPage;\nvar RoomInstance;\nvar RoomContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Insights.V1.RoomList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nRoomList = function RoomList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function rooms\n   * @memberof Twilio.Insights.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.RoomContext}\n   */\n  /* jshint ignore:end */\n  function RoomListInstance(sid) {\n    return RoomListInstance.get(sid);\n  }\n\n  RoomListInstance._version = version;\n  // Path Solution\n  RoomListInstance._solution = {};\n  RoomListInstance._uri = `/Video/Rooms`;\n  /* jshint ignore:start */\n  /**\n   * Streams RoomInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Insights.V1.RoomList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {room.room_type|list} [opts.roomType] - Type of room.\n   * @param {room.codec|list} [opts.codec] - Codecs used by participants in the room.\n   * @param {string} [opts.roomName] - Room friendly name.\n   * @param {Date} [opts.createdAfter] -\n   *          Only read rooms that started on or after this ISO 8601 timestamp.\n   * @param {Date} [opts.createdBefore] -\n   *          Only read rooms that started before this ISO 8601 timestamp.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RoomListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RoomInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Insights.V1.RoomList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {room.room_type|list} [opts.roomType] - Type of room.\n   * @param {room.codec|list} [opts.codec] - Codecs used by participants in the room.\n   * @param {string} [opts.roomName] - Room friendly name.\n   * @param {Date} [opts.createdAfter] -\n   *          Only read rooms that started on or after this ISO 8601 timestamp.\n   * @param {Date} [opts.createdBefore] -\n   *          Only read rooms that started before this ISO 8601 timestamp.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoomListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RoomInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Insights.V1.RoomList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {room.room_type|list} [opts.roomType] - Type of room.\n   * @param {room.codec|list} [opts.codec] - Codecs used by participants in the room.\n   * @param {string} [opts.roomName] - Room friendly name.\n   * @param {Date} [opts.createdAfter] -\n   *          Only read rooms that started on or after this ISO 8601 timestamp.\n   * @param {Date} [opts.createdBefore] -\n   *          Only read rooms that started before this ISO 8601 timestamp.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoomListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'RoomType': serialize.map(_.get(opts, 'roomType'), function(e) { return e; }),\n      'Codec': serialize.map(_.get(opts, 'codec'), function(e) { return e; }),\n      'RoomName': _.get(opts, 'roomName'),\n      'CreatedAfter': serialize.iso8601DateTime(_.get(opts, 'createdAfter')),\n      'CreatedBefore': serialize.iso8601DateTime(_.get(opts, 'createdBefore')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoomPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RoomInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Insights.V1.RoomList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoomListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoomPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a room\n   *\n   * @function get\n   * @memberof Twilio.Insights.V1.RoomList#\n   *\n   * @param {string} roomSid - The SID of the Room resource.\n   *\n   * @returns {Twilio.Insights.V1.RoomContext}\n   */\n  /* jshint ignore:end */\n  RoomListInstance.get = function get(roomSid) {\n    return new RoomContext(this._version, roomSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.RoomList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RoomListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RoomListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RoomListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Insights.V1.RoomPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RoomSolution} solution - Path solution\n *\n * @returns RoomPage\n */\n/* jshint ignore:end */\nRoomPage = function RoomPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RoomPage.prototype, Page.prototype);\nRoomPage.prototype.constructor = RoomPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RoomInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.RoomPage#\n *\n * @param {RoomPayload} payload - Payload response from the API\n *\n * @returns RoomInstance\n */\n/* jshint ignore:end */\nRoomPage.prototype.getInstance = function getInstance(payload) {\n  return new RoomInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.RoomPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoomPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Insights.V1.RoomInstance\n *\n * @property {string} accountSid - Account SID associated with this room.\n * @property {string} roomSid - Unique identifier for the room.\n * @property {string} roomName - room friendly name.\n * @property {Date} createTime - Creation time of the room.\n * @property {Date} endTime - End time for the room.\n * @property {room.room_type} roomType - Type of room.\n * @property {room.room_status} roomStatus - Status of the room.\n * @property {string} statusCallback - Webhook provided for status callbacks.\n * @property {string} statusCallbackMethod -\n *          HTTP method provided for status callback URL.\n * @property {room.created_method} createdMethod - How the room was created.\n * @property {room.end_reason} endReason - Reason the room ended.\n * @property {number} maxParticipants -\n *          Max number of total participants allowed by the application settings.\n * @property {number} uniqueParticipants -\n *          Number of participants. May include duplicate identities for participants who left and rejoined.\n * @property {number} uniqueParticipantIdentities -\n *          Unique number of participant identities.\n * @property {number} concurrentParticipants -\n *          Actual number of concurrent participants.\n * @property {number} maxConcurrentParticipants -\n *          Maximum number of participants allowed in the room at the same time allowed by the application settings.\n * @property {room.codec} codecs - Codecs used by participants in the room.\n * @property {room.twilio_realm} mediaRegion -\n *          Region of Twilio media servers for the room.\n * @property {number} durationSec -\n *          Total room duration from create time to end time.\n * @property {number} totalParticipantDurationSec -\n *          Combined amount of participant time in the room.\n * @property {number} totalRecordingDurationSec -\n *          Combined amount of recorded seconds for participants in the room.\n * @property {room.processing_state} processingState -\n *          Video Log Analyzer resource state. Will be either `in-progress` or `complete`.\n * @property {boolean} recordingEnabled -\n *          Boolean indicating if recording is enabled for the room.\n * @property {room.edge_location} edgeLocation -\n *          Edge location of Twilio media servers for the room.\n * @property {string} url - URL for the room resource.\n * @property {string} links - Room subresources.\n *\n * @param {V1} version - Version of the resource\n * @param {RoomPayload} payload - The instance payload\n * @param {sid_like} roomSid - The SID of the Room resource.\n */\n/* jshint ignore:end */\nRoomInstance = function RoomInstance(version, payload, roomSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.roomSid = payload.room_sid; // jshint ignore:line\n  this.roomName = payload.room_name; // jshint ignore:line\n  this.createTime = deserialize.iso8601DateTime(payload.create_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.roomType = payload.room_type; // jshint ignore:line\n  this.roomStatus = payload.room_status; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.createdMethod = payload.created_method; // jshint ignore:line\n  this.endReason = payload.end_reason; // jshint ignore:line\n  this.maxParticipants = deserialize.integer(payload.max_participants); // jshint ignore:line\n  this.uniqueParticipants = deserialize.integer(payload.unique_participants); // jshint ignore:line\n  this.uniqueParticipantIdentities = deserialize.integer(payload.unique_participant_identities); // jshint ignore:line\n  this.concurrentParticipants = deserialize.integer(payload.concurrent_participants); // jshint ignore:line\n  this.maxConcurrentParticipants = deserialize.integer(payload.max_concurrent_participants); // jshint ignore:line\n  this.codecs = payload.codecs; // jshint ignore:line\n  this.mediaRegion = payload.media_region; // jshint ignore:line\n  this.durationSec = deserialize.integer(payload.duration_sec); // jshint ignore:line\n  this.totalParticipantDurationSec = deserialize.integer(payload.total_participant_duration_sec); // jshint ignore:line\n  this.totalRecordingDurationSec = deserialize.integer(payload.total_recording_duration_sec); // jshint ignore:line\n  this.processingState = payload.processing_state; // jshint ignore:line\n  this.recordingEnabled = payload.recording_enabled; // jshint ignore:line\n  this.edgeLocation = payload.edge_location; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {roomSid: roomSid || this.roomSid, };\n};\n\nObject.defineProperty(RoomInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RoomContext(this._version, this._solution.roomSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RoomInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.RoomInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomInstance\n */\n/* jshint ignore:end */\nRoomInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the participants\n *\n * @function participants\n * @memberof Twilio.Insights.V1.RoomInstance#\n *\n * @returns {Twilio.Insights.V1.RoomContext.ParticipantList}\n */\n/* jshint ignore:end */\nRoomInstance.prototype.participants = function participants() {\n  return this._proxy.participants;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.RoomInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoomInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoomInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Insights.V1.RoomContext\n *\n * @property {Twilio.Insights.V1.RoomContext.ParticipantList} participants -\n *          participants resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} roomSid - The SID of the Room resource.\n */\n/* jshint ignore:end */\nRoomContext = function RoomContext(version, roomSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {roomSid: roomSid, };\n  this._uri = `/Video/Rooms/${roomSid}`;\n\n  // Dependents\n  this._participants = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoomInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.RoomContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomInstance\n */\n/* jshint ignore:end */\nRoomContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoomInstance(this._version, payload, this._solution.roomSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(RoomContext.prototype,\n  'participants', {\n    get: function() {\n      if (!this._participants) {\n        this._participants = new ParticipantList(this._version, this._solution.roomSid);\n      }\n      return this._participants;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.RoomContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoomContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRoomContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RoomList: RoomList,\n  RoomPage: RoomPage,\n  RoomInstance: RoomInstance,\n  RoomContext: RoomContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SettingList;\nvar SettingPage;\nvar SettingInstance;\nvar SettingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SettingList\n *\n * @constructor Twilio.Insights.V1.SettingList\n *\n * @param {Twilio.Insights.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSettingList = function SettingList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function settings\n   * @memberof Twilio.Insights.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Insights.V1.SettingContext}\n   */\n  /* jshint ignore:end */\n  function SettingListInstance(sid) {\n    return SettingListInstance.get(sid);\n  }\n\n  SettingListInstance._version = version;\n  // Path Solution\n  SettingListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a setting\n   *\n   * @function get\n   * @memberof Twilio.Insights.V1.SettingList#\n   *\n   * @returns {Twilio.Insights.V1.SettingContext}\n   */\n  /* jshint ignore:end */\n  SettingListInstance.get = function get() {\n    return new SettingContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Insights.V1.SettingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SettingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SettingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SettingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SettingPage\n *\n * @constructor Twilio.Insights.V1.SettingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SettingSolution} solution - Path solution\n *\n * @returns SettingPage\n */\n/* jshint ignore:end */\nSettingPage = function SettingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SettingPage.prototype, Page.prototype);\nSettingPage.prototype.constructor = SettingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SettingInstance\n *\n * @function getInstance\n * @memberof Twilio.Insights.V1.SettingPage#\n *\n * @param {SettingPayload} payload - Payload response from the API\n *\n * @returns SettingInstance\n */\n/* jshint ignore:end */\nSettingPage.prototype.getInstance = function getInstance(payload) {\n  return new SettingInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.SettingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSettingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSettingPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SettingContext\n *\n * @constructor Twilio.Insights.V1.SettingInstance\n *\n * @property {string} accountSid - The account_sid\n * @property {boolean} advancedFeatures - The advanced_features\n * @property {boolean} voiceTrace - The voice_trace\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {SettingPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nSettingInstance = function SettingInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.advancedFeatures = payload.advanced_features; // jshint ignore:line\n  this.voiceTrace = payload.voice_trace; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(SettingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SettingContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SettingInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.SettingInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.subaccountSid] - The subaccount_sid\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SettingInstance\n */\n/* jshint ignore:end */\nSettingInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SettingInstance\n *\n * @function update\n * @memberof Twilio.Insights.V1.SettingInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.advancedFeatures] - The advanced_features\n * @param {boolean} [opts.voiceTrace] - The voice_trace\n * @param {string} [opts.subaccountSid] - The subaccount_sid\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SettingInstance\n */\n/* jshint ignore:end */\nSettingInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.SettingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSettingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSettingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SettingContext\n *\n * @constructor Twilio.Insights.V1.SettingContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSettingContext = function SettingContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/Voice/Settings`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SettingInstance\n *\n * @function fetch\n * @memberof Twilio.Insights.V1.SettingContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.subaccountSid] - The subaccount_sid\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SettingInstance\n */\n/* jshint ignore:end */\nSettingContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'SubaccountSid': _.get(opts, 'subaccountSid')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SettingInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SettingInstance\n *\n * @function update\n * @memberof Twilio.Insights.V1.SettingContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.advancedFeatures] - The advanced_features\n * @param {boolean} [opts.voiceTrace] - The voice_trace\n * @param {string} [opts.subaccountSid] - The subaccount_sid\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SettingInstance\n */\n/* jshint ignore:end */\nSettingContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'AdvancedFeatures': serialize.bool(_.get(opts, 'advancedFeatures')),\n    'VoiceTrace': serialize.bool(_.get(opts, 'voiceTrace')),\n    'SubaccountSid': _.get(opts, 'subaccountSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SettingInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Insights.V1.SettingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSettingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSettingContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SettingList: SettingList,\n  SettingPage: SettingPage,\n  SettingInstance: SettingInstance,\n  SettingContext: SettingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar AnnotationList = require('./v1/annotation').AnnotationList;\nvar CallList = require('./v1/call').CallList;\nvar CallSummariesList = require('./v1/callSummaries').CallSummariesList;\nvar ConferenceList = require('./v1/conference').ConferenceList;\nvar RoomList = require('./v1/room').RoomList;\nvar SettingList = require('./v1/setting').SettingList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Insights\n *\n * @constructor Twilio.Insights.V1\n *\n * @property {Twilio.Insights.V1.SettingList} settings - settings resource\n * @property {Twilio.Insights.V1.AnnotationList} annotation - annotation resource\n * @property {Twilio.Insights.V1.CallList} calls - calls resource\n * @property {Twilio.Insights.V1.CallSummariesList} callSummaries -\n *          callSummaries resource\n * @property {Twilio.Insights.V1.ConferenceList} conferences - conferences resource\n * @property {Twilio.Insights.V1.RoomList} rooms - rooms resource\n *\n * @param {Twilio.Insights} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._settings = undefined;\n  this._annotation = undefined;\n  this._calls = undefined;\n  this._callSummaries = undefined;\n  this._conferences = undefined;\n  this._rooms = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'settings', {\n    get: function() {\n      this._settings = this._settings || new SettingList(this);\n      return this._settings;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'annotation', {\n    get: function() {\n      this._annotation = this._annotation || new AnnotationList(this);\n      return this._annotation;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'calls', {\n    get: function() {\n      this._calls = this._calls || new CallList(this);\n      return this._calls;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'callSummaries', {\n    get: function() {\n      this._callSummaries = this._callSummaries || new CallSummariesList(this);\n      return this._callSummaries;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'conferences', {\n    get: function() {\n      this._conferences = this._conferences || new ConferenceList(this);\n      return this._conferences;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'rooms', {\n    get: function() {\n      this._rooms = this._rooms || new RoomList(this);\n      return this._rooms;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./insights/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize insights domain\n *\n * @constructor Twilio.Insights\n *\n * @property {Twilio.Insights.V1} v1 - v1 version\n * @property {Twilio.Insights.V1.SettingList} settings - settings resource\n * @property {Twilio.Insights.V1.AnnotationList} annotation - annotation resource\n * @property {Twilio.Insights.V1.CallList} calls - calls resource\n * @property {Twilio.Insights.V1.CallSummariesList} callSummaries -\n *          callSummaries resource\n * @property {Twilio.Insights.V1.ConferenceList} conferences - conferences resource\n * @property {Twilio.Insights.V1.RoomList} rooms - rooms resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Insights(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://insights.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Insights.prototype, Domain.prototype);\nInsights.prototype.constructor = Insights;\n\nObject.defineProperty(Insights.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Insights.prototype,\n  'settings', {\n    get: function() {\n      return this.v1.settings;\n    }\n});\n\nObject.defineProperty(Insights.prototype,\n  'annotation', {\n    get: function() {\n      return this.v1.annotation;\n    }\n});\n\nObject.defineProperty(Insights.prototype,\n  'calls', {\n    get: function() {\n      return this.v1.calls;\n    }\n});\n\nObject.defineProperty(Insights.prototype,\n  'callSummaries', {\n    get: function() {\n      return this.v1.callSummaries;\n    }\n});\n\nObject.defineProperty(Insights.prototype,\n  'conferences', {\n    get: function() {\n      return this.v1.conferences;\n    }\n});\n\nObject.defineProperty(Insights.prototype,\n  'rooms', {\n    get: function() {\n      return this.v1.rooms;\n    }\n});\n\nmodule.exports = Insights;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CredentialList;\nvar CredentialPage;\nvar CredentialInstance;\nvar CredentialContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialList\n *\n * @constructor Twilio.IpMessaging.V1.CredentialList\n *\n * @param {Twilio.IpMessaging.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCredentialList = function CredentialList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function credentials\n   * @memberof Twilio.IpMessaging.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V1.CredentialContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListInstance(sid) {\n    return CredentialListInstance.get(sid);\n  }\n\n  CredentialListInstance._version = version;\n  // Path Solution\n  CredentialListInstance._solution = {};\n  CredentialListInstance._uri = `/Credentials`;\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V1.CredentialList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CredentialInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V1.CredentialList#\n   *\n   * @param {object} opts - Options for request\n   * @param {credential.push_service} opts.type - The type\n   * @param {string} [opts.friendlyName] - The friendly_name\n   * @param {string} [opts.certificate] - The certificate\n   * @param {string} [opts.privateKey] - The private_key\n   * @param {boolean} [opts.sandbox] - The sandbox\n   * @param {string} [opts.apiKey] - The api_key\n   * @param {string} [opts.secret] - The secret\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialInstance\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Certificate': _.get(opts, 'certificate'),\n      'PrivateKey': _.get(opts, 'privateKey'),\n      'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n      'ApiKey': _.get(opts, 'apiKey'),\n      'Secret': _.get(opts, 'secret')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V1.CredentialList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V1.CredentialContext}\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.get = function get(sid) {\n    return new CredentialContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V1.CredentialList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialPage\n *\n * @constructor Twilio.IpMessaging.V1.CredentialPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialSolution} solution - Path solution\n *\n * @returns CredentialPage\n */\n/* jshint ignore:end */\nCredentialPage = function CredentialPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialPage.prototype, Page.prototype);\nCredentialPage.prototype.constructor = CredentialPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V1.CredentialPage#\n *\n * @param {CredentialPayload} payload - Payload response from the API\n *\n * @returns CredentialInstance\n */\n/* jshint ignore:end */\nCredentialPage.prototype.getInstance = function getInstance(payload) {\n  return new CredentialInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.CredentialPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.IpMessaging.V1.CredentialInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} friendlyName - The friendly_name\n * @property {credential.push_service} type - The type\n * @property {string} sandbox - The sandbox\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {CredentialPayload} payload - The instance payload\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nCredentialInstance = function CredentialInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.sandbox = payload.sandbox; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CredentialInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.CredentialInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.certificate] - The certificate\n * @param {string} [opts.privateKey] - The private_key\n * @param {boolean} [opts.sandbox] - The sandbox\n * @param {string} [opts.apiKey] - The api_key\n * @param {string} [opts.secret] - The secret\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.CredentialInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.IpMessaging.V1.CredentialContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nCredentialContext = function CredentialContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Credentials/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.CredentialContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.certificate] - The certificate\n * @param {string} [opts.privateKey] - The private_key\n * @param {boolean} [opts.sandbox] - The sandbox\n * @param {string} [opts.apiKey] - The api_key\n * @param {string} [opts.secret] - The secret\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Certificate': _.get(opts, 'certificate'),\n    'PrivateKey': _.get(opts, 'privateKey'),\n    'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n    'ApiKey': _.get(opts, 'apiKey'),\n    'Secret': _.get(opts, 'secret')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.CredentialContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialList: CredentialList,\n  CredentialPage: CredentialPage,\n  CredentialInstance: CredentialInstance,\n  CredentialContext: CredentialContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar InviteList;\nvar InvitePage;\nvar InviteInstance;\nvar InviteContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteList\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList\n *\n * @param {Twilio.IpMessaging.V1} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nInviteList = function InviteList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function invites\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteContext}\n   */\n  /* jshint ignore:end */\n  function InviteListInstance(sid) {\n    return InviteListInstance.get(sid);\n  }\n\n  InviteListInstance._version = version;\n  // Path Solution\n  InviteListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  InviteListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Invites`;\n  /* jshint ignore:start */\n  /**\n   * create a InviteInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - The identity\n   * @param {string} [opts.roleSid] - The role_sid\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed InviteInstance\n   */\n  /* jshint ignore:end */\n  InviteListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Identity': _.get(opts, 'identity'), 'RoleSid': _.get(opts, 'roleSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InviteInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams InviteInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InviteListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InviteInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InviteInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InviteInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a invite\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteContext}\n   */\n  /* jshint ignore:end */\n  InviteListInstance.get = function get(sid) {\n    return new InviteContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InviteListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InviteListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InviteListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InvitePage\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InvitePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InviteSolution} solution - Path solution\n *\n * @returns InvitePage\n */\n/* jshint ignore:end */\nInvitePage = function InvitePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InvitePage.prototype, Page.prototype);\nInvitePage.prototype.constructor = InvitePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InviteInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InvitePage#\n *\n * @param {InvitePayload} payload - Payload response from the API\n *\n * @returns InviteInstance\n */\n/* jshint ignore:end */\nInvitePage.prototype.getInstance = function getInstance(payload) {\n  return new InviteInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InvitePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInvitePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInvitePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} channelSid - The channel_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} identity - The identity\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} roleSid - The role_sid\n * @property {string} createdBy - The created_by\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {InvitePayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nInviteInstance = function InviteInstance(version, payload, serviceSid,\n                                          channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(InviteInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InviteContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a InviteInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a InviteInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInviteInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInviteInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nInviteContext = function InviteContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Invites/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InviteInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InviteInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a InviteInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInviteContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInviteContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InviteList: InviteList,\n  InvitePage: InvitePage,\n  InviteInstance: InviteInstance,\n  InviteContext: InviteContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MemberList;\nvar MemberPage;\nvar MemberInstance;\nvar MemberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberList\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList\n *\n * @param {Twilio.IpMessaging.V1} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nMemberList = function MemberList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function members\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  function MemberListInstance(sid) {\n    return MemberListInstance.get(sid);\n  }\n\n  MemberListInstance._version = version;\n  // Path Solution\n  MemberListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  MemberListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Members`;\n  /* jshint ignore:start */\n  /**\n   * create a MemberInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - The identity\n   * @param {string} [opts.roleSid] - The role_sid\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MemberInstance\n   */\n  /* jshint ignore:end */\n  MemberListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Identity': _.get(opts, 'identity'), 'RoleSid': _.get(opts, 'roleSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MemberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MemberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MemberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a member\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  MemberListInstance.get = function get(sid) {\n    return new MemberContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MemberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MemberListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MemberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberPage\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MemberSolution} solution - Path solution\n *\n * @returns MemberPage\n */\n/* jshint ignore:end */\nMemberPage = function MemberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MemberPage.prototype, Page.prototype);\nMemberPage.prototype.constructor = MemberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MemberInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberPage#\n *\n * @param {MemberPayload} payload - Payload response from the API\n *\n * @returns MemberInstance\n */\n/* jshint ignore:end */\nMemberPage.prototype.getInstance = function getInstance(payload) {\n  return new MemberInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} channelSid - The channel_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} identity - The identity\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} roleSid - The role_sid\n * @property {number} lastConsumedMessageIndex - The last_consumed_message_index\n * @property {Date} lastConsumptionTimestamp - The last_consumption_timestamp\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {MemberPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nMemberInstance = function MemberInstance(version, payload, serviceSid,\n                                          channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line\n  this.lastConsumptionTimestamp = deserialize.iso8601DateTime(payload.last_consumption_timestamp); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MemberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MemberContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MemberInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The role_sid\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The last_consumed_message_index\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nMemberContext = function MemberContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Members/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MemberInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The role_sid\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The last_consumed_message_index\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'RoleSid': _.get(opts, 'roleSid'),\n    'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMemberContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MemberList: MemberList,\n  MemberPage: MemberPage,\n  MemberInstance: MemberInstance,\n  MemberContext: MemberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MessageList;\nvar MessagePage;\nvar MessageInstance;\nvar MessageContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageList\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList\n *\n * @param {Twilio.IpMessaging.V1} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nMessageList = function MessageList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function messages\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  function MessageListInstance(sid) {\n    return MessageListInstance.get(sid);\n  }\n\n  MessageListInstance._version = version;\n  // Path Solution\n  MessageListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  MessageListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Messages`;\n  /* jshint ignore:start */\n  /**\n   * create a MessageInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.body - The body\n   * @param {string} [opts.from] - The from\n   * @param {string} [opts.attributes] - The attributes\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MessageInstance\n   */\n  /* jshint ignore:end */\n  MessageListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['body'])) {\n      throw new Error('Required parameter \"opts[\\'body\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Body': _.get(opts, 'body'),\n      'From': _.get(opts, 'from'),\n      'Attributes': _.get(opts, 'attributes')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MessageInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] - The order\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MessageListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MessageInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] - The order\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] - The order\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a message\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  MessageListInstance.get = function get(sid) {\n    return new MessageContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessageListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessageListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagePage\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessagePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessageSolution} solution - Path solution\n *\n * @returns MessagePage\n */\n/* jshint ignore:end */\nMessagePage = function MessagePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessagePage.prototype, Page.prototype);\nMessagePage.prototype.constructor = MessagePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessageInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessagePage#\n *\n * @param {MessagePayload} payload - Payload response from the API\n *\n * @returns MessageInstance\n */\n/* jshint ignore:end */\nMessagePage.prototype.getInstance = function getInstance(payload) {\n  return new MessageInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessagePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} attributes - The attributes\n * @property {string} serviceSid - The service_sid\n * @property {string} to - The to\n * @property {string} channelSid - The channel_sid\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {boolean} wasEdited - The was_edited\n * @property {string} from - The from\n * @property {string} body - The body\n * @property {number} index - The index\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {MessagePayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nMessageInstance = function MessageInstance(version, payload, serviceSid,\n                                            channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.wasEdited = payload.was_edited; // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.body = payload.body; // jshint ignore:line\n  this.index = deserialize.integer(payload.index); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MessageInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MessageContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The body\n * @param {string} [opts.attributes] - The attributes\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessageInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nMessageContext = function MessageContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Messages/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The body\n * @param {string} [opts.attributes] - The attributes\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Body': _.get(opts, 'body'), 'Attributes': _.get(opts, 'attributes')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMessageContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessageList: MessageList,\n  MessagePage: MessagePage,\n  MessageInstance: MessageInstance,\n  MessageContext: MessageContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar InviteList = require('./channel/invite').InviteList;\nvar MemberList = require('./channel/member').MemberList;\nvar MessageList = require('./channel/message').MessageList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ChannelList;\nvar ChannelPage;\nvar ChannelInstance;\nvar ChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelList\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelList\n *\n * @param {Twilio.IpMessaging.V1} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nChannelList = function ChannelList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function channels\n   * @memberof Twilio.IpMessaging.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext}\n   */\n  /* jshint ignore:end */\n  function ChannelListInstance(sid) {\n    return ChannelListInstance.get(sid);\n  }\n\n  ChannelListInstance._version = version;\n  // Path Solution\n  ChannelListInstance._solution = {serviceSid: serviceSid};\n  ChannelListInstance._uri = `/Services/${serviceSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * create a ChannelInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - The friendly_name\n   * @param {string} [opts.uniqueName] - The unique_name\n   * @param {string} [opts.attributes] - The attributes\n   * @param {channel.channel_type} [opts.type] - The type\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ChannelInstance\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Attributes': _.get(opts, 'attributes'),\n      'Type': _.get(opts, 'type')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] - The type\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] - The type\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] - The type\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': serialize.map(_.get(opts, 'type'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a channel\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext}\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.get = function get(sid) {\n    return new ChannelContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ChannelListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelPage\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ChannelSolution} solution - Path solution\n *\n * @returns ChannelPage\n */\n/* jshint ignore:end */\nChannelPage = function ChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ChannelPage.prototype, Page.prototype);\nChannelPage.prototype.constructor = ChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelPage#\n *\n * @param {ChannelPayload} payload - Payload response from the API\n *\n * @returns ChannelInstance\n */\n/* jshint ignore:end */\nChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new ChannelInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} friendlyName - The friendly_name\n * @property {string} uniqueName - The unique_name\n * @property {string} attributes - The attributes\n * @property {channel.channel_type} type - The type\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} createdBy - The created_by\n * @property {number} membersCount - The members_count\n * @property {number} messagesCount - The messages_count\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {ChannelPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.membersCount = deserialize.integer(payload.members_count); // jshint ignore:line\n  this.messagesCount = deserialize.integer(payload.messages_count); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.uniqueName] - The unique_name\n * @param {string} [opts.attributes] - The attributes\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the members\n *\n * @function members\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.members = function members() {\n  return this._proxy.members;\n};\n\n/* jshint ignore:start */\n/**\n * Access the messages\n *\n * @function messages\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.messages = function messages() {\n  return this._proxy.messages;\n};\n\n/* jshint ignore:start */\n/**\n * Access the invites\n *\n * @function invites\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.invites = function invites() {\n  return this._proxy.invites;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.ChannelContext\n *\n * @property {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MemberList} members -\n *          members resource\n * @property {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.IpMessaging.V1.ServiceContext.ChannelContext.InviteList} invites -\n *          invites resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nChannelContext = function ChannelContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${sid}`;\n\n  // Dependents\n  this._members = undefined;\n  this._messages = undefined;\n  this._invites = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.uniqueName] - The unique_name\n * @param {string} [opts.attributes] - The attributes\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'Attributes': _.get(opts, 'attributes')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ChannelContext.prototype,\n  'members', {\n    get: function() {\n      if (!this._members) {\n        this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._members;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'messages', {\n    get: function() {\n      if (!this._messages) {\n        this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._messages;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'invites', {\n    get: function() {\n      if (!this._invites) {\n        this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._invites;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.ChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nChannelContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ChannelList: ChannelList,\n  ChannelPage: ChannelPage,\n  ChannelInstance: ChannelInstance,\n  ChannelContext: ChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RoleList;\nvar RolePage;\nvar RoleInstance;\nvar RoleContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleList\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.RoleList\n *\n * @param {Twilio.IpMessaging.V1} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nRoleList = function RoleList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function roles\n   * @memberof Twilio.IpMessaging.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  function RoleListInstance(sid) {\n    return RoleListInstance.get(sid);\n  }\n\n  RoleListInstance._version = version;\n  // Path Solution\n  RoleListInstance._solution = {serviceSid: serviceSid};\n  RoleListInstance._uri = `/Services/${serviceSid}/Roles`;\n  /* jshint ignore:start */\n  /**\n   * create a RoleInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - The friendly_name\n   * @param {role.role_type} opts.type - The type\n   * @param {string|list} opts.permission - The permission\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RoleInstance\n   */\n  /* jshint ignore:end */\n  RoleListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n    if (_.isUndefined(opts['permission'])) {\n      throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoleInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams RoleInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RoleListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RoleInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a role\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  RoleListInstance.get = function get(sid) {\n    return new RoleContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RoleListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RoleListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RoleListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RolePage\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.RolePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RoleSolution} solution - Path solution\n *\n * @returns RolePage\n */\n/* jshint ignore:end */\nRolePage = function RolePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RolePage.prototype, Page.prototype);\nRolePage.prototype.constructor = RolePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RoleInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RolePage#\n *\n * @param {RolePayload} payload - Payload response from the API\n *\n * @returns RoleInstance\n */\n/* jshint ignore:end */\nRolePage.prototype.getInstance = function getInstance(payload) {\n  return new RoleInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RolePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRolePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRolePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.RoleInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} friendlyName - The friendly_name\n * @property {role.role_type} type - The type\n * @property {string} permissions - The permissions\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {RolePayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nRoleInstance = function RoleInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.permissions = payload.permissions; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RoleInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleInstance#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - The permission\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoleInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.RoleContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nRoleContext = function RoleContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Roles/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleContext#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - The permission\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['permission'])) {\n    throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.RoleContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRoleContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RoleList: RoleList,\n  RolePage: RolePage,\n  RoleInstance: RoleInstance,\n  RoleContext: RoleContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar UserChannelList;\nvar UserChannelPage;\nvar UserChannelInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelList\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList\n *\n * @param {Twilio.IpMessaging.V1} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} userSid - The sid\n */\n/* jshint ignore:end */\nUserChannelList = function UserChannelList(version, serviceSid, userSid) {\n  /* jshint ignore:start */\n  /**\n   * @function userChannels\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelContext}\n   */\n  /* jshint ignore:end */\n  function UserChannelListInstance(sid) {\n    return UserChannelListInstance.get(sid);\n  }\n\n  UserChannelListInstance._version = version;\n  // Path Solution\n  UserChannelListInstance._solution = {serviceSid: serviceSid, userSid: userSid};\n  UserChannelListInstance._uri = `/Services/${serviceSid}/Users/${userSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * Streams UserChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserChannelListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelPage\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserChannelSolution} solution - Path solution\n *\n * @returns UserChannelPage\n */\n/* jshint ignore:end */\nUserChannelPage = function UserChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserChannelPage.prototype, Page.prototype);\nUserChannelPage.prototype.constructor = UserChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelPage#\n *\n * @param {UserChannelPayload} payload - Payload response from the API\n *\n * @returns UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new UserChannelInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.userSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserChannelPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelInstance\n *\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} channelSid - The channel_sid\n * @property {string} memberSid - The member_sid\n * @property {user_channel.channel_status} status - The status\n * @property {number} lastConsumedMessageIndex - The last_consumed_message_index\n * @property {number} unreadMessagesCount - The unread_messages_count\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {UserChannelPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} userSid - The sid\n */\n/* jshint ignore:end */\nUserChannelInstance = function UserChannelInstance(version, payload, serviceSid,\n                                                    userSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.memberSid = payload.member_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line\n  this.unreadMessagesCount = deserialize.integer(payload.unread_messages_count); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, userSid: userSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserChannelList: UserChannelList,\n  UserChannelPage: UserChannelPage,\n  UserChannelInstance: UserChannelInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar UserChannelList = require('./user/userChannel').UserChannelList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UserList;\nvar UserPage;\nvar UserInstance;\nvar UserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserList\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.UserList\n *\n * @param {Twilio.IpMessaging.V1} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nUserList = function UserList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function users\n   * @memberof Twilio.IpMessaging.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  function UserListInstance(sid) {\n    return UserListInstance.get(sid);\n  }\n\n  UserListInstance._version = version;\n  // Path Solution\n  UserListInstance._solution = {serviceSid: serviceSid};\n  UserListInstance._uri = `/Services/${serviceSid}/Users`;\n  /* jshint ignore:start */\n  /**\n   * create a UserInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - The identity\n   * @param {string} [opts.roleSid] - The role_sid\n   * @param {string} [opts.attributes] - The attributes\n   * @param {string} [opts.friendlyName] - The friendly_name\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed UserInstance\n   */\n  /* jshint ignore:end */\n  UserListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'RoleSid': _.get(opts, 'roleSid'),\n      'Attributes': _.get(opts, 'attributes'),\n      'FriendlyName': _.get(opts, 'friendlyName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams UserInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  UserListInstance.get = function get(sid) {\n    return new UserContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V1.ServiceContext.UserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserPage\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.UserPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserSolution} solution - Path solution\n *\n * @returns UserPage\n */\n/* jshint ignore:end */\nUserPage = function UserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserPage.prototype, Page.prototype);\nUserPage.prototype.constructor = UserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserPage#\n *\n * @param {UserPayload} payload - Payload response from the API\n *\n * @returns UserInstance\n */\n/* jshint ignore:end */\nUserPage.prototype.getInstance = function getInstance(payload) {\n  return new UserInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.UserInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} attributes - The attributes\n * @property {string} friendlyName - The friendly_name\n * @property {string} roleSid - The role_sid\n * @property {string} identity - The identity\n * @property {boolean} isOnline - The is_online\n * @property {boolean} isNotifiable - The is_notifiable\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {number} joinedChannelsCount - The joined_channels_count\n * @property {string} links - The links\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {UserPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nUserInstance = function UserInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.isOnline = payload.is_online; // jshint ignore:line\n  this.isNotifiable = payload.is_notifiable; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.joinedChannelsCount = deserialize.integer(payload.joined_channels_count); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(UserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The role_sid\n * @param {string} [opts.attributes] - The attributes\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the userChannels\n *\n * @function userChannels\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserInstance#\n *\n * @returns {Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList}\n */\n/* jshint ignore:end */\nUserInstance.prototype.userChannels = function userChannels() {\n  return this._proxy.userChannels;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext.UserContext\n *\n * @property {Twilio.IpMessaging.V1.ServiceContext.UserContext.UserChannelList} userChannels -\n *          userChannels resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nUserContext = function UserContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Users/${sid}`;\n\n  // Dependents\n  this._userChannels = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The role_sid\n * @param {string} [opts.attributes] - The attributes\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'RoleSid': _.get(opts, 'roleSid'),\n    'Attributes': _.get(opts, 'attributes'),\n    'FriendlyName': _.get(opts, 'friendlyName')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(UserContext.prototype,\n  'userChannels', {\n    get: function() {\n      if (!this._userChannels) {\n        this._userChannels = new UserChannelList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._userChannels;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext.UserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserList: UserList,\n  UserPage: UserPage,\n  UserInstance: UserInstance,\n  UserContext: UserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ChannelList = require('./service/channel').ChannelList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar RoleList = require('./service/role').RoleList;\nvar UserList = require('./service/user').UserList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * @constructor Twilio.IpMessaging.V1.ServiceList\n *\n * @param {Twilio.IpMessaging.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.IpMessaging.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V1.ServiceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - The friendly_name\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V1.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V1.ServiceList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V1.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * @constructor Twilio.IpMessaging.V1.ServicePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V1.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} friendlyName - The friendly_name\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} defaultServiceRoleSid - The default_service_role_sid\n * @property {string} defaultChannelRoleSid - The default_channel_role_sid\n * @property {string} defaultChannelCreatorRoleSid -\n *          The default_channel_creator_role_sid\n * @property {boolean} readStatusEnabled - The read_status_enabled\n * @property {boolean} reachabilityEnabled - The reachability_enabled\n * @property {number} typingIndicatorTimeout - The typing_indicator_timeout\n * @property {number} consumptionReportInterval - The consumption_report_interval\n * @property {object} limits - The limits\n * @property {object} webhooks - The webhooks\n * @property {string} preWebhookUrl - The pre_webhook_url\n * @property {string} postWebhookUrl - The post_webhook_url\n * @property {string} webhookMethod - The webhook_method\n * @property {string} webhookFilters - The webhook_filters\n * @property {object} notifications - The notifications\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.defaultServiceRoleSid = payload.default_service_role_sid; // jshint ignore:line\n  this.defaultChannelRoleSid = payload.default_channel_role_sid; // jshint ignore:line\n  this.defaultChannelCreatorRoleSid = payload.default_channel_creator_role_sid; // jshint ignore:line\n  this.readStatusEnabled = payload.read_status_enabled; // jshint ignore:line\n  this.reachabilityEnabled = payload.reachability_enabled; // jshint ignore:line\n  this.typingIndicatorTimeout = deserialize.integer(payload.typing_indicator_timeout); // jshint ignore:line\n  this.consumptionReportInterval = deserialize.integer(payload.consumption_report_interval); // jshint ignore:line\n  this.limits = payload.limits; // jshint ignore:line\n  this.webhooks = payload.webhooks; // jshint ignore:line\n  this.preWebhookUrl = payload.pre_webhook_url; // jshint ignore:line\n  this.postWebhookUrl = payload.post_webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.webhookFilters = payload.webhook_filters; // jshint ignore:line\n  this.notifications = payload.notifications; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.defaultServiceRoleSid] - The default_service_role_sid\n * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid\n * @param {string} [opts.defaultChannelCreatorRoleSid] -\n *          The default_channel_creator_role_sid\n * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled\n * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled\n * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout\n * @param {number} [opts.consumptionReportInterval] -\n *          The consumption_report_interval\n * @param {boolean} [opts.notifications.newMessage.enabled] -\n *          The notifications.new_message.enabled\n * @param {string} [opts.notifications.newMessage.template] -\n *          The notifications.new_message.template\n * @param {boolean} [opts.notifications.addedToChannel.enabled] -\n *          The notifications.added_to_channel.enabled\n * @param {string} [opts.notifications.addedToChannel.template] -\n *          The notifications.added_to_channel.template\n * @param {boolean} [opts.notifications.removedFromChannel.enabled] -\n *          The notifications.removed_from_channel.enabled\n * @param {string} [opts.notifications.removedFromChannel.template] -\n *          The notifications.removed_from_channel.template\n * @param {boolean} [opts.notifications.invitedToChannel.enabled] -\n *          The notifications.invited_to_channel.enabled\n * @param {string} [opts.notifications.invitedToChannel.template] -\n *          The notifications.invited_to_channel.template\n * @param {string} [opts.preWebhookUrl] - The pre_webhook_url\n * @param {string} [opts.postWebhookUrl] - The post_webhook_url\n * @param {string} [opts.webhookMethod] - The webhook_method\n * @param {string|list} [opts.webhookFilters] - The webhook_filters\n * @param {string} [opts.webhooks.onMessageSend.url] -\n *          The webhooks.on_message_send.url\n * @param {string} [opts.webhooks.onMessageSend.method] -\n *          The webhooks.on_message_send.method\n * @param {string} [opts.webhooks.onMessageUpdate.url] -\n *          The webhooks.on_message_update.url\n * @param {string} [opts.webhooks.onMessageUpdate.method] -\n *          The webhooks.on_message_update.method\n * @param {string} [opts.webhooks.onMessageRemove.url] -\n *          The webhooks.on_message_remove.url\n * @param {string} [opts.webhooks.onMessageRemove.method] -\n *          The webhooks.on_message_remove.method\n * @param {string} [opts.webhooks.onChannelAdd.url] -\n *          The webhooks.on_channel_add.url\n * @param {string} [opts.webhooks.onChannelAdd.method] -\n *          The webhooks.on_channel_add.method\n * @param {string} [opts.webhooks.onChannelDestroy.url] -\n *          The webhooks.on_channel_destroy.url\n * @param {string} [opts.webhooks.onChannelDestroy.method] -\n *          The webhooks.on_channel_destroy.method\n * @param {string} [opts.webhooks.onChannelUpdate.url] -\n *          The webhooks.on_channel_update.url\n * @param {string} [opts.webhooks.onChannelUpdate.method] -\n *          The webhooks.on_channel_update.method\n * @param {string} [opts.webhooks.onMemberAdd.url] - The webhooks.on_member_add.url\n * @param {string} [opts.webhooks.onMemberAdd.method] -\n *          The webhooks.on_member_add.method\n * @param {string} [opts.webhooks.onMemberRemove.url] -\n *          The webhooks.on_member_remove.url\n * @param {string} [opts.webhooks.onMemberRemove.method] -\n *          The webhooks.on_member_remove.method\n * @param {string} [opts.webhooks.onMessageSent.url] -\n *          The webhooks.on_message_sent.url\n * @param {string} [opts.webhooks.onMessageSent.method] -\n *          The webhooks.on_message_sent.method\n * @param {string} [opts.webhooks.onMessageUpdated.url] -\n *          The webhooks.on_message_updated.url\n * @param {string} [opts.webhooks.onMessageUpdated.method] -\n *          The webhooks.on_message_updated.method\n * @param {string} [opts.webhooks.onMessageRemoved.url] -\n *          The webhooks.on_message_removed.url\n * @param {string} [opts.webhooks.onMessageRemoved.method] -\n *          The webhooks.on_message_removed.method\n * @param {string} [opts.webhooks.onChannelAdded.url] -\n *          The webhooks.on_channel_added.url\n * @param {string} [opts.webhooks.onChannelAdded.method] -\n *          The webhooks.on_channel_added.method\n * @param {string} [opts.webhooks.onChannelDestroyed.url] -\n *          The webhooks.on_channel_destroyed.url\n * @param {string} [opts.webhooks.onChannelDestroyed.method] -\n *          The webhooks.on_channel_destroyed.method\n * @param {string} [opts.webhooks.onChannelUpdated.url] -\n *          The webhooks.on_channel_updated.url\n * @param {string} [opts.webhooks.onChannelUpdated.method] -\n *          The webhooks.on_channel_updated.method\n * @param {string} [opts.webhooks.onMemberAdded.url] -\n *          The webhooks.on_member_added.url\n * @param {string} [opts.webhooks.onMemberAdded.method] -\n *          The webhooks.on_member_added.method\n * @param {string} [opts.webhooks.onMemberRemoved.url] -\n *          The webhooks.on_member_removed.url\n * @param {string} [opts.webhooks.onMemberRemoved.method] -\n *          The webhooks.on_member_removed.method\n * @param {number} [opts.limits.channelMembers] - The limits.channel_members\n * @param {number} [opts.limits.userChannels] - The limits.user_channels\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the channels\n *\n * @function channels\n * @memberof Twilio.IpMessaging.V1.ServiceInstance#\n *\n * @returns {Twilio.IpMessaging.V1.ServiceContext.ChannelList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.channels = function channels() {\n  return this._proxy.channels;\n};\n\n/* jshint ignore:start */\n/**\n * Access the roles\n *\n * @function roles\n * @memberof Twilio.IpMessaging.V1.ServiceInstance#\n *\n * @returns {Twilio.IpMessaging.V1.ServiceContext.RoleList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.roles = function roles() {\n  return this._proxy.roles;\n};\n\n/* jshint ignore:start */\n/**\n * Access the users\n *\n * @function users\n * @memberof Twilio.IpMessaging.V1.ServiceInstance#\n *\n * @returns {Twilio.IpMessaging.V1.ServiceContext.UserList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.users = function users() {\n  return this._proxy.users;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.IpMessaging.V1.ServiceContext\n *\n * @property {Twilio.IpMessaging.V1.ServiceContext.ChannelList} channels -\n *          channels resource\n * @property {Twilio.IpMessaging.V1.ServiceContext.RoleList} roles - roles resource\n * @property {Twilio.IpMessaging.V1.ServiceContext.UserList} users - users resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._channels = undefined;\n  this._roles = undefined;\n  this._users = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V1.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.defaultServiceRoleSid] - The default_service_role_sid\n * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid\n * @param {string} [opts.defaultChannelCreatorRoleSid] -\n *          The default_channel_creator_role_sid\n * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled\n * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled\n * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout\n * @param {number} [opts.consumptionReportInterval] -\n *          The consumption_report_interval\n * @param {boolean} [opts.notifications.newMessage.enabled] -\n *          The notifications.new_message.enabled\n * @param {string} [opts.notifications.newMessage.template] -\n *          The notifications.new_message.template\n * @param {boolean} [opts.notifications.addedToChannel.enabled] -\n *          The notifications.added_to_channel.enabled\n * @param {string} [opts.notifications.addedToChannel.template] -\n *          The notifications.added_to_channel.template\n * @param {boolean} [opts.notifications.removedFromChannel.enabled] -\n *          The notifications.removed_from_channel.enabled\n * @param {string} [opts.notifications.removedFromChannel.template] -\n *          The notifications.removed_from_channel.template\n * @param {boolean} [opts.notifications.invitedToChannel.enabled] -\n *          The notifications.invited_to_channel.enabled\n * @param {string} [opts.notifications.invitedToChannel.template] -\n *          The notifications.invited_to_channel.template\n * @param {string} [opts.preWebhookUrl] - The pre_webhook_url\n * @param {string} [opts.postWebhookUrl] - The post_webhook_url\n * @param {string} [opts.webhookMethod] - The webhook_method\n * @param {string|list} [opts.webhookFilters] - The webhook_filters\n * @param {string} [opts.webhooks.onMessageSend.url] -\n *          The webhooks.on_message_send.url\n * @param {string} [opts.webhooks.onMessageSend.method] -\n *          The webhooks.on_message_send.method\n * @param {string} [opts.webhooks.onMessageUpdate.url] -\n *          The webhooks.on_message_update.url\n * @param {string} [opts.webhooks.onMessageUpdate.method] -\n *          The webhooks.on_message_update.method\n * @param {string} [opts.webhooks.onMessageRemove.url] -\n *          The webhooks.on_message_remove.url\n * @param {string} [opts.webhooks.onMessageRemove.method] -\n *          The webhooks.on_message_remove.method\n * @param {string} [opts.webhooks.onChannelAdd.url] -\n *          The webhooks.on_channel_add.url\n * @param {string} [opts.webhooks.onChannelAdd.method] -\n *          The webhooks.on_channel_add.method\n * @param {string} [opts.webhooks.onChannelDestroy.url] -\n *          The webhooks.on_channel_destroy.url\n * @param {string} [opts.webhooks.onChannelDestroy.method] -\n *          The webhooks.on_channel_destroy.method\n * @param {string} [opts.webhooks.onChannelUpdate.url] -\n *          The webhooks.on_channel_update.url\n * @param {string} [opts.webhooks.onChannelUpdate.method] -\n *          The webhooks.on_channel_update.method\n * @param {string} [opts.webhooks.onMemberAdd.url] - The webhooks.on_member_add.url\n * @param {string} [opts.webhooks.onMemberAdd.method] -\n *          The webhooks.on_member_add.method\n * @param {string} [opts.webhooks.onMemberRemove.url] -\n *          The webhooks.on_member_remove.url\n * @param {string} [opts.webhooks.onMemberRemove.method] -\n *          The webhooks.on_member_remove.method\n * @param {string} [opts.webhooks.onMessageSent.url] -\n *          The webhooks.on_message_sent.url\n * @param {string} [opts.webhooks.onMessageSent.method] -\n *          The webhooks.on_message_sent.method\n * @param {string} [opts.webhooks.onMessageUpdated.url] -\n *          The webhooks.on_message_updated.url\n * @param {string} [opts.webhooks.onMessageUpdated.method] -\n *          The webhooks.on_message_updated.method\n * @param {string} [opts.webhooks.onMessageRemoved.url] -\n *          The webhooks.on_message_removed.url\n * @param {string} [opts.webhooks.onMessageRemoved.method] -\n *          The webhooks.on_message_removed.method\n * @param {string} [opts.webhooks.onChannelAdded.url] -\n *          The webhooks.on_channel_added.url\n * @param {string} [opts.webhooks.onChannelAdded.method] -\n *          The webhooks.on_channel_added.method\n * @param {string} [opts.webhooks.onChannelDestroyed.url] -\n *          The webhooks.on_channel_destroyed.url\n * @param {string} [opts.webhooks.onChannelDestroyed.method] -\n *          The webhooks.on_channel_destroyed.method\n * @param {string} [opts.webhooks.onChannelUpdated.url] -\n *          The webhooks.on_channel_updated.url\n * @param {string} [opts.webhooks.onChannelUpdated.method] -\n *          The webhooks.on_channel_updated.method\n * @param {string} [opts.webhooks.onMemberAdded.url] -\n *          The webhooks.on_member_added.url\n * @param {string} [opts.webhooks.onMemberAdded.method] -\n *          The webhooks.on_member_added.method\n * @param {string} [opts.webhooks.onMemberRemoved.url] -\n *          The webhooks.on_member_removed.url\n * @param {string} [opts.webhooks.onMemberRemoved.method] -\n *          The webhooks.on_member_removed.method\n * @param {number} [opts.limits.channelMembers] - The limits.channel_members\n * @param {number} [opts.limits.userChannels] - The limits.user_channels\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DefaultServiceRoleSid': _.get(opts, 'defaultServiceRoleSid'),\n    'DefaultChannelRoleSid': _.get(opts, 'defaultChannelRoleSid'),\n    'DefaultChannelCreatorRoleSid': _.get(opts, 'defaultChannelCreatorRoleSid'),\n    'ReadStatusEnabled': serialize.bool(_.get(opts, 'readStatusEnabled')),\n    'ReachabilityEnabled': serialize.bool(_.get(opts, 'reachabilityEnabled')),\n    'TypingIndicatorTimeout': _.get(opts, 'typingIndicatorTimeout'),\n    'ConsumptionReportInterval': _.get(opts, 'consumptionReportInterval'),\n    'Notifications.NewMessage.Enabled': serialize.bool(_.get(opts, 'notifications.newMessage.enabled')),\n    'Notifications.NewMessage.Template': _.get(opts, 'notifications.newMessage.template'),\n    'Notifications.AddedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.addedToChannel.enabled')),\n    'Notifications.AddedToChannel.Template': _.get(opts, 'notifications.addedToChannel.template'),\n    'Notifications.RemovedFromChannel.Enabled': serialize.bool(_.get(opts, 'notifications.removedFromChannel.enabled')),\n    'Notifications.RemovedFromChannel.Template': _.get(opts, 'notifications.removedFromChannel.template'),\n    'Notifications.InvitedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.invitedToChannel.enabled')),\n    'Notifications.InvitedToChannel.Template': _.get(opts, 'notifications.invitedToChannel.template'),\n    'PreWebhookUrl': _.get(opts, 'preWebhookUrl'),\n    'PostWebhookUrl': _.get(opts, 'postWebhookUrl'),\n    'WebhookMethod': _.get(opts, 'webhookMethod'),\n    'WebhookFilters': serialize.map(_.get(opts, 'webhookFilters'), function(e) { return e; }),\n    'Webhooks.OnMessageSend.Url': _.get(opts, 'webhooks.onMessageSend.url'),\n    'Webhooks.OnMessageSend.Method': _.get(opts, 'webhooks.onMessageSend.method'),\n    'Webhooks.OnMessageUpdate.Url': _.get(opts, 'webhooks.onMessageUpdate.url'),\n    'Webhooks.OnMessageUpdate.Method': _.get(opts, 'webhooks.onMessageUpdate.method'),\n    'Webhooks.OnMessageRemove.Url': _.get(opts, 'webhooks.onMessageRemove.url'),\n    'Webhooks.OnMessageRemove.Method': _.get(opts, 'webhooks.onMessageRemove.method'),\n    'Webhooks.OnChannelAdd.Url': _.get(opts, 'webhooks.onChannelAdd.url'),\n    'Webhooks.OnChannelAdd.Method': _.get(opts, 'webhooks.onChannelAdd.method'),\n    'Webhooks.OnChannelDestroy.Url': _.get(opts, 'webhooks.onChannelDestroy.url'),\n    'Webhooks.OnChannelDestroy.Method': _.get(opts, 'webhooks.onChannelDestroy.method'),\n    'Webhooks.OnChannelUpdate.Url': _.get(opts, 'webhooks.onChannelUpdate.url'),\n    'Webhooks.OnChannelUpdate.Method': _.get(opts, 'webhooks.onChannelUpdate.method'),\n    'Webhooks.OnMemberAdd.Url': _.get(opts, 'webhooks.onMemberAdd.url'),\n    'Webhooks.OnMemberAdd.Method': _.get(opts, 'webhooks.onMemberAdd.method'),\n    'Webhooks.OnMemberRemove.Url': _.get(opts, 'webhooks.onMemberRemove.url'),\n    'Webhooks.OnMemberRemove.Method': _.get(opts, 'webhooks.onMemberRemove.method'),\n    'Webhooks.OnMessageSent.Url': _.get(opts, 'webhooks.onMessageSent.url'),\n    'Webhooks.OnMessageSent.Method': _.get(opts, 'webhooks.onMessageSent.method'),\n    'Webhooks.OnMessageUpdated.Url': _.get(opts, 'webhooks.onMessageUpdated.url'),\n    'Webhooks.OnMessageUpdated.Method': _.get(opts, 'webhooks.onMessageUpdated.method'),\n    'Webhooks.OnMessageRemoved.Url': _.get(opts, 'webhooks.onMessageRemoved.url'),\n    'Webhooks.OnMessageRemoved.Method': _.get(opts, 'webhooks.onMessageRemoved.method'),\n    'Webhooks.OnChannelAdded.Url': _.get(opts, 'webhooks.onChannelAdded.url'),\n    'Webhooks.OnChannelAdded.Method': _.get(opts, 'webhooks.onChannelAdded.method'),\n    'Webhooks.OnChannelDestroyed.Url': _.get(opts, 'webhooks.onChannelDestroyed.url'),\n    'Webhooks.OnChannelDestroyed.Method': _.get(opts, 'webhooks.onChannelDestroyed.method'),\n    'Webhooks.OnChannelUpdated.Url': _.get(opts, 'webhooks.onChannelUpdated.url'),\n    'Webhooks.OnChannelUpdated.Method': _.get(opts, 'webhooks.onChannelUpdated.method'),\n    'Webhooks.OnMemberAdded.Url': _.get(opts, 'webhooks.onMemberAdded.url'),\n    'Webhooks.OnMemberAdded.Method': _.get(opts, 'webhooks.onMemberAdded.method'),\n    'Webhooks.OnMemberRemoved.Url': _.get(opts, 'webhooks.onMemberRemoved.url'),\n    'Webhooks.OnMemberRemoved.Method': _.get(opts, 'webhooks.onMemberRemoved.method'),\n    'Limits.ChannelMembers': _.get(opts, 'limits.channelMembers'),\n    'Limits.UserChannels': _.get(opts, 'limits.userChannels')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'channels', {\n    get: function() {\n      if (!this._channels) {\n        this._channels = new ChannelList(this._version, this._solution.sid);\n      }\n      return this._channels;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'roles', {\n    get: function() {\n      if (!this._roles) {\n        this._roles = new RoleList(this._version, this._solution.sid);\n      }\n      return this._roles;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'users', {\n    get: function() {\n      if (!this._users) {\n        this._users = new UserList(this._version, this._solution.sid);\n      }\n      return this._users;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V1.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CredentialList = require('./v1/credential').CredentialList;\nvar ServiceList = require('./v1/service').ServiceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of IpMessaging\n *\n * @constructor Twilio.IpMessaging.V1\n *\n * @property {Twilio.IpMessaging.V1.CredentialList} credentials -\n *          credentials resource\n * @property {Twilio.IpMessaging.V1.ServiceList} services - services resource\n *\n * @param {Twilio.IpMessaging} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._credentials = undefined;\n  this._services = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'credentials', {\n    get: function() {\n      this._credentials = this._credentials || new CredentialList(this);\n      return this._credentials;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CredentialList;\nvar CredentialPage;\nvar CredentialInstance;\nvar CredentialContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialList\n *\n * @constructor Twilio.IpMessaging.V2.CredentialList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nCredentialList = function CredentialList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function credentials\n   * @memberof Twilio.IpMessaging.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.CredentialContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListInstance(sid) {\n    return CredentialListInstance.get(sid);\n  }\n\n  CredentialListInstance._version = version;\n  // Path Solution\n  CredentialListInstance._solution = {};\n  CredentialListInstance._uri = `/Credentials`;\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.CredentialList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CredentialInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V2.CredentialList#\n   *\n   * @param {object} opts - Options for request\n   * @param {credential.push_service} opts.type - The type\n   * @param {string} [opts.friendlyName] - The friendly_name\n   * @param {string} [opts.certificate] - The certificate\n   * @param {string} [opts.privateKey] - The private_key\n   * @param {boolean} [opts.sandbox] - The sandbox\n   * @param {string} [opts.apiKey] - The api_key\n   * @param {string} [opts.secret] - The secret\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialInstance\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Certificate': _.get(opts, 'certificate'),\n      'PrivateKey': _.get(opts, 'privateKey'),\n      'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n      'ApiKey': _.get(opts, 'apiKey'),\n      'Secret': _.get(opts, 'secret')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.CredentialList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.CredentialContext}\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.get = function get(sid) {\n    return new CredentialContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.CredentialList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialPage\n *\n * @constructor Twilio.IpMessaging.V2.CredentialPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialSolution} solution - Path solution\n *\n * @returns CredentialPage\n */\n/* jshint ignore:end */\nCredentialPage = function CredentialPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialPage.prototype, Page.prototype);\nCredentialPage.prototype.constructor = CredentialPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.CredentialPage#\n *\n * @param {CredentialPayload} payload - Payload response from the API\n *\n * @returns CredentialInstance\n */\n/* jshint ignore:end */\nCredentialPage.prototype.getInstance = function getInstance(payload) {\n  return new CredentialInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.CredentialPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.IpMessaging.V2.CredentialInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} friendlyName - The friendly_name\n * @property {credential.push_service} type - The type\n * @property {string} sandbox - The sandbox\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} url - The url\n *\n * @param {V2} version - Version of the resource\n * @param {CredentialPayload} payload - The instance payload\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nCredentialInstance = function CredentialInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.sandbox = payload.sandbox; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CredentialInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.CredentialInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.certificate] - The certificate\n * @param {string} [opts.privateKey] - The private_key\n * @param {boolean} [opts.sandbox] - The sandbox\n * @param {string} [opts.apiKey] - The api_key\n * @param {string} [opts.secret] - The secret\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.CredentialInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * @constructor Twilio.IpMessaging.V2.CredentialContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nCredentialContext = function CredentialContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Credentials/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.CredentialContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.certificate] - The certificate\n * @param {string} [opts.privateKey] - The private_key\n * @param {boolean} [opts.sandbox] - The sandbox\n * @param {string} [opts.apiKey] - The api_key\n * @param {string} [opts.secret] - The secret\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Certificate': _.get(opts, 'certificate'),\n    'PrivateKey': _.get(opts, 'privateKey'),\n    'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n    'ApiKey': _.get(opts, 'apiKey'),\n    'Secret': _.get(opts, 'secret')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.CredentialContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialList: CredentialList,\n  CredentialPage: CredentialPage,\n  CredentialInstance: CredentialInstance,\n  CredentialContext: CredentialContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BindingList;\nvar BindingPage;\nvar BindingInstance;\nvar BindingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.BindingList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nBindingList = function BindingList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function bindings\n   * @memberof Twilio.IpMessaging.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.BindingContext}\n   */\n  /* jshint ignore:end */\n  function BindingListInstance(sid) {\n    return BindingListInstance.get(sid);\n  }\n\n  BindingListInstance._version = version;\n  // Path Solution\n  BindingListInstance._solution = {serviceSid: serviceSid};\n  BindingListInstance._uri = `/Services/${serviceSid}/Bindings`;\n  /* jshint ignore:start */\n  /**\n   * Streams BindingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {binding.binding_type|list} [opts.bindingType] - The binding_type\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BindingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BindingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {binding.binding_type|list} [opts.bindingType] - The binding_type\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {binding.binding_type|list} [opts.bindingType] - The binding_type\n   * @param {string|list} [opts.identity] - The identity\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'BindingType': serialize.map(_.get(opts, 'bindingType'), function(e) { return e; }),\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a binding\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.BindingContext}\n   */\n  /* jshint ignore:end */\n  BindingListInstance.get = function get(sid) {\n    return new BindingContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BindingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BindingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BindingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingPage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.BindingPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BindingSolution} solution - Path solution\n *\n * @returns BindingPage\n */\n/* jshint ignore:end */\nBindingPage = function BindingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BindingPage.prototype, Page.prototype);\nBindingPage.prototype.constructor = BindingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BindingInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingPage#\n *\n * @param {BindingPayload} payload - Payload response from the API\n *\n * @returns BindingInstance\n */\n/* jshint ignore:end */\nBindingPage.prototype.getInstance = function getInstance(payload) {\n  return new BindingInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBindingPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.BindingInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} endpoint - The endpoint\n * @property {string} identity - The identity\n * @property {string} credentialSid - The credential_sid\n * @property {binding.binding_type} bindingType - The binding_type\n * @property {string} messageTypes - The message_types\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V2} version - Version of the resource\n * @param {BindingPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nBindingInstance = function BindingInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.endpoint = payload.endpoint; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.credentialSid = payload.credential_sid; // jshint ignore:line\n  this.bindingType = payload.binding_type; // jshint ignore:line\n  this.messageTypes = payload.message_types; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(BindingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BindingContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BindingInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a BindingInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBindingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.BindingContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nBindingContext = function BindingContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Bindings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BindingInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BindingInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a BindingInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.BindingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBindingContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BindingList: BindingList,\n  BindingPage: BindingPage,\n  BindingInstance: BindingInstance,\n  BindingContext: BindingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar InviteList;\nvar InvitePage;\nvar InviteInstance;\nvar InviteContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nInviteList = function InviteList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function invites\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteContext}\n   */\n  /* jshint ignore:end */\n  function InviteListInstance(sid) {\n    return InviteListInstance.get(sid);\n  }\n\n  InviteListInstance._version = version;\n  // Path Solution\n  InviteListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  InviteListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Invites`;\n  /* jshint ignore:start */\n  /**\n   * create a InviteInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - The identity\n   * @param {string} [opts.roleSid] - The role_sid\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed InviteInstance\n   */\n  /* jshint ignore:end */\n  InviteListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Identity': _.get(opts, 'identity'), 'RoleSid': _.get(opts, 'roleSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InviteInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams InviteInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InviteListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InviteInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InviteInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InviteInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InviteListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InvitePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a invite\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteContext}\n   */\n  /* jshint ignore:end */\n  InviteListInstance.get = function get(sid) {\n    return new InviteContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InviteListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InviteListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InviteListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InvitePage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InvitePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InviteSolution} solution - Path solution\n *\n * @returns InvitePage\n */\n/* jshint ignore:end */\nInvitePage = function InvitePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InvitePage.prototype, Page.prototype);\nInvitePage.prototype.constructor = InvitePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InviteInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InvitePage#\n *\n * @param {InvitePayload} payload - Payload response from the API\n *\n * @returns InviteInstance\n */\n/* jshint ignore:end */\nInvitePage.prototype.getInstance = function getInstance(payload) {\n  return new InviteInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InvitePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInvitePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInvitePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} channelSid - The channel_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} identity - The identity\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} roleSid - The role_sid\n * @property {string} createdBy - The created_by\n * @property {string} url - The url\n *\n * @param {V2} version - Version of the resource\n * @param {InvitePayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nInviteInstance = function InviteInstance(version, payload, serviceSid,\n                                          channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(InviteInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InviteContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a InviteInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a InviteInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInviteInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInviteInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InviteContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nInviteContext = function InviteContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Invites/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InviteInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InviteInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a InviteInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InviteInstance\n */\n/* jshint ignore:end */\nInviteContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInviteContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInviteContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InviteList: InviteList,\n  InvitePage: InvitePage,\n  InviteInstance: InviteInstance,\n  InviteContext: InviteContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MemberList;\nvar MemberPage;\nvar MemberInstance;\nvar MemberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nMemberList = function MemberList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function members\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  function MemberListInstance(sid) {\n    return MemberListInstance.get(sid);\n  }\n\n  MemberListInstance._version = version;\n  // Path Solution\n  MemberListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  MemberListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Members`;\n  /* jshint ignore:start */\n  /**\n   * create a MemberInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - The identity\n   * @param {string} [opts.roleSid] - The role_sid\n   * @param {number} [opts.lastConsumedMessageIndex] -\n   *          The last_consumed_message_index\n   * @param {Date} [opts.lastConsumptionTimestamp] - The last_consumption_timestamp\n   * @param {Date} [opts.dateCreated] - The date_created\n   * @param {Date} [opts.dateUpdated] - The date_updated\n   * @param {string} [opts.attributes] - The attributes\n   * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MemberInstance\n   */\n  /* jshint ignore:end */\n  MemberListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'RoleSid': _.get(opts, 'roleSid'),\n      'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),\n      'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp')),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'Attributes': _.get(opts, 'attributes')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MemberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MemberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MemberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.identity] - The identity\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MemberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MemberListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MemberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a member\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberContext}\n   */\n  /* jshint ignore:end */\n  MemberListInstance.get = function get(sid) {\n    return new MemberContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MemberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MemberListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MemberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberPage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MemberSolution} solution - Path solution\n *\n * @returns MemberPage\n */\n/* jshint ignore:end */\nMemberPage = function MemberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MemberPage.prototype, Page.prototype);\nMemberPage.prototype.constructor = MemberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MemberInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberPage#\n *\n * @param {MemberPayload} payload - Payload response from the API\n *\n * @returns MemberInstance\n */\n/* jshint ignore:end */\nMemberPage.prototype.getInstance = function getInstance(payload) {\n  return new MemberInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} channelSid - The channel_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} identity - The identity\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} roleSid - The role_sid\n * @property {number} lastConsumedMessageIndex - The last_consumed_message_index\n * @property {Date} lastConsumptionTimestamp - The last_consumption_timestamp\n * @property {string} url - The url\n * @property {string} attributes - The attributes\n *\n * @param {V2} version - Version of the resource\n * @param {MemberPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} channelSid - The channel_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nMemberInstance = function MemberInstance(version, payload, serviceSid,\n                                          channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line\n  this.lastConsumptionTimestamp = deserialize.iso8601DateTime(payload.last_consumption_timestamp); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MemberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MemberContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MemberInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The role_sid\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The last_consumed_message_index\n * @param {Date} [opts.lastConsumptionTimestamp] - The last_consumption_timestamp\n * @param {Date} [opts.dateCreated] - The date_created\n * @param {Date} [opts.dateUpdated] - The date_updated\n * @param {string} [opts.attributes] - The attributes\n * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMemberInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MemberContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} channelSid - The channel_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nMemberContext = function MemberContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Members/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MemberInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MemberInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MemberInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The role_sid\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The last_consumed_message_index\n * @param {Date} [opts.lastConsumptionTimestamp] - The last_consumption_timestamp\n * @param {Date} [opts.dateCreated] - The date_created\n * @param {Date} [opts.dateUpdated] - The date_updated\n * @param {string} [opts.attributes] - The attributes\n * @param {member.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MemberInstance\n */\n/* jshint ignore:end */\nMemberContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'RoleSid': _.get(opts, 'roleSid'),\n    'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),\n    'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp')),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'Attributes': _.get(opts, 'attributes')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MemberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMemberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMemberContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MemberList: MemberList,\n  MemberPage: MemberPage,\n  MemberInstance: MemberInstance,\n  MemberContext: MemberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar MessageList;\nvar MessagePage;\nvar MessageInstance;\nvar MessageContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nMessageList = function MessageList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function messages\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  function MessageListInstance(sid) {\n    return MessageListInstance.get(sid);\n  }\n\n  MessageListInstance._version = version;\n  // Path Solution\n  MessageListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  MessageListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Messages`;\n  /* jshint ignore:start */\n  /**\n   * create a MessageInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.from] - The from\n   * @param {string} [opts.attributes] - The attributes\n   * @param {Date} [opts.dateCreated] - The date_created\n   * @param {Date} [opts.dateUpdated] - The date_updated\n   * @param {string} [opts.lastUpdatedBy] - The last_updated_by\n   * @param {string} [opts.body] - The body\n   * @param {string} [opts.mediaSid] - The media_sid\n   * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MessageInstance\n   */\n  /* jshint ignore:end */\n  MessageListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'From': _.get(opts, 'from'),\n      'Attributes': _.get(opts, 'attributes'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'LastUpdatedBy': _.get(opts, 'lastUpdatedBy'),\n      'Body': _.get(opts, 'body'),\n      'MediaSid': _.get(opts, 'mediaSid')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MessageInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] - The order\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MessageListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MessageInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] - The order\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {message.order_type} [opts.order] - The order\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MessageInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a message\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageContext}\n   */\n  /* jshint ignore:end */\n  MessageListInstance.get = function get(sid) {\n    return new MessageContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessageListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessageListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagePage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessagePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessageSolution} solution - Path solution\n *\n * @returns MessagePage\n */\n/* jshint ignore:end */\nMessagePage = function MessagePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessagePage.prototype, Page.prototype);\nMessagePage.prototype.constructor = MessagePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessageInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessagePage#\n *\n * @param {MessagePayload} payload - Payload response from the API\n *\n * @returns MessageInstance\n */\n/* jshint ignore:end */\nMessagePage.prototype.getInstance = function getInstance(payload) {\n  return new MessageInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessagePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} attributes - The attributes\n * @property {string} serviceSid - The service_sid\n * @property {string} to - The to\n * @property {string} channelSid - The channel_sid\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} lastUpdatedBy - The last_updated_by\n * @property {boolean} wasEdited - The was_edited\n * @property {string} from - The from\n * @property {string} body - The body\n * @property {number} index - The index\n * @property {string} type - The type\n * @property {object} media - The media\n * @property {string} url - The url\n *\n * @param {V2} version - Version of the resource\n * @param {MessagePayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nMessageInstance = function MessageInstance(version, payload, serviceSid,\n                                            channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.lastUpdatedBy = payload.last_updated_by; // jshint ignore:line\n  this.wasEdited = payload.was_edited; // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.body = payload.body; // jshint ignore:line\n  this.index = deserialize.integer(payload.index); // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.media = payload.media; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(MessageInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MessageContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The body\n * @param {string} [opts.attributes] - The attributes\n * @param {Date} [opts.dateCreated] - The date_created\n * @param {Date} [opts.dateUpdated] - The date_updated\n * @param {string} [opts.lastUpdatedBy] - The last_updated_by\n * @param {string} [opts.from] - The from\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessageInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nMessageContext = function MessageContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Messages/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessageInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MessageInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.body] - The body\n * @param {string} [opts.attributes] - The attributes\n * @param {Date} [opts.dateCreated] - The date_created\n * @param {Date} [opts.dateUpdated] - The date_updated\n * @param {string} [opts.lastUpdatedBy] - The last_updated_by\n * @param {string} [opts.from] - The from\n * @param {message.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInstance\n */\n/* jshint ignore:end */\nMessageContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Body': _.get(opts, 'body'),\n    'Attributes': _.get(opts, 'attributes'),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'LastUpdatedBy': _.get(opts, 'lastUpdatedBy'),\n    'From': _.get(opts, 'from')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMessageContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessageList: MessageList,\n  MessagePage: MessagePage,\n  MessageInstance: MessageInstance,\n  MessageContext: MessageContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WebhookList;\nvar WebhookPage;\nvar WebhookInstance;\nvar WebhookContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nWebhookList = function WebhookList(version, serviceSid, channelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function webhooks\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  function WebhookListInstance(sid) {\n    return WebhookListInstance.get(sid);\n  }\n\n  WebhookListInstance._version = version;\n  // Path Solution\n  WebhookListInstance._solution = {serviceSid: serviceSid, channelSid: channelSid};\n  WebhookListInstance._uri = `/Services/${serviceSid}/Channels/${channelSid}/Webhooks`;\n  /* jshint ignore:start */\n  /**\n   * Streams WebhookInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WebhookInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a WebhookInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {object} opts - Options for request\n   * @param {webhook.type} opts.type - The type\n   * @param {string} [opts.configuration.url] - The configuration.url\n   * @param {webhook.method} [opts.configuration.method] - The configuration.method\n   * @param {string|list} [opts.configuration.filters] - The configuration.filters\n   * @param {string|list} [opts.configuration.triggers] - The configuration.triggers\n   * @param {string} [opts.configuration.flowSid] - The configuration.flow_sid\n   * @param {number} [opts.configuration.retryCount] - The configuration.retry_count\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WebhookInstance\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'Configuration.Url': _.get(opts, 'configuration.url'),\n      'Configuration.Method': _.get(opts, 'configuration.method'),\n      'Configuration.Filters': serialize.map(_.get(opts, 'configuration.filters'), function(e) { return e; }),\n      'Configuration.Triggers': serialize.map(_.get(opts, 'configuration.triggers'), function(e) { return e; }),\n      'Configuration.FlowSid': _.get(opts, 'configuration.flowSid'),\n      'Configuration.RetryCount': _.get(opts, 'configuration.retryCount')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.channelSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a webhook\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.get = function get(sid) {\n    return new WebhookContext(this._version, this._solution.serviceSid, this._solution.channelSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WebhookListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WebhookListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookPage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WebhookSolution} solution - Path solution\n *\n * @returns WebhookPage\n */\n/* jshint ignore:end */\nWebhookPage = function WebhookPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WebhookPage.prototype, Page.prototype);\nWebhookPage.prototype.constructor = WebhookPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WebhookInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookPage#\n *\n * @param {WebhookPayload} payload - Payload response from the API\n *\n * @returns WebhookInstance\n */\n/* jshint ignore:end */\nWebhookPage.prototype.getInstance = function getInstance(payload) {\n  return new WebhookInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.channelSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} channelSid - The channel_sid\n * @property {string} type - The type\n * @property {string} url - The url\n * @property {object} configuration - The configuration\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n *\n * @param {V2} version - Version of the resource\n * @param {WebhookPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nWebhookInstance = function WebhookInstance(version, payload, serviceSid,\n                                            channelSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.configuration = payload.configuration; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(WebhookInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WebhookContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.channelSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.configuration.url] - The configuration.url\n * @param {webhook.method} [opts.configuration.method] - The configuration.method\n * @param {string|list} [opts.configuration.filters] - The configuration.filters\n * @param {string|list} [opts.configuration.triggers] - The configuration.triggers\n * @param {string} [opts.configuration.flowSid] - The configuration.flow_sid\n * @param {number} [opts.configuration.retryCount] - The configuration.retry_count\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} channelSid - The channel_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nWebhookContext = function WebhookContext(version, serviceSid, channelSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, channelSid: channelSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${channelSid}/Webhooks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.configuration.url] - The configuration.url\n * @param {webhook.method} [opts.configuration.method] - The configuration.method\n * @param {string|list} [opts.configuration.filters] - The configuration.filters\n * @param {string|list} [opts.configuration.triggers] - The configuration.triggers\n * @param {string} [opts.configuration.flowSid] - The configuration.flow_sid\n * @param {number} [opts.configuration.retryCount] - The configuration.retry_count\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Configuration.Url': _.get(opts, 'configuration.url'),\n    'Configuration.Method': _.get(opts, 'configuration.method'),\n    'Configuration.Filters': serialize.map(_.get(opts, 'configuration.filters'), function(e) { return e; }),\n    'Configuration.Triggers': serialize.map(_.get(opts, 'configuration.triggers'), function(e) { return e; }),\n    'Configuration.FlowSid': _.get(opts, 'configuration.flowSid'),\n    'Configuration.RetryCount': _.get(opts, 'configuration.retryCount')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.channelSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWebhookContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WebhookList: WebhookList,\n  WebhookPage: WebhookPage,\n  WebhookInstance: WebhookInstance,\n  WebhookContext: WebhookContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar InviteList = require('./channel/invite').InviteList;\nvar MemberList = require('./channel/member').MemberList;\nvar MessageList = require('./channel/message').MessageList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar WebhookList = require('./channel/webhook').WebhookList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ChannelList;\nvar ChannelPage;\nvar ChannelInstance;\nvar ChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nChannelList = function ChannelList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function channels\n   * @memberof Twilio.IpMessaging.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext}\n   */\n  /* jshint ignore:end */\n  function ChannelListInstance(sid) {\n    return ChannelListInstance.get(sid);\n  }\n\n  ChannelListInstance._version = version;\n  // Path Solution\n  ChannelListInstance._solution = {serviceSid: serviceSid};\n  ChannelListInstance._uri = `/Services/${serviceSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * create a ChannelInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - The friendly_name\n   * @param {string} [opts.uniqueName] - The unique_name\n   * @param {string} [opts.attributes] - The attributes\n   * @param {channel.channel_type} [opts.type] - The type\n   * @param {Date} [opts.dateCreated] - The date_created\n   * @param {Date} [opts.dateUpdated] - The date_updated\n   * @param {string} [opts.createdBy] - The created_by\n   * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ChannelInstance\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Attributes': _.get(opts, 'attributes'),\n      'Type': _.get(opts, 'type'),\n      'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n      'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n      'CreatedBy': _.get(opts, 'createdBy')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] - The type\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] - The type\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {channel.channel_type|list} [opts.type] - The type\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': serialize.map(_.get(opts, 'type'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a channel\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext}\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.get = function get(sid) {\n    return new ChannelContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ChannelListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelPage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ChannelSolution} solution - Path solution\n *\n * @returns ChannelPage\n */\n/* jshint ignore:end */\nChannelPage = function ChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ChannelPage.prototype, Page.prototype);\nChannelPage.prototype.constructor = ChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelPage#\n *\n * @param {ChannelPayload} payload - Payload response from the API\n *\n * @returns ChannelInstance\n */\n/* jshint ignore:end */\nChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new ChannelInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} friendlyName - The friendly_name\n * @property {string} uniqueName - The unique_name\n * @property {string} attributes - The attributes\n * @property {channel.channel_type} type - The type\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} createdBy - The created_by\n * @property {number} membersCount - The members_count\n * @property {number} messagesCount - The messages_count\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V2} version - Version of the resource\n * @param {ChannelPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n  this.membersCount = deserialize.integer(payload.members_count); // jshint ignore:line\n  this.messagesCount = deserialize.integer(payload.messages_count); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.uniqueName] - The unique_name\n * @param {string} [opts.attributes] - The attributes\n * @param {Date} [opts.dateCreated] - The date_created\n * @param {Date} [opts.dateUpdated] - The date_updated\n * @param {string} [opts.createdBy] - The created_by\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the members\n *\n * @function members\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.members = function members() {\n  return this._proxy.members;\n};\n\n/* jshint ignore:start */\n/**\n * Access the messages\n *\n * @function messages\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.messages = function messages() {\n  return this._proxy.messages;\n};\n\n/* jshint ignore:start */\n/**\n * Access the invites\n *\n * @function invites\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.invites = function invites() {\n  return this._proxy.invites;\n};\n\n/* jshint ignore:start */\n/**\n * Access the webhooks\n *\n * @function webhooks\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList}\n */\n/* jshint ignore:end */\nChannelInstance.prototype.webhooks = function webhooks() {\n  return this._proxy.webhooks;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.ChannelContext\n *\n * @property {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MemberList} members -\n *          members resource\n * @property {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.InviteList} invites -\n *          invites resource\n * @property {Twilio.IpMessaging.V2.ServiceContext.ChannelContext.WebhookList} webhooks -\n *          webhooks resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nChannelContext = function ChannelContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Channels/${sid}`;\n\n  // Dependents\n  this._members = undefined;\n  this._messages = undefined;\n  this._invites = undefined;\n  this._webhooks = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ChannelInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ChannelInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ChannelInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.uniqueName] - The unique_name\n * @param {string} [opts.attributes] - The attributes\n * @param {Date} [opts.dateCreated] - The date_created\n * @param {Date} [opts.dateUpdated] - The date_updated\n * @param {string} [opts.createdBy] - The created_by\n * @param {channel.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChannelInstance\n */\n/* jshint ignore:end */\nChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'Attributes': _.get(opts, 'attributes'),\n    'DateCreated': serialize.iso8601DateTime(_.get(opts, 'dateCreated')),\n    'DateUpdated': serialize.iso8601DateTime(_.get(opts, 'dateUpdated')),\n    'CreatedBy': _.get(opts, 'createdBy')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ChannelContext.prototype,\n  'members', {\n    get: function() {\n      if (!this._members) {\n        this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._members;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'messages', {\n    get: function() {\n      if (!this._messages) {\n        this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._messages;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'invites', {\n    get: function() {\n      if (!this._invites) {\n        this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._invites;\n    }\n});\n\nObject.defineProperty(ChannelContext.prototype,\n  'webhooks', {\n    get: function() {\n      if (!this._webhooks) {\n        this._webhooks = new WebhookList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._webhooks;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.ChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nChannelContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ChannelList: ChannelList,\n  ChannelPage: ChannelPage,\n  ChannelInstance: ChannelInstance,\n  ChannelContext: ChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RoleList;\nvar RolePage;\nvar RoleInstance;\nvar RoleContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.RoleList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nRoleList = function RoleList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function roles\n   * @memberof Twilio.IpMessaging.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  function RoleListInstance(sid) {\n    return RoleListInstance.get(sid);\n  }\n\n  RoleListInstance._version = version;\n  // Path Solution\n  RoleListInstance._solution = {serviceSid: serviceSid};\n  RoleListInstance._uri = `/Services/${serviceSid}/Roles`;\n  /* jshint ignore:start */\n  /**\n   * create a RoleInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - The friendly_name\n   * @param {role.role_type} opts.type - The type\n   * @param {string|list} opts.permission - The permission\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RoleInstance\n   */\n  /* jshint ignore:end */\n  RoleListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n    if (_.isUndefined(opts['permission'])) {\n      throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoleInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams RoleInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RoleListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RoleInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RoleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoleListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RolePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a role\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.RoleContext}\n   */\n  /* jshint ignore:end */\n  RoleListInstance.get = function get(sid) {\n    return new RoleContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RoleListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RoleListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RoleListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RolePage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.RolePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RoleSolution} solution - Path solution\n *\n * @returns RolePage\n */\n/* jshint ignore:end */\nRolePage = function RolePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RolePage.prototype, Page.prototype);\nRolePage.prototype.constructor = RolePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RoleInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RolePage#\n *\n * @param {RolePayload} payload - Payload response from the API\n *\n * @returns RoleInstance\n */\n/* jshint ignore:end */\nRolePage.prototype.getInstance = function getInstance(payload) {\n  return new RoleInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RolePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRolePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRolePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.RoleInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} friendlyName - The friendly_name\n * @property {role.role_type} type - The type\n * @property {string} permissions - The permissions\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} url - The url\n *\n * @param {V2} version - Version of the resource\n * @param {RolePayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nRoleInstance = function RoleInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.permissions = payload.permissions; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RoleInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleInstance#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - The permission\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoleInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoleContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.RoleContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nRoleContext = function RoleContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Roles/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoleInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoleInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a RoleInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleContext#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.permission - The permission\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoleInstance\n */\n/* jshint ignore:end */\nRoleContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['permission'])) {\n    throw new Error('Required parameter \"opts[\\'permission\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Permission': serialize.map(_.get(opts, 'permission'), function(e) { return e; })\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoleInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.RoleContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoleContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRoleContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RoleList: RoleList,\n  RolePage: RolePage,\n  RoleInstance: RoleInstance,\n  RoleContext: RoleContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar UserBindingList;\nvar UserBindingPage;\nvar UserBindingInstance;\nvar UserBindingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserBindingList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} userSid - The user_sid\n */\n/* jshint ignore:end */\nUserBindingList = function UserBindingList(version, serviceSid, userSid) {\n  /* jshint ignore:start */\n  /**\n   * @function userBindings\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingContext}\n   */\n  /* jshint ignore:end */\n  function UserBindingListInstance(sid) {\n    return UserBindingListInstance.get(sid);\n  }\n\n  UserBindingListInstance._version = version;\n  // Path Solution\n  UserBindingListInstance._solution = {serviceSid: serviceSid, userSid: userSid};\n  UserBindingListInstance._uri = `/Services/${serviceSid}/Users/${userSid}/Bindings`;\n  /* jshint ignore:start */\n  /**\n   * Streams UserBindingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {user_binding.binding_type|list} [opts.bindingType] - The binding_type\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserBindingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {user_binding.binding_type|list} [opts.bindingType] - The binding_type\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserBindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {user_binding.binding_type|list} [opts.bindingType] - The binding_type\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'BindingType': serialize.map(_.get(opts, 'bindingType'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserBindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserBindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserBindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user_binding\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingContext}\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.get = function get(sid) {\n    return new UserBindingContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserBindingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserBindingListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserBindingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserBindingPage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserBindingSolution} solution - Path solution\n *\n * @returns UserBindingPage\n */\n/* jshint ignore:end */\nUserBindingPage = function UserBindingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserBindingPage.prototype, Page.prototype);\nUserBindingPage.prototype.constructor = UserBindingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserBindingInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingPage#\n *\n * @param {UserBindingPayload} payload - Payload response from the API\n *\n * @returns UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingPage.prototype.getInstance = function getInstance(payload) {\n  return new UserBindingInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.userSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserBindingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserBindingPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserBindingContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} endpoint - The endpoint\n * @property {string} identity - The identity\n * @property {string} userSid - The user_sid\n * @property {string} credentialSid - The credential_sid\n * @property {user_binding.binding_type} bindingType - The binding_type\n * @property {string} messageTypes - The message_types\n * @property {string} url - The url\n *\n * @param {V2} version - Version of the resource\n * @param {UserBindingPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} userSid - The user_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nUserBindingInstance = function UserBindingInstance(version, payload, serviceSid,\n                                                    userSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.endpoint = payload.endpoint; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.userSid = payload.user_sid; // jshint ignore:line\n  this.credentialSid = payload.credential_sid; // jshint ignore:line\n  this.bindingType = payload.binding_type; // jshint ignore:line\n  this.messageTypes = payload.message_types; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, userSid: userSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(UserBindingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserBindingContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.userSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UserBindingInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserBindingInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserBindingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserBindingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserBindingContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} userSid - The user_sid\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nUserBindingContext = function UserBindingContext(version, serviceSid, userSid,\n                                                  sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, userSid: userSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Users/${userSid}/Bindings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserBindingInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserBindingInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserBindingInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserBindingInstance\n */\n/* jshint ignore:end */\nUserBindingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserBindingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserBindingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserBindingList: UserBindingList,\n  UserBindingPage: UserBindingPage,\n  UserBindingInstance: UserBindingInstance,\n  UserBindingContext: UserBindingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar UserChannelList;\nvar UserChannelPage;\nvar UserChannelInstance;\nvar UserChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} userSid - The user_sid\n */\n/* jshint ignore:end */\nUserChannelList = function UserChannelList(version, serviceSid, userSid) {\n  /* jshint ignore:start */\n  /**\n   * @function userChannels\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelContext}\n   */\n  /* jshint ignore:end */\n  function UserChannelListInstance(sid) {\n    return UserChannelListInstance.get(sid);\n  }\n\n  UserChannelListInstance._version = version;\n  // Path Solution\n  UserChannelListInstance._solution = {serviceSid: serviceSid, userSid: userSid};\n  UserChannelListInstance._uri = `/Services/${serviceSid}/Users/${userSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * Streams UserChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user_channel\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @param {string} channelSid - The channel_sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelContext}\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.get = function get(channelSid) {\n    return new UserChannelContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      channelSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserChannelListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelPage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserChannelSolution} solution - Path solution\n *\n * @returns UserChannelPage\n */\n/* jshint ignore:end */\nUserChannelPage = function UserChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserChannelPage.prototype, Page.prototype);\nUserChannelPage.prototype.constructor = UserChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelPage#\n *\n * @param {UserChannelPayload} payload - Payload response from the API\n *\n * @returns UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new UserChannelInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.userSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserChannelPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelInstance\n *\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} channelSid - The channel_sid\n * @property {string} userSid - The user_sid\n * @property {string} memberSid - The member_sid\n * @property {user_channel.channel_status} status - The status\n * @property {number} lastConsumedMessageIndex - The last_consumed_message_index\n * @property {number} unreadMessagesCount - The unread_messages_count\n * @property {string} links - The links\n * @property {string} url - The url\n * @property {user_channel.notification_level} notificationLevel -\n *          The notification_level\n *\n * @param {V2} version - Version of the resource\n * @param {UserChannelPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} userSid - The user_sid\n * @param {sid_like} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nUserChannelInstance = function UserChannelInstance(version, payload, serviceSid,\n                                                    userSid, channelSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.channelSid = payload.channel_sid; // jshint ignore:line\n  this.userSid = payload.user_sid; // jshint ignore:line\n  this.memberSid = payload.member_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.lastConsumedMessageIndex = deserialize.integer(payload.last_consumed_message_index); // jshint ignore:line\n  this.unreadMessagesCount = deserialize.integer(payload.unread_messages_count); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.notificationLevel = payload.notification_level; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    serviceSid: serviceSid,\n    userSid: userSid,\n    channelSid: channelSid || this.channelSid,\n  };\n};\n\nObject.defineProperty(UserChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserChannelContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.userSid,\n          this._solution.channelSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UserChannelInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserChannelInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a UserChannelInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {user_channel.notification_level} [opts.notificationLevel] -\n *          The notification_level\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The last_consumed_message_index\n * @param {Date} [opts.lastConsumptionTimestamp] - The last_consumption_timestamp\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserChannelContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} userSid - The user_sid\n * @param {sid_like} channelSid - The channel_sid\n */\n/* jshint ignore:end */\nUserChannelContext = function UserChannelContext(version, serviceSid, userSid,\n                                                  channelSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, userSid: userSid, channelSid: channelSid, };\n  this._uri = `/Services/${serviceSid}/Users/${userSid}/Channels/${channelSid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserChannelInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      this._solution.channelSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserChannelInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserChannelInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {user_channel.notification_level} [opts.notificationLevel] -\n *          The notification_level\n * @param {number} [opts.lastConsumedMessageIndex] -\n *          The last_consumed_message_index\n * @param {Date} [opts.lastConsumptionTimestamp] - The last_consumption_timestamp\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserChannelInstance\n */\n/* jshint ignore:end */\nUserChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'NotificationLevel': _.get(opts, 'notificationLevel'),\n    'LastConsumedMessageIndex': _.get(opts, 'lastConsumedMessageIndex'),\n    'LastConsumptionTimestamp': serialize.iso8601DateTime(_.get(opts, 'lastConsumptionTimestamp'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserChannelInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.userSid,\n      this._solution.channelSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserChannelContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserChannelList: UserChannelList,\n  UserChannelPage: UserChannelPage,\n  UserChannelInstance: UserChannelInstance,\n  UserChannelContext: UserChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar UserBindingList = require('./user/userBinding').UserBindingList;\nvar UserChannelList = require('./user/userChannel').UserChannelList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UserList;\nvar UserPage;\nvar UserInstance;\nvar UserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UserList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nUserList = function UserList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function users\n   * @memberof Twilio.IpMessaging.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  function UserListInstance(sid) {\n    return UserListInstance.get(sid);\n  }\n\n  UserListInstance._version = version;\n  // Path Solution\n  UserListInstance._solution = {serviceSid: serviceSid};\n  UserListInstance._uri = `/Services/${serviceSid}/Users`;\n  /* jshint ignore:start */\n  /**\n   * create a UserInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - The identity\n   * @param {string} [opts.roleSid] - The role_sid\n   * @param {string} [opts.attributes] - The attributes\n   * @param {string} [opts.friendlyName] - The friendly_name\n   * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n   *          The X-Twilio-Webhook-Enabled HTTP request header\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed UserInstance\n   */\n  /* jshint ignore:end */\n  UserListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'RoleSid': _.get(opts, 'roleSid'),\n      'Attributes': _.get(opts, 'attributes'),\n      'FriendlyName': _.get(opts, 'friendlyName')\n    });\n    var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams UserInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UserListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UserInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UserListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a user\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext.UserContext}\n   */\n  /* jshint ignore:end */\n  UserListInstance.get = function get(sid) {\n    return new UserContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceContext.UserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UserListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserPage\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UserSolution} solution - Path solution\n *\n * @returns UserPage\n */\n/* jshint ignore:end */\nUserPage = function UserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UserPage.prototype, Page.prototype);\nUserPage.prototype.constructor = UserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UserInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserPage#\n *\n * @param {UserPayload} payload - Payload response from the API\n *\n * @returns UserInstance\n */\n/* jshint ignore:end */\nUserPage.prototype.getInstance = function getInstance(payload) {\n  return new UserInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} attributes - The attributes\n * @property {string} friendlyName - The friendly_name\n * @property {string} roleSid - The role_sid\n * @property {string} identity - The identity\n * @property {boolean} isOnline - The is_online\n * @property {boolean} isNotifiable - The is_notifiable\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {number} joinedChannelsCount - The joined_channels_count\n * @property {string} links - The links\n * @property {string} url - The url\n *\n * @param {V2} version - Version of the resource\n * @param {UserPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nUserInstance = function UserInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.roleSid = payload.role_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.isOnline = payload.is_online; // jshint ignore:line\n  this.isNotifiable = payload.is_notifiable; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.joinedChannelsCount = deserialize.integer(payload.joined_channels_count); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(UserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The role_sid\n * @param {string} [opts.attributes] - The attributes\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the userChannels\n *\n * @function userChannels\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelList}\n */\n/* jshint ignore:end */\nUserInstance.prototype.userChannels = function userChannels() {\n  return this._proxy.userChannels;\n};\n\n/* jshint ignore:start */\n/**\n * Access the userBindings\n *\n * @function userBindings\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingList}\n */\n/* jshint ignore:end */\nUserInstance.prototype.userBindings = function userBindings() {\n  return this._proxy.userBindings;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUserInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UserContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext.UserContext\n *\n * @property {Twilio.IpMessaging.V2.ServiceContext.UserContext.UserChannelList} userChannels -\n *          userChannels resource\n * @property {Twilio.IpMessaging.V2.ServiceContext.UserContext.UserBindingList} userBindings -\n *          userBindings resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nUserContext = function UserContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Users/${sid}`;\n\n  // Dependents\n  this._userChannels = undefined;\n  this._userBindings = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UserInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UserInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a UserInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.roleSid] - The role_sid\n * @param {string} [opts.attributes] - The attributes\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {user.webhook_enabled_type} [opts.xTwilioWebhookEnabled] -\n *          The X-Twilio-Webhook-Enabled HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UserInstance\n */\n/* jshint ignore:end */\nUserContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'RoleSid': _.get(opts, 'roleSid'),\n    'Attributes': _.get(opts, 'attributes'),\n    'FriendlyName': _.get(opts, 'friendlyName')\n  });\n  var headers = values.of({'X-Twilio-Webhook-Enabled': _.get(opts, 'xTwilioWebhookEnabled')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UserInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(UserContext.prototype,\n  'userChannels', {\n    get: function() {\n      if (!this._userChannels) {\n        this._userChannels = new UserChannelList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._userChannels;\n    }\n});\n\nObject.defineProperty(UserContext.prototype,\n  'userBindings', {\n    get: function() {\n      if (!this._userBindings) {\n        this._userBindings = new UserBindingList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._userBindings;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext.UserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUserContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UserList: UserList,\n  UserPage: UserPage,\n  UserInstance: UserInstance,\n  UserContext: UserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BindingList = require('./service/binding').BindingList;\nvar ChannelList = require('./service/channel').ChannelList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar RoleList = require('./service/role').RoleList;\nvar UserList = require('./service/user').UserList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * @constructor Twilio.IpMessaging.V2.ServiceList\n *\n * @param {Twilio.IpMessaging.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.IpMessaging.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.IpMessaging.V2.ServiceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - The friendly_name\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.IpMessaging.V2.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.IpMessaging.V2.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.IpMessaging.V2.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.IpMessaging.V2.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.IpMessaging.V2.ServiceList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.IpMessaging.V2.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.IpMessaging.V2.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * @constructor Twilio.IpMessaging.V2.ServicePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.IpMessaging.V2.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} friendlyName - The friendly_name\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} defaultServiceRoleSid - The default_service_role_sid\n * @property {string} defaultChannelRoleSid - The default_channel_role_sid\n * @property {string} defaultChannelCreatorRoleSid -\n *          The default_channel_creator_role_sid\n * @property {boolean} readStatusEnabled - The read_status_enabled\n * @property {boolean} reachabilityEnabled - The reachability_enabled\n * @property {number} typingIndicatorTimeout - The typing_indicator_timeout\n * @property {number} consumptionReportInterval - The consumption_report_interval\n * @property {object} limits - The limits\n * @property {string} preWebhookUrl - The pre_webhook_url\n * @property {string} postWebhookUrl - The post_webhook_url\n * @property {string} webhookMethod - The webhook_method\n * @property {string} webhookFilters - The webhook_filters\n * @property {number} preWebhookRetryCount - The pre_webhook_retry_count\n * @property {number} postWebhookRetryCount - The post_webhook_retry_count\n * @property {object} notifications - The notifications\n * @property {object} media - The media\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V2} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.defaultServiceRoleSid = payload.default_service_role_sid; // jshint ignore:line\n  this.defaultChannelRoleSid = payload.default_channel_role_sid; // jshint ignore:line\n  this.defaultChannelCreatorRoleSid = payload.default_channel_creator_role_sid; // jshint ignore:line\n  this.readStatusEnabled = payload.read_status_enabled; // jshint ignore:line\n  this.reachabilityEnabled = payload.reachability_enabled; // jshint ignore:line\n  this.typingIndicatorTimeout = deserialize.integer(payload.typing_indicator_timeout); // jshint ignore:line\n  this.consumptionReportInterval = deserialize.integer(payload.consumption_report_interval); // jshint ignore:line\n  this.limits = payload.limits; // jshint ignore:line\n  this.preWebhookUrl = payload.pre_webhook_url; // jshint ignore:line\n  this.postWebhookUrl = payload.post_webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.webhookFilters = payload.webhook_filters; // jshint ignore:line\n  this.preWebhookRetryCount = deserialize.integer(payload.pre_webhook_retry_count); // jshint ignore:line\n  this.postWebhookRetryCount = deserialize.integer(payload.post_webhook_retry_count); // jshint ignore:line\n  this.notifications = payload.notifications; // jshint ignore:line\n  this.media = payload.media; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.defaultServiceRoleSid] - The default_service_role_sid\n * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid\n * @param {string} [opts.defaultChannelCreatorRoleSid] -\n *          The default_channel_creator_role_sid\n * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled\n * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled\n * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout\n * @param {number} [opts.consumptionReportInterval] -\n *          The consumption_report_interval\n * @param {boolean} [opts.notifications.newMessage.enabled] -\n *          The notifications.new_message.enabled\n * @param {string} [opts.notifications.newMessage.template] -\n *          The notifications.new_message.template\n * @param {string} [opts.notifications.newMessage.sound] -\n *          The notifications.new_message.sound\n * @param {boolean} [opts.notifications.newMessage.badgeCountEnabled] -\n *          The notifications.new_message.badge_count_enabled\n * @param {boolean} [opts.notifications.addedToChannel.enabled] -\n *          The notifications.added_to_channel.enabled\n * @param {string} [opts.notifications.addedToChannel.template] -\n *          The notifications.added_to_channel.template\n * @param {string} [opts.notifications.addedToChannel.sound] -\n *          The notifications.added_to_channel.sound\n * @param {boolean} [opts.notifications.removedFromChannel.enabled] -\n *          The notifications.removed_from_channel.enabled\n * @param {string} [opts.notifications.removedFromChannel.template] -\n *          The notifications.removed_from_channel.template\n * @param {string} [opts.notifications.removedFromChannel.sound] -\n *          The notifications.removed_from_channel.sound\n * @param {boolean} [opts.notifications.invitedToChannel.enabled] -\n *          The notifications.invited_to_channel.enabled\n * @param {string} [opts.notifications.invitedToChannel.template] -\n *          The notifications.invited_to_channel.template\n * @param {string} [opts.notifications.invitedToChannel.sound] -\n *          The notifications.invited_to_channel.sound\n * @param {string} [opts.preWebhookUrl] - The pre_webhook_url\n * @param {string} [opts.postWebhookUrl] - The post_webhook_url\n * @param {string} [opts.webhookMethod] - The webhook_method\n * @param {string|list} [opts.webhookFilters] - The webhook_filters\n * @param {number} [opts.limits.channelMembers] - The limits.channel_members\n * @param {number} [opts.limits.userChannels] - The limits.user_channels\n * @param {string} [opts.media.compatibilityMessage] -\n *          The media.compatibility_message\n * @param {number} [opts.preWebhookRetryCount] - The pre_webhook_retry_count\n * @param {number} [opts.postWebhookRetryCount] - The post_webhook_retry_count\n * @param {boolean} [opts.notifications.logEnabled] - The notifications.log_enabled\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the channels\n *\n * @function channels\n * @memberof Twilio.IpMessaging.V2.ServiceInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.ChannelList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.channels = function channels() {\n  return this._proxy.channels;\n};\n\n/* jshint ignore:start */\n/**\n * Access the roles\n *\n * @function roles\n * @memberof Twilio.IpMessaging.V2.ServiceInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.RoleList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.roles = function roles() {\n  return this._proxy.roles;\n};\n\n/* jshint ignore:start */\n/**\n * Access the users\n *\n * @function users\n * @memberof Twilio.IpMessaging.V2.ServiceInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.UserList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.users = function users() {\n  return this._proxy.users;\n};\n\n/* jshint ignore:start */\n/**\n * Access the bindings\n *\n * @function bindings\n * @memberof Twilio.IpMessaging.V2.ServiceInstance#\n *\n * @returns {Twilio.IpMessaging.V2.ServiceContext.BindingList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.bindings = function bindings() {\n  return this._proxy.bindings;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.IpMessaging.V2.ServiceContext\n *\n * @property {Twilio.IpMessaging.V2.ServiceContext.ChannelList} channels -\n *          channels resource\n * @property {Twilio.IpMessaging.V2.ServiceContext.RoleList} roles - roles resource\n * @property {Twilio.IpMessaging.V2.ServiceContext.UserList} users - users resource\n * @property {Twilio.IpMessaging.V2.ServiceContext.BindingList} bindings -\n *          bindings resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._channels = undefined;\n  this._roles = undefined;\n  this._users = undefined;\n  this._bindings = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.IpMessaging.V2.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.IpMessaging.V2.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.IpMessaging.V2.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.defaultServiceRoleSid] - The default_service_role_sid\n * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid\n * @param {string} [opts.defaultChannelCreatorRoleSid] -\n *          The default_channel_creator_role_sid\n * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled\n * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled\n * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout\n * @param {number} [opts.consumptionReportInterval] -\n *          The consumption_report_interval\n * @param {boolean} [opts.notifications.newMessage.enabled] -\n *          The notifications.new_message.enabled\n * @param {string} [opts.notifications.newMessage.template] -\n *          The notifications.new_message.template\n * @param {string} [opts.notifications.newMessage.sound] -\n *          The notifications.new_message.sound\n * @param {boolean} [opts.notifications.newMessage.badgeCountEnabled] -\n *          The notifications.new_message.badge_count_enabled\n * @param {boolean} [opts.notifications.addedToChannel.enabled] -\n *          The notifications.added_to_channel.enabled\n * @param {string} [opts.notifications.addedToChannel.template] -\n *          The notifications.added_to_channel.template\n * @param {string} [opts.notifications.addedToChannel.sound] -\n *          The notifications.added_to_channel.sound\n * @param {boolean} [opts.notifications.removedFromChannel.enabled] -\n *          The notifications.removed_from_channel.enabled\n * @param {string} [opts.notifications.removedFromChannel.template] -\n *          The notifications.removed_from_channel.template\n * @param {string} [opts.notifications.removedFromChannel.sound] -\n *          The notifications.removed_from_channel.sound\n * @param {boolean} [opts.notifications.invitedToChannel.enabled] -\n *          The notifications.invited_to_channel.enabled\n * @param {string} [opts.notifications.invitedToChannel.template] -\n *          The notifications.invited_to_channel.template\n * @param {string} [opts.notifications.invitedToChannel.sound] -\n *          The notifications.invited_to_channel.sound\n * @param {string} [opts.preWebhookUrl] - The pre_webhook_url\n * @param {string} [opts.postWebhookUrl] - The post_webhook_url\n * @param {string} [opts.webhookMethod] - The webhook_method\n * @param {string|list} [opts.webhookFilters] - The webhook_filters\n * @param {number} [opts.limits.channelMembers] - The limits.channel_members\n * @param {number} [opts.limits.userChannels] - The limits.user_channels\n * @param {string} [opts.media.compatibilityMessage] -\n *          The media.compatibility_message\n * @param {number} [opts.preWebhookRetryCount] - The pre_webhook_retry_count\n * @param {number} [opts.postWebhookRetryCount] - The post_webhook_retry_count\n * @param {boolean} [opts.notifications.logEnabled] - The notifications.log_enabled\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DefaultServiceRoleSid': _.get(opts, 'defaultServiceRoleSid'),\n    'DefaultChannelRoleSid': _.get(opts, 'defaultChannelRoleSid'),\n    'DefaultChannelCreatorRoleSid': _.get(opts, 'defaultChannelCreatorRoleSid'),\n    'ReadStatusEnabled': serialize.bool(_.get(opts, 'readStatusEnabled')),\n    'ReachabilityEnabled': serialize.bool(_.get(opts, 'reachabilityEnabled')),\n    'TypingIndicatorTimeout': _.get(opts, 'typingIndicatorTimeout'),\n    'ConsumptionReportInterval': _.get(opts, 'consumptionReportInterval'),\n    'Notifications.NewMessage.Enabled': serialize.bool(_.get(opts, 'notifications.newMessage.enabled')),\n    'Notifications.NewMessage.Template': _.get(opts, 'notifications.newMessage.template'),\n    'Notifications.NewMessage.Sound': _.get(opts, 'notifications.newMessage.sound'),\n    'Notifications.NewMessage.BadgeCountEnabled': serialize.bool(_.get(opts, 'notifications.newMessage.badgeCountEnabled')),\n    'Notifications.AddedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.addedToChannel.enabled')),\n    'Notifications.AddedToChannel.Template': _.get(opts, 'notifications.addedToChannel.template'),\n    'Notifications.AddedToChannel.Sound': _.get(opts, 'notifications.addedToChannel.sound'),\n    'Notifications.RemovedFromChannel.Enabled': serialize.bool(_.get(opts, 'notifications.removedFromChannel.enabled')),\n    'Notifications.RemovedFromChannel.Template': _.get(opts, 'notifications.removedFromChannel.template'),\n    'Notifications.RemovedFromChannel.Sound': _.get(opts, 'notifications.removedFromChannel.sound'),\n    'Notifications.InvitedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.invitedToChannel.enabled')),\n    'Notifications.InvitedToChannel.Template': _.get(opts, 'notifications.invitedToChannel.template'),\n    'Notifications.InvitedToChannel.Sound': _.get(opts, 'notifications.invitedToChannel.sound'),\n    'PreWebhookUrl': _.get(opts, 'preWebhookUrl'),\n    'PostWebhookUrl': _.get(opts, 'postWebhookUrl'),\n    'WebhookMethod': _.get(opts, 'webhookMethod'),\n    'WebhookFilters': serialize.map(_.get(opts, 'webhookFilters'), function(e) { return e; }),\n    'Limits.ChannelMembers': _.get(opts, 'limits.channelMembers'),\n    'Limits.UserChannels': _.get(opts, 'limits.userChannels'),\n    'Media.CompatibilityMessage': _.get(opts, 'media.compatibilityMessage'),\n    'PreWebhookRetryCount': _.get(opts, 'preWebhookRetryCount'),\n    'PostWebhookRetryCount': _.get(opts, 'postWebhookRetryCount'),\n    'Notifications.LogEnabled': serialize.bool(_.get(opts, 'notifications.logEnabled'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'channels', {\n    get: function() {\n      if (!this._channels) {\n        this._channels = new ChannelList(this._version, this._solution.sid);\n      }\n      return this._channels;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'roles', {\n    get: function() {\n      if (!this._roles) {\n        this._roles = new RoleList(this._version, this._solution.sid);\n      }\n      return this._roles;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'users', {\n    get: function() {\n      if (!this._users) {\n        this._users = new UserList(this._version, this._solution.sid);\n      }\n      return this._users;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'bindings', {\n    get: function() {\n      if (!this._bindings) {\n        this._bindings = new BindingList(this._version, this._solution.sid);\n      }\n      return this._bindings;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.IpMessaging.V2.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CredentialList = require('./v2/credential').CredentialList;\nvar ServiceList = require('./v2/service').ServiceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V2 version of IpMessaging\n *\n * @constructor Twilio.IpMessaging.V2\n *\n * @property {Twilio.IpMessaging.V2.CredentialList} credentials -\n *          credentials resource\n * @property {Twilio.IpMessaging.V2.ServiceList} services - services resource\n *\n * @param {Twilio.IpMessaging} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V2(domain) {\n  Version.prototype.constructor.call(this, domain, 'v2');\n\n  // Resources\n  this._credentials = undefined;\n  this._services = undefined;\n}\n\n_.extend(V2.prototype, Version.prototype);\nV2.prototype.constructor = V2;\n\nObject.defineProperty(V2.prototype,\n  'credentials', {\n    get: function() {\n      this._credentials = this._credentials || new CredentialList(this);\n      return this._credentials;\n    }\n});\n\nObject.defineProperty(V2.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nmodule.exports = V2;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./ipMessaging/V1');  /* jshint ignore:line */\nvar V2 = require('./ipMessaging/V2');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize ip_messaging domain\n *\n * @constructor Twilio.IpMessaging\n *\n * @property {Twilio.IpMessaging.V1} v1 - v1 version\n * @property {Twilio.IpMessaging.V2} v2 - v2 version\n * @property {Twilio.IpMessaging.V2.CredentialList} credentials -\n *          credentials resource\n * @property {Twilio.IpMessaging.V2.ServiceList} services - services resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction IpMessaging(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://ip-messaging.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n  this._v2 = undefined;\n}\n\n_.extend(IpMessaging.prototype, Domain.prototype);\nIpMessaging.prototype.constructor = IpMessaging;\n\nObject.defineProperty(IpMessaging.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(IpMessaging.prototype,\n  'v2', {\n    get: function() {\n      this._v2 = this._v2 || new V2(this);\n      return this._v2;\n    }\n});\n\nObject.defineProperty(IpMessaging.prototype,\n  'credentials', {\n    get: function() {\n      return this.v2.credentials;\n    }\n});\n\nObject.defineProperty(IpMessaging.prototype,\n  'services', {\n    get: function() {\n      return this.v2.services;\n    }\n});\n\nmodule.exports = IpMessaging;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar PhoneNumberList;\nvar PhoneNumberPage;\nvar PhoneNumberInstance;\nvar PhoneNumberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberList\n *\n * @constructor Twilio.Lookups.V1.PhoneNumberList\n *\n * @param {Twilio.Lookups.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nPhoneNumberList = function PhoneNumberList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function phoneNumbers\n   * @memberof Twilio.Lookups.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Lookups.V1.PhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  function PhoneNumberListInstance(sid) {\n    return PhoneNumberListInstance.get(sid);\n  }\n\n  PhoneNumberListInstance._version = version;\n  // Path Solution\n  PhoneNumberListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a phone_number\n   *\n   * @function get\n   * @memberof Twilio.Lookups.V1.PhoneNumberList#\n   *\n   * @param {string} phoneNumber - The phone number to fetch in E.164 format\n   *\n   * @returns {Twilio.Lookups.V1.PhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.get = function get(phoneNumber) {\n    return new PhoneNumberContext(this._version, phoneNumber);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Lookups.V1.PhoneNumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PhoneNumberListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PhoneNumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberPage\n *\n * @constructor Twilio.Lookups.V1.PhoneNumberPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PhoneNumberSolution} solution - Path solution\n *\n * @returns PhoneNumberPage\n */\n/* jshint ignore:end */\nPhoneNumberPage = function PhoneNumberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PhoneNumberPage.prototype, Page.prototype);\nPhoneNumberPage.prototype.constructor = PhoneNumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PhoneNumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Lookups.V1.PhoneNumberPage#\n *\n * @param {PhoneNumberPayload} payload - Payload response from the API\n *\n * @returns PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new PhoneNumberInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Lookups.V1.PhoneNumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberContext\n *\n * @constructor Twilio.Lookups.V1.PhoneNumberInstance\n *\n * @property {object} callerName - The name of the phone number's owner\n * @property {string} countryCode - The ISO country code for the phone number\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} nationalFormat - The phone number, in national format\n * @property {object} carrier - The telecom company that provides the phone number\n * @property {object} addOns -\n *          A JSON string with the results of the Add-ons you specified\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {PhoneNumberPayload} payload - The instance payload\n * @param {phone_number} phoneNumber - The phone number to fetch in E.164 format\n */\n/* jshint ignore:end */\nPhoneNumberInstance = function PhoneNumberInstance(version, payload,\n                                                    phoneNumber) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.callerName = payload.caller_name; // jshint ignore:line\n  this.countryCode = payload.country_code; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.nationalFormat = payload.national_format; // jshint ignore:line\n  this.carrier = payload.carrier; // jshint ignore:line\n  this.addOns = payload.add_ons; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {phoneNumber: phoneNumber || this.phoneNumber, };\n};\n\nObject.defineProperty(PhoneNumberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PhoneNumberContext(this._version, this._solution.phoneNumber);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a PhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Lookups.V1.PhoneNumberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.countryCode] - The ISO country code of the phone number\n * @param {string|list} [opts.type] - The type of information to return\n * @param {string|list} [opts.addOns] -\n *          The unique_name of an Add-on you would like to invoke\n * @param {object} [opts.addOnsData] -\n *          Data specific to the add-on you would like to invoke\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Lookups.V1.PhoneNumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberContext\n *\n * @constructor Twilio.Lookups.V1.PhoneNumberContext\n *\n * @param {V1} version - Version of the resource\n * @param {phone_number} phoneNumber - The phone number to fetch in E.164 format\n */\n/* jshint ignore:end */\nPhoneNumberContext = function PhoneNumberContext(version, phoneNumber) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {phoneNumber: phoneNumber, };\n  this._uri = `/PhoneNumbers/${phoneNumber}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Lookups.V1.PhoneNumberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.countryCode] - The ISO country code of the phone number\n * @param {string|list} [opts.type] - The type of information to return\n * @param {string|list} [opts.addOns] -\n *          The unique_name of an Add-on you would like to invoke\n * @param {object} [opts.addOnsData] -\n *          Data specific to the add-on you would like to invoke\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'CountryCode': _.get(opts, 'countryCode'),\n    'Type': serialize.map(_.get(opts, 'type'), function(e) { return e; }),\n    'AddOns': serialize.map(_.get(opts, 'addOns'), function(e) { return e; })\n  });\n  _.extend(data, serialize.prefixedCollapsibleMap(opts.addOnsData, 'AddOns'));\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PhoneNumberInstance(this._version, payload, this._solution.phoneNumber));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Lookups.V1.PhoneNumberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPhoneNumberContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PhoneNumberList: PhoneNumberList,\n  PhoneNumberPage: PhoneNumberPage,\n  PhoneNumberInstance: PhoneNumberInstance,\n  PhoneNumberContext: PhoneNumberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar PhoneNumberList = require('./v1/phoneNumber').PhoneNumberList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Lookups\n *\n * @constructor Twilio.Lookups.V1\n *\n * @property {Twilio.Lookups.V1.PhoneNumberList} phoneNumbers -\n *          phoneNumbers resource\n *\n * @param {Twilio.Lookups} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._phoneNumbers = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'phoneNumbers', {\n    get: function() {\n      this._phoneNumbers = this._phoneNumbers || new PhoneNumberList(this);\n      return this._phoneNumbers;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./lookups/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize lookups domain\n *\n * @constructor Twilio.Lookups\n *\n * @property {Twilio.Lookups.V1} v1 - v1 version\n * @property {Twilio.Lookups.V1.PhoneNumberList} phoneNumbers -\n *          phoneNumbers resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Lookups(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://lookups.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Lookups.prototype, Domain.prototype);\nLookups.prototype.constructor = Lookups;\n\nObject.defineProperty(Lookups.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Lookups.prototype,\n  'phoneNumbers', {\n    get: function() {\n      return this.v1.phoneNumbers;\n    }\n});\n\nmodule.exports = Lookups;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar MediaProcessorList;\nvar MediaProcessorPage;\nvar MediaProcessorInstance;\nvar MediaProcessorContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaProcessorList\n *\n * @constructor Twilio.Media.V1.MediaProcessorList\n *\n * @param {Twilio.Media.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nMediaProcessorList = function MediaProcessorList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function mediaProcessor\n   * @memberof Twilio.Media.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Media.V1.MediaProcessorContext}\n   */\n  /* jshint ignore:end */\n  function MediaProcessorListInstance(sid) {\n    return MediaProcessorListInstance.get(sid);\n  }\n\n  MediaProcessorListInstance._version = version;\n  // Path Solution\n  MediaProcessorListInstance._solution = {};\n  MediaProcessorListInstance._uri = `/MediaProcessors`;\n  /* jshint ignore:start */\n  /**\n   * create a MediaProcessorInstance\n   *\n   * @function create\n   * @memberof Twilio.Media.V1.MediaProcessorList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.extension - The Media Extension name or URL\n   * @param {string} opts.extensionContext - The Media Extension context\n   * @param {object} [opts.extensionEnvironment] - The Media Extension environment\n   * @param {string} [opts.statusCallback] -\n   *          The URL to send MediaProcessor event updates to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method Twilio should use to call the `status_callback` URL\n   * @param {number} [opts.maxDuration] - Maximum MediaProcessor duration in minutes\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MediaProcessorInstance\n   */\n  /* jshint ignore:end */\n  MediaProcessorListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['extension'])) {\n      throw new Error('Required parameter \"opts[\\'extension\\']\" missing.');\n    }\n    if (_.isUndefined(opts['extensionContext'])) {\n      throw new Error('Required parameter \"opts[\\'extensionContext\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Extension': _.get(opts, 'extension'),\n      'ExtensionContext': _.get(opts, 'extensionContext'),\n      'ExtensionEnvironment': serialize.object(_.get(opts, 'extensionEnvironment')),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'MaxDuration': _.get(opts, 'maxDuration')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MediaProcessorInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MediaProcessorInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Media.V1.MediaProcessorList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {media_processor.order} [opts.order] - The sort order of the list\n   * @param {media_processor.status} [opts.status] - Status to filter by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MediaProcessorListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MediaProcessorInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Media.V1.MediaProcessorList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {media_processor.order} [opts.order] - The sort order of the list\n   * @param {media_processor.status} [opts.status] - Status to filter by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MediaProcessorListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MediaProcessorInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Media.V1.MediaProcessorList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {media_processor.order} [opts.order] - The sort order of the list\n   * @param {media_processor.status} [opts.status] - Status to filter by\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MediaProcessorListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'Status': _.get(opts, 'status'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MediaProcessorPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MediaProcessorInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Media.V1.MediaProcessorList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MediaProcessorListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MediaProcessorPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a media_processor\n   *\n   * @function get\n   * @memberof Twilio.Media.V1.MediaProcessorList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Media.V1.MediaProcessorContext}\n   */\n  /* jshint ignore:end */\n  MediaProcessorListInstance.get = function get(sid) {\n    return new MediaProcessorContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Media.V1.MediaProcessorList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MediaProcessorListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MediaProcessorListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MediaProcessorListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaProcessorPage\n *\n * @constructor Twilio.Media.V1.MediaProcessorPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MediaProcessorSolution} solution - Path solution\n *\n * @returns MediaProcessorPage\n */\n/* jshint ignore:end */\nMediaProcessorPage = function MediaProcessorPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MediaProcessorPage.prototype, Page.prototype);\nMediaProcessorPage.prototype.constructor = MediaProcessorPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MediaProcessorInstance\n *\n * @function getInstance\n * @memberof Twilio.Media.V1.MediaProcessorPage#\n *\n * @param {MediaProcessorPayload} payload - Payload response from the API\n *\n * @returns MediaProcessorInstance\n */\n/* jshint ignore:end */\nMediaProcessorPage.prototype.getInstance = function getInstance(payload) {\n  return new MediaProcessorInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.MediaProcessorPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMediaProcessorPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMediaProcessorPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaProcessorContext\n *\n * @constructor Twilio.Media.V1.MediaProcessorInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} extension - The Media Extension name or URL\n * @property {string} extensionContext - The Media Extension context\n * @property {media_processor.status} status - The status of the MediaProcessor\n * @property {string} url - The absolute URL of the resource\n * @property {string} endedReason - The reason why a MediaProcessor ended\n * @property {string} statusCallback -\n *          The URL to which Twilio will send MediaProcessor event updates\n * @property {string} statusCallbackMethod -\n *          The HTTP method Twilio should use to call the `status_callback` URL\n * @property {number} maxDuration - Maximum MediaProcessor duration in seconds\n *\n * @param {V1} version - Version of the resource\n * @param {MediaProcessorPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nMediaProcessorInstance = function MediaProcessorInstance(version, payload, sid)\n                                                          {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.extension = payload.extension; // jshint ignore:line\n  this.extensionContext = payload.extension_context; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.endedReason = payload.ended_reason; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.maxDuration = deserialize.integer(payload.max_duration); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(MediaProcessorInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MediaProcessorContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MediaProcessorInstance\n *\n * @function fetch\n * @memberof Twilio.Media.V1.MediaProcessorInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaProcessorInstance\n */\n/* jshint ignore:end */\nMediaProcessorInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a MediaProcessorInstance\n *\n * @function update\n * @memberof Twilio.Media.V1.MediaProcessorInstance#\n *\n * @param {object} opts - Options for request\n * @param {media_processor.update_status} opts.status -\n *          The status of the MediaProcessor\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaProcessorInstance\n */\n/* jshint ignore:end */\nMediaProcessorInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.MediaProcessorInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMediaProcessorInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMediaProcessorInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaProcessorContext\n *\n * @constructor Twilio.Media.V1.MediaProcessorContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nMediaProcessorContext = function MediaProcessorContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/MediaProcessors/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MediaProcessorInstance\n *\n * @function fetch\n * @memberof Twilio.Media.V1.MediaProcessorContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaProcessorInstance\n */\n/* jshint ignore:end */\nMediaProcessorContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MediaProcessorInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a MediaProcessorInstance\n *\n * @function update\n * @memberof Twilio.Media.V1.MediaProcessorContext#\n *\n * @param {object} opts - Options for request\n * @param {media_processor.update_status} opts.status -\n *          The status of the MediaProcessor\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaProcessorInstance\n */\n/* jshint ignore:end */\nMediaProcessorContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MediaProcessorInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.MediaProcessorContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMediaProcessorContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMediaProcessorContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MediaProcessorList: MediaProcessorList,\n  MediaProcessorPage: MediaProcessorPage,\n  MediaProcessorInstance: MediaProcessorInstance,\n  MediaProcessorContext: MediaProcessorContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar MediaRecordingList;\nvar MediaRecordingPage;\nvar MediaRecordingInstance;\nvar MediaRecordingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaRecordingList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Media.V1.MediaRecordingList\n *\n * @param {Twilio.Media.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nMediaRecordingList = function MediaRecordingList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function mediaRecording\n   * @memberof Twilio.Media.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Media.V1.MediaRecordingContext}\n   */\n  /* jshint ignore:end */\n  function MediaRecordingListInstance(sid) {\n    return MediaRecordingListInstance.get(sid);\n  }\n\n  MediaRecordingListInstance._version = version;\n  // Path Solution\n  MediaRecordingListInstance._solution = {};\n  MediaRecordingListInstance._uri = `/MediaRecordings`;\n  /* jshint ignore:start */\n  /**\n   * Streams MediaRecordingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Media.V1.MediaRecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {media_recording.order} [opts.order] - The sort order of the list\n   * @param {media_recording.status} [opts.status] - Status to filter by\n   * @param {string} [opts.processorSid] - MediaProcessor to filter by\n   * @param {string} [opts.sourceSid] - Source SID to filter by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MediaRecordingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MediaRecordingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Media.V1.MediaRecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {media_recording.order} [opts.order] - The sort order of the list\n   * @param {media_recording.status} [opts.status] - Status to filter by\n   * @param {string} [opts.processorSid] - MediaProcessor to filter by\n   * @param {string} [opts.sourceSid] - Source SID to filter by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MediaRecordingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MediaRecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Media.V1.MediaRecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {media_recording.order} [opts.order] - The sort order of the list\n   * @param {media_recording.status} [opts.status] - Status to filter by\n   * @param {string} [opts.processorSid] - MediaProcessor to filter by\n   * @param {string} [opts.sourceSid] - Source SID to filter by\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MediaRecordingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'Status': _.get(opts, 'status'),\n      'ProcessorSid': _.get(opts, 'processorSid'),\n      'SourceSid': _.get(opts, 'sourceSid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MediaRecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MediaRecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Media.V1.MediaRecordingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MediaRecordingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MediaRecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a media_recording\n   *\n   * @function get\n   * @memberof Twilio.Media.V1.MediaRecordingList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Media.V1.MediaRecordingContext}\n   */\n  /* jshint ignore:end */\n  MediaRecordingListInstance.get = function get(sid) {\n    return new MediaRecordingContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Media.V1.MediaRecordingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MediaRecordingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MediaRecordingListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MediaRecordingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaRecordingPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Media.V1.MediaRecordingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MediaRecordingSolution} solution - Path solution\n *\n * @returns MediaRecordingPage\n */\n/* jshint ignore:end */\nMediaRecordingPage = function MediaRecordingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MediaRecordingPage.prototype, Page.prototype);\nMediaRecordingPage.prototype.constructor = MediaRecordingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MediaRecordingInstance\n *\n * @function getInstance\n * @memberof Twilio.Media.V1.MediaRecordingPage#\n *\n * @param {MediaRecordingPayload} payload - Payload response from the API\n *\n * @returns MediaRecordingInstance\n */\n/* jshint ignore:end */\nMediaRecordingPage.prototype.getInstance = function getInstance(payload) {\n  return new MediaRecordingInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.MediaRecordingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMediaRecordingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMediaRecordingPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaRecordingContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Media.V1.MediaRecordingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {number} bitrate - The bitrate of the media\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {number} duration - The duration of the MediaRecording\n * @property {media_recording.format} format - The format of the MediaRecording\n * @property {string} links - The URLs of related resources\n * @property {string} processorSid - The SID of the MediaProcessor\n * @property {string} resolution - The dimensions of the video image in pixels\n * @property {string} sourceSid -\n *          The SID of the resource that generated the original media\n * @property {string} sid - The unique string that identifies the resource\n * @property {number} size - The size of the recording\n * @property {media_recording.status} status - The status of the MediaRecording\n * @property {string} statusCallback -\n *          The URL to which Twilio will send MediaRecording event updates\n * @property {string} statusCallbackMethod -\n *          The HTTP method Twilio should use to call the `status_callback` URL\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {MediaRecordingPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nMediaRecordingInstance = function MediaRecordingInstance(version, payload, sid)\n                                                          {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.bitrate = deserialize.integer(payload.bitrate); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.duration = deserialize.integer(payload.duration); // jshint ignore:line\n  this.format = payload.format; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.processorSid = payload.processor_sid; // jshint ignore:line\n  this.resolution = payload.resolution; // jshint ignore:line\n  this.sourceSid = payload.source_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.size = deserialize.integer(payload.size); // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(MediaRecordingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MediaRecordingContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a MediaRecordingInstance\n *\n * @function remove\n * @memberof Twilio.Media.V1.MediaRecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaRecordingInstance\n */\n/* jshint ignore:end */\nMediaRecordingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MediaRecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Media.V1.MediaRecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaRecordingInstance\n */\n/* jshint ignore:end */\nMediaRecordingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.MediaRecordingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMediaRecordingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMediaRecordingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MediaRecordingContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Media.V1.MediaRecordingContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nMediaRecordingContext = function MediaRecordingContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/MediaRecordings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MediaRecordingInstance\n *\n * @function remove\n * @memberof Twilio.Media.V1.MediaRecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaRecordingInstance\n */\n/* jshint ignore:end */\nMediaRecordingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MediaRecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Media.V1.MediaRecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MediaRecordingInstance\n */\n/* jshint ignore:end */\nMediaRecordingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MediaRecordingInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.MediaRecordingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMediaRecordingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMediaRecordingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MediaRecordingList: MediaRecordingList,\n  MediaRecordingPage: MediaRecordingPage,\n  MediaRecordingInstance: MediaRecordingInstance,\n  MediaRecordingContext: MediaRecordingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar PlaybackGrantList;\nvar PlaybackGrantPage;\nvar PlaybackGrantInstance;\nvar PlaybackGrantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PlaybackGrantList\n *\n * @constructor Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantList\n *\n * @param {Twilio.Media.V1} version - Version of the resource\n * @param {string} sid -\n *          The unique string that identifies the PlayerStreamer associated with this PlaybackGrant.\n */\n/* jshint ignore:end */\nPlaybackGrantList = function PlaybackGrantList(version, sid) {\n  /* jshint ignore:start */\n  /**\n   * @function playbackGrant\n   * @memberof Twilio.Media.V1.PlayerStreamerContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantContext}\n   */\n  /* jshint ignore:end */\n  function PlaybackGrantListInstance(sid) {\n    return PlaybackGrantListInstance.get(sid);\n  }\n\n  PlaybackGrantListInstance._version = version;\n  // Path Solution\n  PlaybackGrantListInstance._solution = {sid: sid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a playback_grant\n   *\n   * @function get\n   * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantList#\n   *\n   * @returns {Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantContext}\n   */\n  /* jshint ignore:end */\n  PlaybackGrantListInstance.get = function get() {\n    return new PlaybackGrantContext(this._version, this._solution.sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PlaybackGrantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PlaybackGrantListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PlaybackGrantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PlaybackGrantPage\n *\n * @constructor Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PlaybackGrantSolution} solution - Path solution\n *\n * @returns PlaybackGrantPage\n */\n/* jshint ignore:end */\nPlaybackGrantPage = function PlaybackGrantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PlaybackGrantPage.prototype, Page.prototype);\nPlaybackGrantPage.prototype.constructor = PlaybackGrantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PlaybackGrantInstance\n *\n * @function getInstance\n * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantPage#\n *\n * @param {PlaybackGrantPayload} payload - Payload response from the API\n *\n * @returns PlaybackGrantInstance\n */\n/* jshint ignore:end */\nPlaybackGrantPage.prototype.getInstance = function getInstance(payload) {\n  return new PlaybackGrantInstance(this._version, payload, this._solution.sid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPlaybackGrantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPlaybackGrantPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PlaybackGrantContext\n *\n * @constructor Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the PlayerStreamer associated with this PlaybackGrant.\n * @property {string} url - The absolute URL of the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {object} grant -\n *          The grant that authorizes the player sdk to connect to the livestream\n *\n * @param {V1} version - Version of the resource\n * @param {PlaybackGrantPayload} payload - The instance payload\n * @param {sid} sid -\n *          The unique string that identifies the PlayerStreamer associated with this PlaybackGrant.\n */\n/* jshint ignore:end */\nPlaybackGrantInstance = function PlaybackGrantInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.grant = payload.grant; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid, };\n};\n\nObject.defineProperty(PlaybackGrantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PlaybackGrantContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * create a PlaybackGrantInstance\n *\n * @function create\n * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.ttl] - The time to live of the PlaybackGrant\n * @param {string} [opts.accessControlAllowOrigin] -\n *          The full URL that is authorized to play back the livestream\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PlaybackGrantInstance\n */\n/* jshint ignore:end */\nPlaybackGrantInstance.prototype.create = function create(opts, callback) {\n  return this._proxy.create(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PlaybackGrantInstance\n *\n * @function fetch\n * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PlaybackGrantInstance\n */\n/* jshint ignore:end */\nPlaybackGrantInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPlaybackGrantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPlaybackGrantInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PlaybackGrantContext\n *\n * @constructor Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nPlaybackGrantContext = function PlaybackGrantContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/PlayerStreamers/${sid}/PlaybackGrant`;\n};\n\n/* jshint ignore:start */\n/**\n * create a PlaybackGrantInstance\n *\n * @function create\n * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.ttl] - The time to live of the PlaybackGrant\n * @param {string} [opts.accessControlAllowOrigin] -\n *          The full URL that is authorized to play back the livestream\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PlaybackGrantInstance\n */\n/* jshint ignore:end */\nPlaybackGrantContext.prototype.create = function create(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Ttl': _.get(opts, 'ttl'),\n    'AccessControlAllowOrigin': _.get(opts, 'accessControlAllowOrigin')\n  });\n\n  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PlaybackGrantInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PlaybackGrantInstance\n *\n * @function fetch\n * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PlaybackGrantInstance\n */\n/* jshint ignore:end */\nPlaybackGrantContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PlaybackGrantInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPlaybackGrantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPlaybackGrantContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PlaybackGrantList: PlaybackGrantList,\n  PlaybackGrantPage: PlaybackGrantPage,\n  PlaybackGrantInstance: PlaybackGrantInstance,\n  PlaybackGrantContext: PlaybackGrantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar PlaybackGrantList = require(\n    './playerStreamer/playbackGrant').PlaybackGrantList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar PlayerStreamerList;\nvar PlayerStreamerPage;\nvar PlayerStreamerInstance;\nvar PlayerStreamerContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PlayerStreamerList\n *\n * @constructor Twilio.Media.V1.PlayerStreamerList\n *\n * @param {Twilio.Media.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nPlayerStreamerList = function PlayerStreamerList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function playerStreamer\n   * @memberof Twilio.Media.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Media.V1.PlayerStreamerContext}\n   */\n  /* jshint ignore:end */\n  function PlayerStreamerListInstance(sid) {\n    return PlayerStreamerListInstance.get(sid);\n  }\n\n  PlayerStreamerListInstance._version = version;\n  // Path Solution\n  PlayerStreamerListInstance._solution = {};\n  PlayerStreamerListInstance._uri = `/PlayerStreamers`;\n  /* jshint ignore:start */\n  /**\n   * create a PlayerStreamerInstance\n   *\n   * @function create\n   * @memberof Twilio.Media.V1.PlayerStreamerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.video] -\n   *          Whether the PlayerStreamer is configured to stream video\n   * @param {string} [opts.statusCallback] -\n   *          The URL to which Twilio will send PlayerStreamer event updates\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method Twilio should use to call the `status_callback` URL\n   * @param {number} [opts.maxDuration] - Maximum PlayerStreamer duration in seconds\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed PlayerStreamerInstance\n   */\n  /* jshint ignore:end */\n  PlayerStreamerListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Video': serialize.bool(_.get(opts, 'video')),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'MaxDuration': _.get(opts, 'maxDuration')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PlayerStreamerInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams PlayerStreamerInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Media.V1.PlayerStreamerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {player_streamer.order} [opts.order] - The sort order of the list\n   * @param {player_streamer.status} [opts.status] - Status to filter by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  PlayerStreamerListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists PlayerStreamerInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Media.V1.PlayerStreamerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {player_streamer.order} [opts.order] - The sort order of the list\n   * @param {player_streamer.status} [opts.status] - Status to filter by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PlayerStreamerListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of PlayerStreamerInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Media.V1.PlayerStreamerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {player_streamer.order} [opts.order] - The sort order of the list\n   * @param {player_streamer.status} [opts.status] - Status to filter by\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PlayerStreamerListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'Status': _.get(opts, 'status'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PlayerStreamerPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of PlayerStreamerInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Media.V1.PlayerStreamerList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PlayerStreamerListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PlayerStreamerPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a player_streamer\n   *\n   * @function get\n   * @memberof Twilio.Media.V1.PlayerStreamerList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Media.V1.PlayerStreamerContext}\n   */\n  /* jshint ignore:end */\n  PlayerStreamerListInstance.get = function get(sid) {\n    return new PlayerStreamerContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Media.V1.PlayerStreamerList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PlayerStreamerListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PlayerStreamerListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PlayerStreamerListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PlayerStreamerPage\n *\n * @constructor Twilio.Media.V1.PlayerStreamerPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PlayerStreamerSolution} solution - Path solution\n *\n * @returns PlayerStreamerPage\n */\n/* jshint ignore:end */\nPlayerStreamerPage = function PlayerStreamerPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PlayerStreamerPage.prototype, Page.prototype);\nPlayerStreamerPage.prototype.constructor = PlayerStreamerPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PlayerStreamerInstance\n *\n * @function getInstance\n * @memberof Twilio.Media.V1.PlayerStreamerPage#\n *\n * @param {PlayerStreamerPayload} payload - Payload response from the API\n *\n * @returns PlayerStreamerInstance\n */\n/* jshint ignore:end */\nPlayerStreamerPage.prototype.getInstance = function getInstance(payload) {\n  return new PlayerStreamerInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.PlayerStreamerPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPlayerStreamerPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPlayerStreamerPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PlayerStreamerContext\n *\n * @constructor Twilio.Media.V1.PlayerStreamerInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {boolean} video -\n *          Whether the PlayerStreamer is configured to stream video\n * @property {string} links - The URLs of related resources\n * @property {string} sid - The unique string that identifies the resource\n * @property {player_streamer.status} status - The status of the PlayerStreamer\n * @property {string} url - The absolute URL of the resource\n * @property {string} statusCallback -\n *          The URL to which Twilio will send PlayerStreamer event updates\n * @property {string} statusCallbackMethod -\n *          The HTTP method Twilio should use to call the `status_callback` URL\n * @property {player_streamer.ended_reason} endedReason -\n *          The reason why a PlayerStreamer ended\n * @property {number} maxDuration - Maximum PlayerStreamer duration in seconds\n *\n * @param {V1} version - Version of the resource\n * @param {PlayerStreamerPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nPlayerStreamerInstance = function PlayerStreamerInstance(version, payload, sid)\n                                                          {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.video = payload.video; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.endedReason = payload.ended_reason; // jshint ignore:line\n  this.maxDuration = deserialize.integer(payload.max_duration); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(PlayerStreamerInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PlayerStreamerContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a PlayerStreamerInstance\n *\n * @function fetch\n * @memberof Twilio.Media.V1.PlayerStreamerInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PlayerStreamerInstance\n */\n/* jshint ignore:end */\nPlayerStreamerInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a PlayerStreamerInstance\n *\n * @function update\n * @memberof Twilio.Media.V1.PlayerStreamerInstance#\n *\n * @param {object} opts - Options for request\n * @param {player_streamer.update_status} opts.status -\n *          The status the PlayerStreamer should be transitioned to\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PlayerStreamerInstance\n */\n/* jshint ignore:end */\nPlayerStreamerInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the playbackGrant\n *\n * @function playbackGrant\n * @memberof Twilio.Media.V1.PlayerStreamerInstance#\n *\n * @returns {Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantList}\n */\n/* jshint ignore:end */\nPlayerStreamerInstance.prototype.playbackGrant = function playbackGrant() {\n  return this._proxy.playbackGrant;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.PlayerStreamerInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPlayerStreamerInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPlayerStreamerInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PlayerStreamerContext\n *\n * @constructor Twilio.Media.V1.PlayerStreamerContext\n *\n * @property {Twilio.Media.V1.PlayerStreamerContext.PlaybackGrantList} playbackGrant -\n *          playbackGrant resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nPlayerStreamerContext = function PlayerStreamerContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/PlayerStreamers/${sid}`;\n\n  // Dependents\n  this._playbackGrant = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PlayerStreamerInstance\n *\n * @function fetch\n * @memberof Twilio.Media.V1.PlayerStreamerContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PlayerStreamerInstance\n */\n/* jshint ignore:end */\nPlayerStreamerContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PlayerStreamerInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a PlayerStreamerInstance\n *\n * @function update\n * @memberof Twilio.Media.V1.PlayerStreamerContext#\n *\n * @param {object} opts - Options for request\n * @param {player_streamer.update_status} opts.status -\n *          The status the PlayerStreamer should be transitioned to\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PlayerStreamerInstance\n */\n/* jshint ignore:end */\nPlayerStreamerContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PlayerStreamerInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(PlayerStreamerContext.prototype,\n  'playbackGrant', {\n    get: function() {\n      if (!this._playbackGrant) {\n        this._playbackGrant = new PlaybackGrantList(this._version, this._solution.sid);\n      }\n      return this._playbackGrant;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Media.V1.PlayerStreamerContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPlayerStreamerContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPlayerStreamerContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PlayerStreamerList: PlayerStreamerList,\n  PlayerStreamerPage: PlayerStreamerPage,\n  PlayerStreamerInstance: PlayerStreamerInstance,\n  PlayerStreamerContext: PlayerStreamerContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar MediaProcessorList = require('./v1/mediaProcessor').MediaProcessorList;\nvar MediaRecordingList = require('./v1/mediaRecording').MediaRecordingList;\nvar PlayerStreamerList = require('./v1/playerStreamer').PlayerStreamerList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Media\n *\n * @constructor Twilio.Media.V1\n *\n * @property {Twilio.Media.V1.MediaProcessorList} mediaProcessor -\n *          mediaProcessor resource\n * @property {Twilio.Media.V1.MediaRecordingList} mediaRecording -\n *          mediaRecording resource\n * @property {Twilio.Media.V1.PlayerStreamerList} playerStreamer -\n *          playerStreamer resource\n *\n * @param {Twilio.Media} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._mediaProcessor = undefined;\n  this._mediaRecording = undefined;\n  this._playerStreamer = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'mediaProcessor', {\n    get: function() {\n      this._mediaProcessor = this._mediaProcessor || new MediaProcessorList(this);\n      return this._mediaProcessor;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'mediaRecording', {\n    get: function() {\n      this._mediaRecording = this._mediaRecording || new MediaRecordingList(this);\n      return this._mediaRecording;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'playerStreamer', {\n    get: function() {\n      this._playerStreamer = this._playerStreamer || new PlayerStreamerList(this);\n      return this._playerStreamer;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./media/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize media domain\n *\n * @constructor Twilio.Media\n *\n * @property {Twilio.Media.V1} v1 - v1 version\n * @property {Twilio.Media.V1.MediaProcessorList} mediaProcessor -\n *          mediaProcessor resource\n * @property {Twilio.Media.V1.MediaRecordingList} mediaRecording -\n *          mediaRecording resource\n * @property {Twilio.Media.V1.PlayerStreamerList} playerStreamer -\n *          playerStreamer resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Media(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://media.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Media.prototype, Domain.prototype);\nMedia.prototype.constructor = Media;\n\nObject.defineProperty(Media.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Media.prototype,\n  'mediaProcessor', {\n    get: function() {\n      return this.v1.mediaProcessor;\n    }\n});\n\nObject.defineProperty(Media.prototype,\n  'mediaRecording', {\n    get: function() {\n      return this.v1.mediaRecording;\n    }\n});\n\nObject.defineProperty(Media.prototype,\n  'playerStreamer', {\n    get: function() {\n      return this.v1.playerStreamer;\n    }\n});\n\nmodule.exports = Media;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BrandVettingList;\nvar BrandVettingPage;\nvar BrandVettingInstance;\nvar BrandVettingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandVettingList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n * @param {string} brandSid - A2P BrandRegistration Sid\n */\n/* jshint ignore:end */\nBrandVettingList = function BrandVettingList(version, brandSid) {\n  /* jshint ignore:start */\n  /**\n   * @function brandVettings\n   * @memberof Twilio.Messaging.V1.BrandRegistrationContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingContext}\n   */\n  /* jshint ignore:end */\n  function BrandVettingListInstance(sid) {\n    return BrandVettingListInstance.get(sid);\n  }\n\n  BrandVettingListInstance._version = version;\n  // Path Solution\n  BrandVettingListInstance._solution = {brandSid: brandSid};\n  BrandVettingListInstance._uri = `/a2p/BrandRegistrations/${brandSid}/Vettings`;\n  /* jshint ignore:start */\n  /**\n   * create a BrandVettingInstance\n   *\n   * @function create\n   * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList#\n   *\n   * @param {object} opts - Options for request\n   * @param {brand_vetting.vetting_provider} opts.vettingProvider -\n   *          Third-party provider of the vettings to create\n   * @param {string} [opts.vettingId] - The unique ID of the vetting\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed BrandVettingInstance\n   */\n  /* jshint ignore:end */\n  BrandVettingListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['vettingProvider'])) {\n      throw new Error('Required parameter \"opts[\\'vettingProvider\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'VettingProvider': _.get(opts, 'vettingProvider'),\n      'VettingId': _.get(opts, 'vettingId')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BrandVettingInstance(\n        this._version,\n        payload,\n        this._solution.brandSid,\n        this._solution.brandVettingSid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams BrandVettingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {brand_vetting.vetting_provider} [opts.vettingProvider] -\n   *          Third-party provider of the vettings to create\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BrandVettingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BrandVettingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {brand_vetting.vetting_provider} [opts.vettingProvider] -\n   *          Third-party provider of the vettings to create\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BrandVettingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BrandVettingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {brand_vetting.vetting_provider} [opts.vettingProvider] -\n   *          Third-party provider of the vettings to create\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BrandVettingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'VettingProvider': _.get(opts, 'vettingProvider'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BrandVettingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BrandVettingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BrandVettingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BrandVettingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a brand_vetting\n   *\n   * @function get\n   * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList#\n   *\n   * @param {string} brandVettingSid - SID for third-party vetting record\n   *\n   * @returns {Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingContext}\n   */\n  /* jshint ignore:end */\n  BrandVettingListInstance.get = function get(brandVettingSid) {\n    return new BrandVettingContext(this._version, this._solution.brandSid, brandVettingSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BrandVettingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BrandVettingListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BrandVettingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandVettingPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BrandVettingSolution} solution - Path solution\n *\n * @returns BrandVettingPage\n */\n/* jshint ignore:end */\nBrandVettingPage = function BrandVettingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BrandVettingPage.prototype, Page.prototype);\nBrandVettingPage.prototype.constructor = BrandVettingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BrandVettingInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingPage#\n *\n * @param {BrandVettingPayload} payload - Payload response from the API\n *\n * @returns BrandVettingInstance\n */\n/* jshint ignore:end */\nBrandVettingPage.prototype.getInstance = function getInstance(payload) {\n  return new BrandVettingInstance(this._version, payload, this._solution.brandSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandVettingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBrandVettingPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandVettingContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the vetting\n * @property {string} brandSid - A2P BrandRegistration Sid\n * @property {string} brandVettingSid - SID for third-party vetting record\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {string} vettingId - The unique ID of the vetting\n * @property {string} vettingClass - The type of vetting\n * @property {string} vettingStatus - Status of vetting attempt\n * @property {brand_vetting.vetting_provider} vettingProvider -\n *          Third-party provider that has conducted the vetting\n * @property {string} url - The absolute URL of the Brand Vetting\n *\n * @param {V1} version - Version of the resource\n * @param {BrandVettingPayload} payload - The instance payload\n * @param {sid} brandSid - A2P BrandRegistration Sid\n * @param {sid} brandVettingSid - SID for third-party vetting record\n */\n/* jshint ignore:end */\nBrandVettingInstance = function BrandVettingInstance(version, payload, brandSid,\n                                                      brandVettingSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.brandSid = payload.brand_sid; // jshint ignore:line\n  this.brandVettingSid = payload.brand_vetting_sid; // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.vettingId = payload.vetting_id; // jshint ignore:line\n  this.vettingClass = payload.vetting_class; // jshint ignore:line\n  this.vettingStatus = payload.vetting_status; // jshint ignore:line\n  this.vettingProvider = payload.vetting_provider; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {brandSid: brandSid, brandVettingSid: brandVettingSid || this.brandVettingSid, };\n};\n\nObject.defineProperty(BrandVettingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BrandVettingContext(\n          this._version,\n          this._solution.brandSid,\n          this._solution.brandVettingSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BrandVettingInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandVettingInstance\n */\n/* jshint ignore:end */\nBrandVettingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandVettingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBrandVettingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandVettingContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} brandSid - A2P BrandRegistration Sid\n * @param {sid} brandVettingSid - SID for third-party vetting record\n */\n/* jshint ignore:end */\nBrandVettingContext = function BrandVettingContext(version, brandSid,\n                                                    brandVettingSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {brandSid: brandSid, brandVettingSid: brandVettingSid, };\n  this._uri = `/a2p/BrandRegistrations/${brandSid}/Vettings/${brandVettingSid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BrandVettingInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandVettingInstance\n */\n/* jshint ignore:end */\nBrandVettingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BrandVettingInstance(\n      this._version,\n      payload,\n      this._solution.brandSid,\n      this._solution.brandVettingSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandVettingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBrandVettingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BrandVettingList: BrandVettingList,\n  BrandVettingPage: BrandVettingPage,\n  BrandVettingInstance: BrandVettingInstance,\n  BrandVettingContext: BrandVettingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BrandVettingList = require(\n    './brandRegistration/brandVetting').BrandVettingList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar BrandRegistrationList;\nvar BrandRegistrationPage;\nvar BrandRegistrationInstance;\nvar BrandRegistrationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandRegistrationList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.BrandRegistrationList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nBrandRegistrationList = function BrandRegistrationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function brandRegistrations\n   * @memberof Twilio.Messaging.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.BrandRegistrationContext}\n   */\n  /* jshint ignore:end */\n  function BrandRegistrationListInstance(sid) {\n    return BrandRegistrationListInstance.get(sid);\n  }\n\n  BrandRegistrationListInstance._version = version;\n  // Path Solution\n  BrandRegistrationListInstance._solution = {};\n  BrandRegistrationListInstance._uri = `/a2p/BrandRegistrations`;\n  /* jshint ignore:start */\n  /**\n   * Streams BrandRegistrationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Messaging.V1.BrandRegistrationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BrandRegistrationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BrandRegistrationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Messaging.V1.BrandRegistrationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BrandRegistrationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BrandRegistrationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Messaging.V1.BrandRegistrationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BrandRegistrationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BrandRegistrationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BrandRegistrationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Messaging.V1.BrandRegistrationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BrandRegistrationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BrandRegistrationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a BrandRegistrationInstance\n   *\n   * @function create\n   * @memberof Twilio.Messaging.V1.BrandRegistrationList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.customerProfileBundleSid - Customer Profile Bundle Sid\n   * @param {string} opts.a2PProfileBundleSid - A2P Messaging Profile Bundle Sid\n   * @param {string} [opts.brandType] -\n   *          Type of brand being created. One of: \"STANDARD\", \"STARTER\".\n   * @param {boolean} [opts.mock] -\n   *          A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.\n   * @param {boolean} [opts.skipAutomaticSecVet] - Skip Automatic Secondary Vetting\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed BrandRegistrationInstance\n   */\n  /* jshint ignore:end */\n  BrandRegistrationListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['customerProfileBundleSid'])) {\n      throw new Error('Required parameter \"opts[\\'customerProfileBundleSid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['a2PProfileBundleSid'])) {\n      throw new Error('Required parameter \"opts[\\'a2PProfileBundleSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'CustomerProfileBundleSid': _.get(opts, 'customerProfileBundleSid'),\n      'A2PProfileBundleSid': _.get(opts, 'a2PProfileBundleSid'),\n      'BrandType': _.get(opts, 'brandType'),\n      'Mock': serialize.bool(_.get(opts, 'mock')),\n      'SkipAutomaticSecVet': serialize.bool(_.get(opts, 'skipAutomaticSecVet'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BrandRegistrationInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a brand_registration\n   *\n   * @function get\n   * @memberof Twilio.Messaging.V1.BrandRegistrationList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Messaging.V1.BrandRegistrationContext}\n   */\n  /* jshint ignore:end */\n  BrandRegistrationListInstance.get = function get(sid) {\n    return new BrandRegistrationContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.BrandRegistrationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BrandRegistrationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BrandRegistrationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BrandRegistrationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandRegistrationPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.BrandRegistrationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BrandRegistrationSolution} solution - Path solution\n *\n * @returns BrandRegistrationPage\n */\n/* jshint ignore:end */\nBrandRegistrationPage = function BrandRegistrationPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BrandRegistrationPage.prototype, Page.prototype);\nBrandRegistrationPage.prototype.constructor = BrandRegistrationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BrandRegistrationInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.BrandRegistrationPage#\n *\n * @param {BrandRegistrationPayload} payload - Payload response from the API\n *\n * @returns BrandRegistrationInstance\n */\n/* jshint ignore:end */\nBrandRegistrationPage.prototype.getInstance = function getInstance(payload) {\n  return new BrandRegistrationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.BrandRegistrationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandRegistrationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBrandRegistrationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandRegistrationContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.BrandRegistrationInstance\n *\n * @property {string} sid - A2P BrandRegistration Sid\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} customerProfileBundleSid -\n *          A2P Messaging Profile Bundle BundleSid\n * @property {string} a2PProfileBundleSid - A2P Messaging Profile Bundle BundleSid\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} brandType - Type of brand. One of: \"STANDARD\", \"STARTER\".\n * @property {brand_registration.status} status - Brand Registration status.\n * @property {string} tcrId - Campaign Registry (TCR) Brand ID\n * @property {string} failureReason - A reason why brand registration has failed\n * @property {string} url - The absolute URL of the Brand Registration\n * @property {number} brandScore - Brand score\n * @property {brand_registration.brand_feedback} brandFeedback - Brand feedback\n * @property {brand_registration.identity_status} identityStatus - Identity Status\n * @property {boolean} russell3000 - Russell 3000\n * @property {boolean} governmentEntity - Government Entity\n * @property {string} taxExemptStatus - Tax Exempt Status\n * @property {boolean} skipAutomaticSecVet - Skip Automatic Secondary Vetting\n * @property {boolean} mock -\n *          A boolean that specifies whether brand should be a mock or not. If true, brand will be registered as a mock brand. Defaults to false if no value is provided.\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {BrandRegistrationPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nBrandRegistrationInstance = function BrandRegistrationInstance(version, payload,\n    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.customerProfileBundleSid = payload.customer_profile_bundle_sid; // jshint ignore:line\n  this.a2PProfileBundleSid = payload.a2p_profile_bundle_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.brandType = payload.brand_type; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.tcrId = payload.tcr_id; // jshint ignore:line\n  this.failureReason = payload.failure_reason; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.brandScore = deserialize.integer(payload.brand_score); // jshint ignore:line\n  this.brandFeedback = payload.brand_feedback; // jshint ignore:line\n  this.identityStatus = payload.identity_status; // jshint ignore:line\n  this.russell3000 = payload.russell_3000; // jshint ignore:line\n  this.governmentEntity = payload.government_entity; // jshint ignore:line\n  this.taxExemptStatus = payload.tax_exempt_status; // jshint ignore:line\n  this.skipAutomaticSecVet = payload.skip_automatic_sec_vet; // jshint ignore:line\n  this.mock = payload.mock; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(BrandRegistrationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BrandRegistrationContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BrandRegistrationInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.BrandRegistrationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandRegistrationInstance\n */\n/* jshint ignore:end */\nBrandRegistrationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a BrandRegistrationInstance\n *\n * @function update\n * @memberof Twilio.Messaging.V1.BrandRegistrationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandRegistrationInstance\n */\n/* jshint ignore:end */\nBrandRegistrationInstance.prototype.update = function update(callback) {\n  return this._proxy.update(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the brandVettings\n *\n * @function brandVettings\n * @memberof Twilio.Messaging.V1.BrandRegistrationInstance#\n *\n * @returns {Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList}\n */\n/* jshint ignore:end */\nBrandRegistrationInstance.prototype.brandVettings = function brandVettings() {\n  return this._proxy.brandVettings;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.BrandRegistrationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandRegistrationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBrandRegistrationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandRegistrationContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.BrandRegistrationContext\n *\n * @property {Twilio.Messaging.V1.BrandRegistrationContext.BrandVettingList} brandVettings -\n *          brandVettings resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nBrandRegistrationContext = function BrandRegistrationContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/a2p/BrandRegistrations/${sid}`;\n\n  // Dependents\n  this._brandVettings = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BrandRegistrationInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.BrandRegistrationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandRegistrationInstance\n */\n/* jshint ignore:end */\nBrandRegistrationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BrandRegistrationInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a BrandRegistrationInstance\n *\n * @function update\n * @memberof Twilio.Messaging.V1.BrandRegistrationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandRegistrationInstance\n */\n/* jshint ignore:end */\nBrandRegistrationContext.prototype.update = function update(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.update({uri: this._uri, method: 'POST'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BrandRegistrationInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(BrandRegistrationContext.prototype,\n  'brandVettings', {\n    get: function() {\n      if (!this._brandVettings) {\n        this._brandVettings = new BrandVettingList(this._version, this._solution.sid);\n      }\n      return this._brandVettings;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.BrandRegistrationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandRegistrationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBrandRegistrationContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BrandRegistrationList: BrandRegistrationList,\n  BrandRegistrationPage: BrandRegistrationPage,\n  BrandRegistrationInstance: BrandRegistrationInstance,\n  BrandRegistrationContext: BrandRegistrationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar DeactivationsList;\nvar DeactivationsPage;\nvar DeactivationsInstance;\nvar DeactivationsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DeactivationsList\n *\n * @constructor Twilio.Messaging.V1.DeactivationsList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nDeactivationsList = function DeactivationsList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function deactivations\n   * @memberof Twilio.Messaging.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.DeactivationsContext}\n   */\n  /* jshint ignore:end */\n  function DeactivationsListInstance(sid) {\n    return DeactivationsListInstance.get(sid);\n  }\n\n  DeactivationsListInstance._version = version;\n  // Path Solution\n  DeactivationsListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a deactivations\n   *\n   * @function get\n   * @memberof Twilio.Messaging.V1.DeactivationsList#\n   *\n   * @returns {Twilio.Messaging.V1.DeactivationsContext}\n   */\n  /* jshint ignore:end */\n  DeactivationsListInstance.get = function get() {\n    return new DeactivationsContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.DeactivationsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DeactivationsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DeactivationsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DeactivationsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeactivationsPage\n *\n * @constructor Twilio.Messaging.V1.DeactivationsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DeactivationsSolution} solution - Path solution\n *\n * @returns DeactivationsPage\n */\n/* jshint ignore:end */\nDeactivationsPage = function DeactivationsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DeactivationsPage.prototype, Page.prototype);\nDeactivationsPage.prototype.constructor = DeactivationsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DeactivationsInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.DeactivationsPage#\n *\n * @param {DeactivationsPayload} payload - Payload response from the API\n *\n * @returns DeactivationsInstance\n */\n/* jshint ignore:end */\nDeactivationsPage.prototype.getInstance = function getInstance(payload) {\n  return new DeactivationsInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.DeactivationsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeactivationsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeactivationsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeactivationsContext\n *\n * @constructor Twilio.Messaging.V1.DeactivationsInstance\n *\n * @property {string} redirectTo - Redirect url to the list of deactivated numbers.\n *\n * @param {V1} version - Version of the resource\n * @param {DeactivationsPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nDeactivationsInstance = function DeactivationsInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.redirectTo = payload.redirect_to; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(DeactivationsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DeactivationsContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DeactivationsInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.DeactivationsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.date] - The date to retrieve deactivated numbers for.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeactivationsInstance\n */\n/* jshint ignore:end */\nDeactivationsInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.DeactivationsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeactivationsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeactivationsInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeactivationsContext\n *\n * @constructor Twilio.Messaging.V1.DeactivationsContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nDeactivationsContext = function DeactivationsContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/Deactivations`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DeactivationsInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.DeactivationsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.date] - The date to retrieve deactivated numbers for.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeactivationsInstance\n */\n/* jshint ignore:end */\nDeactivationsContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Date': serialize.iso8601Date(_.get(opts, 'date'))});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DeactivationsInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.DeactivationsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeactivationsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDeactivationsContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DeactivationsList: DeactivationsList,\n  DeactivationsPage: DeactivationsPage,\n  DeactivationsInstance: DeactivationsInstance,\n  DeactivationsContext: DeactivationsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ExternalCampaignList;\nvar ExternalCampaignPage;\nvar ExternalCampaignInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExternalCampaignList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ExternalCampaignList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nExternalCampaignList = function ExternalCampaignList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function externalCampaign\n   * @memberof Twilio.Messaging.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.ExternalCampaignContext}\n   */\n  /* jshint ignore:end */\n  function ExternalCampaignListInstance(sid) {\n    return ExternalCampaignListInstance.get(sid);\n  }\n\n  ExternalCampaignListInstance._version = version;\n  // Path Solution\n  ExternalCampaignListInstance._solution = {};\n  ExternalCampaignListInstance._uri = `/Services/PreregisteredUsa2p`;\n  /* jshint ignore:start */\n  /**\n   * create a ExternalCampaignInstance\n   *\n   * @function create\n   * @memberof Twilio.Messaging.V1.ExternalCampaignList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.campaignId - ID of the preregistered campaign.\n   * @param {string} opts.messagingServiceSid -\n   *          The SID of the Messaging Service the resource is associated with\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ExternalCampaignInstance\n   */\n  /* jshint ignore:end */\n  ExternalCampaignListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['campaignId'])) {\n      throw new Error('Required parameter \"opts[\\'campaignId\\']\" missing.');\n    }\n    if (_.isUndefined(opts['messagingServiceSid'])) {\n      throw new Error('Required parameter \"opts[\\'messagingServiceSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'CampaignId': _.get(opts, 'campaignId'),\n      'MessagingServiceSid': _.get(opts, 'messagingServiceSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExternalCampaignInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.ExternalCampaignList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExternalCampaignListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExternalCampaignListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExternalCampaignListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExternalCampaignPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ExternalCampaignPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExternalCampaignSolution} solution - Path solution\n *\n * @returns ExternalCampaignPage\n */\n/* jshint ignore:end */\nExternalCampaignPage = function ExternalCampaignPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExternalCampaignPage.prototype, Page.prototype);\nExternalCampaignPage.prototype.constructor = ExternalCampaignPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExternalCampaignInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.ExternalCampaignPage#\n *\n * @param {ExternalCampaignPayload} payload - Payload response from the API\n *\n * @returns ExternalCampaignInstance\n */\n/* jshint ignore:end */\nExternalCampaignPage.prototype.getInstance = function getInstance(payload) {\n  return new ExternalCampaignInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ExternalCampaignPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExternalCampaignPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExternalCampaignPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExternalCampaignContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ExternalCampaignInstance\n *\n * @property {string} sid -\n *          The unique string that identifies a US A2P Compliance resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} campaignId - ID of the preregistered campaign.\n * @property {string} messagingServiceSid -\n *          The SID of the Messaging Service the resource is associated with\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n *\n * @param {V1} version - Version of the resource\n * @param {ExternalCampaignPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nExternalCampaignInstance = function ExternalCampaignInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.campaignId = payload.campaign_id; // jshint ignore:line\n  this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ExternalCampaignInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExternalCampaignInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExternalCampaignInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExternalCampaignList: ExternalCampaignList,\n  ExternalCampaignPage: ExternalCampaignPage,\n  ExternalCampaignInstance: ExternalCampaignInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AlphaSenderList;\nvar AlphaSenderPage;\nvar AlphaSenderInstance;\nvar AlphaSenderContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AlphaSenderList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.AlphaSenderList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nAlphaSenderList = function AlphaSenderList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function alphaSenders\n   * @memberof Twilio.Messaging.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext.AlphaSenderContext}\n   */\n  /* jshint ignore:end */\n  function AlphaSenderListInstance(sid) {\n    return AlphaSenderListInstance.get(sid);\n  }\n\n  AlphaSenderListInstance._version = version;\n  // Path Solution\n  AlphaSenderListInstance._solution = {serviceSid: serviceSid};\n  AlphaSenderListInstance._uri = `/Services/${serviceSid}/AlphaSenders`;\n  /* jshint ignore:start */\n  /**\n   * create a AlphaSenderInstance\n   *\n   * @function create\n   * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.alphaSender - The Alphanumeric Sender ID string\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AlphaSenderInstance\n   */\n  /* jshint ignore:end */\n  AlphaSenderListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['alphaSender'])) {\n      throw new Error('Required parameter \"opts[\\'alphaSender\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'AlphaSender': _.get(opts, 'alphaSender')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AlphaSenderInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams AlphaSenderInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AlphaSenderListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AlphaSenderInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AlphaSenderListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AlphaSenderInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AlphaSenderListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AlphaSenderPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AlphaSenderInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AlphaSenderListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AlphaSenderPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a alpha_sender\n   *\n   * @function get\n   * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext.AlphaSenderContext}\n   */\n  /* jshint ignore:end */\n  AlphaSenderListInstance.get = function get(sid) {\n    return new AlphaSenderContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AlphaSenderListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AlphaSenderListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AlphaSenderListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AlphaSenderPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.AlphaSenderPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AlphaSenderSolution} solution - Path solution\n *\n * @returns AlphaSenderPage\n */\n/* jshint ignore:end */\nAlphaSenderPage = function AlphaSenderPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AlphaSenderPage.prototype, Page.prototype);\nAlphaSenderPage.prototype.constructor = AlphaSenderPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AlphaSenderInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderPage#\n *\n * @param {AlphaSenderPayload} payload - Payload response from the API\n *\n * @returns AlphaSenderInstance\n */\n/* jshint ignore:end */\nAlphaSenderPage.prototype.getInstance = function getInstance(payload) {\n  return new AlphaSenderInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAlphaSenderPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAlphaSenderPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AlphaSenderContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.AlphaSenderInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} alphaSender - The Alphanumeric Sender ID string\n * @property {string} capabilities -\n *          An array of values that describe whether the number can receive calls or messages\n * @property {string} url - The absolute URL of the AlphaSender resource\n *\n * @param {V1} version - Version of the resource\n * @param {AlphaSenderPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nAlphaSenderInstance = function AlphaSenderInstance(version, payload, serviceSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.alphaSender = payload.alpha_sender; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AlphaSenderInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AlphaSenderContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AlphaSenderInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AlphaSenderInstance\n */\n/* jshint ignore:end */\nAlphaSenderInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AlphaSenderInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AlphaSenderInstance\n */\n/* jshint ignore:end */\nAlphaSenderInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAlphaSenderInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAlphaSenderInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AlphaSenderContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.AlphaSenderContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid -\n *          The SID of the Messaging Service to fetch the resource from\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nAlphaSenderContext = function AlphaSenderContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/AlphaSenders/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AlphaSenderInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AlphaSenderInstance\n */\n/* jshint ignore:end */\nAlphaSenderContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AlphaSenderInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AlphaSenderInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AlphaSenderInstance\n */\n/* jshint ignore:end */\nAlphaSenderContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.AlphaSenderContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAlphaSenderContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAlphaSenderContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AlphaSenderList: AlphaSenderList,\n  AlphaSenderPage: AlphaSenderPage,\n  AlphaSenderInstance: AlphaSenderInstance,\n  AlphaSenderContext: AlphaSenderContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar PhoneNumberList;\nvar PhoneNumberPage;\nvar PhoneNumberInstance;\nvar PhoneNumberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.PhoneNumberList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nPhoneNumberList = function PhoneNumberList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function phoneNumbers\n   * @memberof Twilio.Messaging.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext.PhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  function PhoneNumberListInstance(sid) {\n    return PhoneNumberListInstance.get(sid);\n  }\n\n  PhoneNumberListInstance._version = version;\n  // Path Solution\n  PhoneNumberListInstance._solution = {serviceSid: serviceSid};\n  PhoneNumberListInstance._uri = `/Services/${serviceSid}/PhoneNumbers`;\n  /* jshint ignore:start */\n  /**\n   * create a PhoneNumberInstance\n   *\n   * @function create\n   * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.phoneNumberSid -\n   *          The SID of the Phone Number being added to the Service\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed PhoneNumberInstance\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['phoneNumberSid'])) {\n      throw new Error('Required parameter \"opts[\\'phoneNumberSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'PhoneNumberSid': _.get(opts, 'phoneNumberSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PhoneNumberInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams PhoneNumberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists PhoneNumberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of PhoneNumberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of PhoneNumberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a phone_number\n   *\n   * @function get\n   * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext.PhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.get = function get(sid) {\n    return new PhoneNumberContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PhoneNumberListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PhoneNumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.PhoneNumberPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PhoneNumberSolution} solution - Path solution\n *\n * @returns PhoneNumberPage\n */\n/* jshint ignore:end */\nPhoneNumberPage = function PhoneNumberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PhoneNumberPage.prototype, Page.prototype);\nPhoneNumberPage.prototype.constructor = PhoneNumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PhoneNumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberPage#\n *\n * @param {PhoneNumberPayload} payload - Payload response from the API\n *\n * @returns PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new PhoneNumberInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.PhoneNumberInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} countryCode - The 2-character ISO Country Code of the number\n * @property {string} capabilities -\n *          An array of values that describe whether the number can receive calls or messages\n * @property {string} url - The absolute URL of the PhoneNumber resource\n *\n * @param {V1} version - Version of the resource\n * @param {PhoneNumberPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nPhoneNumberInstance = function PhoneNumberInstance(version, payload, serviceSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.countryCode = payload.country_code; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(PhoneNumberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PhoneNumberContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a PhoneNumberInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.PhoneNumberContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nPhoneNumberContext = function PhoneNumberContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/PhoneNumbers/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a PhoneNumberInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PhoneNumberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.PhoneNumberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPhoneNumberContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PhoneNumberList: PhoneNumberList,\n  PhoneNumberPage: PhoneNumberPage,\n  PhoneNumberInstance: PhoneNumberInstance,\n  PhoneNumberContext: PhoneNumberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ShortCodeList;\nvar ShortCodePage;\nvar ShortCodeInstance;\nvar ShortCodeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodeList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.ShortCodeList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nShortCodeList = function ShortCodeList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function shortCodes\n   * @memberof Twilio.Messaging.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext.ShortCodeContext}\n   */\n  /* jshint ignore:end */\n  function ShortCodeListInstance(sid) {\n    return ShortCodeListInstance.get(sid);\n  }\n\n  ShortCodeListInstance._version = version;\n  // Path Solution\n  ShortCodeListInstance._solution = {serviceSid: serviceSid};\n  ShortCodeListInstance._uri = `/Services/${serviceSid}/ShortCodes`;\n  /* jshint ignore:start */\n  /**\n   * create a ShortCodeInstance\n   *\n   * @function create\n   * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.shortCodeSid -\n   *          The SID of the ShortCode being added to the Service\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ShortCodeInstance\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['shortCodeSid'])) {\n      throw new Error('Required parameter \"opts[\\'shortCodeSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'ShortCodeSid': _.get(opts, 'shortCodeSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ShortCodeInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ShortCodeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ShortCodeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ShortCodeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ShortCodePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ShortCodeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ShortCodePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a short_code\n   *\n   * @function get\n   * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext.ShortCodeContext}\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.get = function get(sid) {\n    return new ShortCodeContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ShortCodeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ShortCodeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.ShortCodePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ShortCodeSolution} solution - Path solution\n *\n * @returns ShortCodePage\n */\n/* jshint ignore:end */\nShortCodePage = function ShortCodePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ShortCodePage.prototype, Page.prototype);\nShortCodePage.prototype.constructor = ShortCodePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ShortCodeInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodePage#\n *\n * @param {ShortCodePayload} payload - Payload response from the API\n *\n * @returns ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodePage.prototype.getInstance = function getInstance(payload) {\n  return new ShortCodeInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nShortCodePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nShortCodePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodeContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.ShortCodeInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} shortCode - The E.164 format of the short code\n * @property {string} countryCode - The 2-character ISO Country Code of the number\n * @property {string} capabilities -\n *          An array of values that describe whether the number can receive calls or messages\n * @property {string} url - The absolute URL of the ShortCode resource\n *\n * @param {V1} version - Version of the resource\n * @param {ShortCodePayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nShortCodeInstance = function ShortCodeInstance(version, payload, serviceSid,\n                                                sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.shortCode = payload.short_code; // jshint ignore:line\n  this.countryCode = payload.country_code; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ShortCodeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ShortCodeContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a ShortCodeInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ShortCodeInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nShortCodeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodeContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.ShortCodeContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nShortCodeContext = function ShortCodeContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/ShortCodes/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ShortCodeInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ShortCodeInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ShortCodeInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.ShortCodeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nShortCodeContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ShortCodeList: ShortCodeList,\n  ShortCodePage: ShortCodePage,\n  ShortCodeInstance: ShortCodeInstance,\n  ShortCodeContext: ShortCodeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UsAppToPersonList;\nvar UsAppToPersonPage;\nvar UsAppToPersonInstance;\nvar UsAppToPersonContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UsAppToPersonList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.UsAppToPersonList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n * @param {string} messagingServiceSid -\n *          The SID of the Messaging Service the resource is associated with\n */\n/* jshint ignore:end */\nUsAppToPersonList = function UsAppToPersonList(version, messagingServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function usAppToPerson\n   * @memberof Twilio.Messaging.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext}\n   */\n  /* jshint ignore:end */\n  function UsAppToPersonListInstance(sid) {\n    return UsAppToPersonListInstance.get(sid);\n  }\n\n  UsAppToPersonListInstance._version = version;\n  // Path Solution\n  UsAppToPersonListInstance._solution = {messagingServiceSid: messagingServiceSid};\n  UsAppToPersonListInstance._uri = `/Services/${messagingServiceSid}/Compliance/Usa2p`;\n  /* jshint ignore:start */\n  /**\n   * create a UsAppToPersonInstance\n   *\n   * @function create\n   * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.brandRegistrationSid - A2P Brand Registration SID\n   * @param {string} opts.description -\n   *          A short description of what this SMS campaign does\n   * @param {string|list} opts.messageSamples - Message samples\n   * @param {string} opts.usAppToPersonUsecase - A2P Campaign Use Case.\n   * @param {boolean} opts.hasEmbeddedLinks -\n   *          Indicates that this SMS campaign will send messages that contain links\n   * @param {boolean} opts.hasEmbeddedPhone -\n   *          Indicates that this SMS campaign will send messages that contain phone numbers\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed UsAppToPersonInstance\n   */\n  /* jshint ignore:end */\n  UsAppToPersonListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['brandRegistrationSid'])) {\n      throw new Error('Required parameter \"opts[\\'brandRegistrationSid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['description'])) {\n      throw new Error('Required parameter \"opts[\\'description\\']\" missing.');\n    }\n    if (_.isUndefined(opts['messageSamples'])) {\n      throw new Error('Required parameter \"opts[\\'messageSamples\\']\" missing.');\n    }\n    if (_.isUndefined(opts['usAppToPersonUsecase'])) {\n      throw new Error('Required parameter \"opts[\\'usAppToPersonUsecase\\']\" missing.');\n    }\n    if (_.isUndefined(opts['hasEmbeddedLinks'])) {\n      throw new Error('Required parameter \"opts[\\'hasEmbeddedLinks\\']\" missing.');\n    }\n    if (_.isUndefined(opts['hasEmbeddedPhone'])) {\n      throw new Error('Required parameter \"opts[\\'hasEmbeddedPhone\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'BrandRegistrationSid': _.get(opts, 'brandRegistrationSid'),\n      'Description': _.get(opts, 'description'),\n      'MessageSamples': serialize.map(_.get(opts, 'messageSamples'), function(e) { return e; }),\n      'UsAppToPersonUsecase': _.get(opts, 'usAppToPersonUsecase'),\n      'HasEmbeddedLinks': serialize.bool(_.get(opts, 'hasEmbeddedLinks')),\n      'HasEmbeddedPhone': serialize.bool(_.get(opts, 'hasEmbeddedPhone'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsAppToPersonInstance(\n        this._version,\n        payload,\n        this._solution.messagingServiceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams UsAppToPersonInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UsAppToPersonListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UsAppToPersonInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsAppToPersonListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UsAppToPersonInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsAppToPersonListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsAppToPersonPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UsAppToPersonInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsAppToPersonListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsAppToPersonPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a us_app_to_person\n   *\n   * @function get\n   * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList#\n   *\n   * @param {string} sid -\n   *          The SID that identifies the US A2P Compliance resource to fetch\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext}\n   */\n  /* jshint ignore:end */\n  UsAppToPersonListInstance.get = function get(sid) {\n    return new UsAppToPersonContext(this._version, this._solution.messagingServiceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UsAppToPersonListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UsAppToPersonListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UsAppToPersonListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsAppToPersonPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.UsAppToPersonPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UsAppToPersonSolution} solution - Path solution\n *\n * @returns UsAppToPersonPage\n */\n/* jshint ignore:end */\nUsAppToPersonPage = function UsAppToPersonPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UsAppToPersonPage.prototype, Page.prototype);\nUsAppToPersonPage.prototype.constructor = UsAppToPersonPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UsAppToPersonInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonPage#\n *\n * @param {UsAppToPersonPayload} payload - Payload response from the API\n *\n * @returns UsAppToPersonInstance\n */\n/* jshint ignore:end */\nUsAppToPersonPage.prototype.getInstance = function getInstance(payload) {\n  return new UsAppToPersonInstance(this._version, payload, this._solution.messagingServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsAppToPersonPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsAppToPersonPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsAppToPersonContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.UsAppToPersonInstance\n *\n * @property {string} sid -\n *          The unique string that identifies a US A2P Compliance resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} brandRegistrationSid - A2P Brand Registration SID\n * @property {string} messagingServiceSid -\n *          The SID of the Messaging Service the resource is associated with\n * @property {string} description -\n *          A short description of what this SMS campaign does\n * @property {string} messageSamples - Message samples\n * @property {string} usAppToPersonUsecase - A2P Campaign Use Case.\n * @property {boolean} hasEmbeddedLinks -\n *          Indicate that this SMS campaign will send messages that contain links\n * @property {boolean} hasEmbeddedPhone -\n *          Indicates that this SMS campaign will send messages that contain phone numbers\n * @property {string} campaignStatus - Campaign status\n * @property {string} campaignId - The Campaign Registry (TCR) Campaign ID.\n * @property {boolean} isExternallyRegistered -\n *          Indicates whether the campaign was registered externally or not\n * @property {object} rateLimits -\n *          Rate limit and/or classification set by each carrier\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the US App to Person resource\n * @property {boolean} mock -\n *          A boolean that specifies whether campaign is a mock or not.\n *\n * @param {V1} version - Version of the resource\n * @param {UsAppToPersonPayload} payload - The instance payload\n * @param {sid} messagingServiceSid -\n *          The SID of the Messaging Service the resource is associated with\n * @param {sid} sid -\n *          The SID that identifies the US A2P Compliance resource to fetch\n */\n/* jshint ignore:end */\nUsAppToPersonInstance = function UsAppToPersonInstance(version, payload,\n                                                        messagingServiceSid,\n                                                        sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.brandRegistrationSid = payload.brand_registration_sid; // jshint ignore:line\n  this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.messageSamples = payload.message_samples; // jshint ignore:line\n  this.usAppToPersonUsecase = payload.us_app_to_person_usecase; // jshint ignore:line\n  this.hasEmbeddedLinks = payload.has_embedded_links; // jshint ignore:line\n  this.hasEmbeddedPhone = payload.has_embedded_phone; // jshint ignore:line\n  this.campaignStatus = payload.campaign_status; // jshint ignore:line\n  this.campaignId = payload.campaign_id; // jshint ignore:line\n  this.isExternallyRegistered = payload.is_externally_registered; // jshint ignore:line\n  this.rateLimits = payload.rate_limits; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.mock = payload.mock; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {messagingServiceSid: messagingServiceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(UsAppToPersonInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UsAppToPersonContext(\n          this._version,\n          this._solution.messagingServiceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a UsAppToPersonInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UsAppToPersonInstance\n */\n/* jshint ignore:end */\nUsAppToPersonInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UsAppToPersonInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UsAppToPersonInstance\n */\n/* jshint ignore:end */\nUsAppToPersonInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsAppToPersonInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsAppToPersonInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsAppToPersonContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} messagingServiceSid -\n *          The SID of the Messaging Service to fetch the resource from\n * @param {sid} sid -\n *          The SID that identifies the US A2P Compliance resource to fetch\n */\n/* jshint ignore:end */\nUsAppToPersonContext = function UsAppToPersonContext(version,\n                                                      messagingServiceSid, sid)\n                                                      {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {messagingServiceSid: messagingServiceSid, sid: sid, };\n  this._uri = `/Services/${messagingServiceSid}/Compliance/Usa2p/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a UsAppToPersonInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UsAppToPersonInstance\n */\n/* jshint ignore:end */\nUsAppToPersonContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UsAppToPersonInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UsAppToPersonInstance\n */\n/* jshint ignore:end */\nUsAppToPersonContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UsAppToPersonInstance(\n      this._version,\n      payload,\n      this._solution.messagingServiceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsAppToPersonContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUsAppToPersonContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UsAppToPersonList: UsAppToPersonList,\n  UsAppToPersonPage: UsAppToPersonPage,\n  UsAppToPersonInstance: UsAppToPersonInstance,\n  UsAppToPersonContext: UsAppToPersonContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UsAppToPersonUsecaseList;\nvar UsAppToPersonUsecasePage;\nvar UsAppToPersonUsecaseInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the UsAppToPersonUsecaseList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecaseList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n * @param {string} messagingServiceSid -\n *          The unique string that identifies the resource\n */\n/* jshint ignore:end */\nUsAppToPersonUsecaseList = function UsAppToPersonUsecaseList(version,\n    messagingServiceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function usAppToPersonUsecases\n   * @memberof Twilio.Messaging.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecaseContext}\n   */\n  /* jshint ignore:end */\n  function UsAppToPersonUsecaseListInstance(sid) {\n    return UsAppToPersonUsecaseListInstance.get(sid);\n  }\n\n  UsAppToPersonUsecaseListInstance._version = version;\n  // Path Solution\n  UsAppToPersonUsecaseListInstance._solution = {messagingServiceSid: messagingServiceSid};\n  UsAppToPersonUsecaseListInstance._uri = `/Services/${messagingServiceSid}/Compliance/Usa2p/Usecases`;\n  /* jshint ignore:start */\n  /**\n   * fetch a UsAppToPersonUsecaseInstance\n   *\n   * @function fetch\n   * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecaseList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.brandRegistrationSid] - A2P Brand Registration SID\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed UsAppToPersonUsecaseInstance\n   */\n  /* jshint ignore:end */\n  UsAppToPersonUsecaseListInstance.fetch = function fetch(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'BrandRegistrationSid': _.get(opts, 'brandRegistrationSid')});\n\n    var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsAppToPersonUsecaseInstance(\n        this._version,\n        payload,\n        this._solution.messagingServiceSid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecaseList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UsAppToPersonUsecaseListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UsAppToPersonUsecaseListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UsAppToPersonUsecaseListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsAppToPersonUsecasePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecasePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UsAppToPersonUsecaseSolution} solution - Path solution\n *\n * @returns UsAppToPersonUsecasePage\n */\n/* jshint ignore:end */\nUsAppToPersonUsecasePage = function UsAppToPersonUsecasePage(version, response,\n    solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UsAppToPersonUsecasePage.prototype, Page.prototype);\nUsAppToPersonUsecasePage.prototype.constructor = UsAppToPersonUsecasePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UsAppToPersonUsecaseInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecasePage#\n *\n * @param {UsAppToPersonUsecasePayload} payload - Payload response from the API\n *\n * @returns UsAppToPersonUsecaseInstance\n */\n/* jshint ignore:end */\nUsAppToPersonUsecasePage.prototype.getInstance = function getInstance(payload) {\n  return new UsAppToPersonUsecaseInstance(this._version, payload, this._solution.messagingServiceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecasePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsAppToPersonUsecasePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsAppToPersonUsecasePage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsAppToPersonUsecaseContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecaseInstance\n *\n * @property {object} usAppToPersonUsecases - Human readable A2P Use Case details\n *\n * @param {V1} version - Version of the resource\n * @param {UsAppToPersonUsecasePayload} payload - The instance payload\n * @param {sid} messagingServiceSid -\n *          The unique string that identifies the resource\n */\n/* jshint ignore:end */\nUsAppToPersonUsecaseInstance = function UsAppToPersonUsecaseInstance(version,\n    payload, messagingServiceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.usAppToPersonUsecases = payload.us_app_to_person_usecases; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {messagingServiceSid: messagingServiceSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecaseInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsAppToPersonUsecaseInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsAppToPersonUsecaseInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UsAppToPersonUsecaseList: UsAppToPersonUsecaseList,\n  UsAppToPersonUsecasePage: UsAppToPersonUsecasePage,\n  UsAppToPersonUsecaseInstance: UsAppToPersonUsecaseInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AlphaSenderList = require('./service/alphaSender').AlphaSenderList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar PhoneNumberList = require('./service/phoneNumber').PhoneNumberList;\nvar ShortCodeList = require('./service/shortCode').ShortCodeList;\nvar UsAppToPersonList = require('./service/usAppToPerson').UsAppToPersonList;\nvar UsAppToPersonUsecaseList = require(\n    './service/usAppToPersonUsecase').UsAppToPersonUsecaseList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Messaging.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Messaging.V1.ServiceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the resource\n   * @param {string} [opts.inboundRequestUrl] -\n   *          The URL we call using inbound_method when a message is received by any phone number or short code in the Service. This field will be overridden if the `use_inbound_webhook_on_number` field is enabled.\n   * @param {string} [opts.inboundMethod] -\n   *          The HTTP method we should use to call inbound_request_url\n   * @param {string} [opts.fallbackUrl] -\n   *          The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. This field will be overridden if the `use_inbound_webhook_on_number` field is enabled.\n   * @param {string} [opts.fallbackMethod] -\n   *          The HTTP method we should use to call fallback_url\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to pass status updates about message delivery\n   * @param {boolean} [opts.stickySender] -\n   *          Whether to enable Sticky Sender on the Service instance\n   * @param {boolean} [opts.mmsConverter] -\n   *          Whether to enable the MMS Converter for messages sent through the Service instance\n   * @param {boolean} [opts.smartEncoding] -\n   *          Whether to enable Encoding for messages sent through the Service instance\n   * @param {service.scan_message_content} [opts.scanMessageContent] - Reserved\n   * @param {boolean} [opts.fallbackToLongCode] -\n   *          Whether to enable Fallback to Long Code for messages sent through the Service instance\n   * @param {boolean} [opts.areaCodeGeomatch] -\n   *          Whether to enable Area Code Geomatch on the Service Instance\n   * @param {number} [opts.validityPeriod] -\n   *          How long, in seconds, messages sent from the Service are valid\n   * @param {boolean} [opts.synchronousValidation] - Reserved\n   * @param {string} [opts.usecase] -\n   *          A string describing the scenario in which the Messaging Service will be used\n   * @param {boolean} [opts.useInboundWebhookOnNumber] -\n   *          If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'InboundRequestUrl': _.get(opts, 'inboundRequestUrl'),\n      'InboundMethod': _.get(opts, 'inboundMethod'),\n      'FallbackUrl': _.get(opts, 'fallbackUrl'),\n      'FallbackMethod': _.get(opts, 'fallbackMethod'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StickySender': serialize.bool(_.get(opts, 'stickySender')),\n      'MmsConverter': serialize.bool(_.get(opts, 'mmsConverter')),\n      'SmartEncoding': serialize.bool(_.get(opts, 'smartEncoding')),\n      'ScanMessageContent': _.get(opts, 'scanMessageContent'),\n      'FallbackToLongCode': serialize.bool(_.get(opts, 'fallbackToLongCode')),\n      'AreaCodeGeomatch': serialize.bool(_.get(opts, 'areaCodeGeomatch')),\n      'ValidityPeriod': _.get(opts, 'validityPeriod'),\n      'SynchronousValidation': serialize.bool(_.get(opts, 'synchronousValidation')),\n      'Usecase': _.get(opts, 'usecase'),\n      'UseInboundWebhookOnNumber': serialize.bool(_.get(opts, 'useInboundWebhookOnNumber'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Messaging.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Messaging.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Messaging.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Messaging.V1.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Messaging.V1.ServiceList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Messaging.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServicePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} inboundRequestUrl -\n *          The URL we call using inbound_method when a message is received by any phone number or short code in the Service. This field will be overridden if the `use_inbound_webhook_on_number` field is enabled.\n * @property {string} inboundMethod -\n *          The HTTP method we use to call inbound_request_url\n * @property {string} fallbackUrl -\n *          The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. This field will be overridden if the `use_inbound_webhook_on_number` field is enabled.\n * @property {string} fallbackMethod - The HTTP method we use to call fallback_url\n * @property {string} statusCallback -\n *          The URL we call to pass status updates about message delivery\n * @property {boolean} stickySender -\n *          Whether to enable Sticky Sender on the Service instance\n * @property {boolean} mmsConverter -\n *          Whether to enable the MMS Converter for messages sent through the Service instance\n * @property {boolean} smartEncoding -\n *          Whether to enable Encoding for messages sent through the Service instance\n * @property {service.scan_message_content} scanMessageContent - Reserved\n * @property {boolean} fallbackToLongCode -\n *          Whether to enable Fallback to Long Code for messages sent through the Service instance\n * @property {boolean} areaCodeGeomatch -\n *          Whether to enable Area Code Geomatch on the Service Instance\n * @property {boolean} synchronousValidation - Reserved\n * @property {number} validityPeriod -\n *          How long, in seconds, messages sent from the Service are valid\n * @property {string} url - The absolute URL of the Service resource\n * @property {string} links - The absolute URLs of related resources\n * @property {string} usecase -\n *          A string describing the scenario in which the Messaging Service will be used\n * @property {boolean} usAppToPersonRegistered -\n *          Whether US A2P campaign is registered for this Service.\n * @property {boolean} useInboundWebhookOnNumber -\n *          If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.\n *\n * @param {V1} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.inboundRequestUrl = payload.inbound_request_url; // jshint ignore:line\n  this.inboundMethod = payload.inbound_method; // jshint ignore:line\n  this.fallbackUrl = payload.fallback_url; // jshint ignore:line\n  this.fallbackMethod = payload.fallback_method; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.stickySender = payload.sticky_sender; // jshint ignore:line\n  this.mmsConverter = payload.mms_converter; // jshint ignore:line\n  this.smartEncoding = payload.smart_encoding; // jshint ignore:line\n  this.scanMessageContent = payload.scan_message_content; // jshint ignore:line\n  this.fallbackToLongCode = payload.fallback_to_long_code; // jshint ignore:line\n  this.areaCodeGeomatch = payload.area_code_geomatch; // jshint ignore:line\n  this.synchronousValidation = payload.synchronous_validation; // jshint ignore:line\n  this.validityPeriod = deserialize.integer(payload.validity_period); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.usecase = payload.usecase; // jshint ignore:line\n  this.usAppToPersonRegistered = payload.us_app_to_person_registered; // jshint ignore:line\n  this.useInboundWebhookOnNumber = payload.use_inbound_webhook_on_number; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Messaging.V1.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.inboundRequestUrl] -\n *          The URL we call using inbound_method when a message is received by any phone number or short code in the Service. This field will be overridden if the `use_inbound_webhook_on_number` field is enabled.\n * @param {string} [opts.inboundMethod] -\n *          The HTTP method we should use to call inbound_request_url\n * @param {string} [opts.fallbackUrl] -\n *          The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. This field will be overridden if the `use_inbound_webhook_on_number` field is enabled.\n * @param {string} [opts.fallbackMethod] -\n *          The HTTP method we should use to call fallback_url\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to pass status updates about message delivery\n * @param {boolean} [opts.stickySender] -\n *          Whether to enable Sticky Sender on the Service instance\n * @param {boolean} [opts.mmsConverter] -\n *          Whether to enable the MMS Converter for messages sent through the Service instance\n * @param {boolean} [opts.smartEncoding] -\n *          Whether to enable Encoding for messages sent through the Service instance\n * @param {service.scan_message_content} [opts.scanMessageContent] - Reserved\n * @param {boolean} [opts.fallbackToLongCode] -\n *          Whether to enable Fallback to Long Code for messages sent through the Service instance\n * @param {boolean} [opts.areaCodeGeomatch] -\n *          Whether to enable Area Code Geomatch on the Service Instance\n * @param {number} [opts.validityPeriod] -\n *          How long, in seconds, messages sent from the Service are valid\n * @param {boolean} [opts.synchronousValidation] - Reserved\n * @param {string} [opts.usecase] -\n *          A string describing the scenario in which the Messaging Service will be used\n * @param {boolean} [opts.useInboundWebhookOnNumber] -\n *          If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the phoneNumbers\n *\n * @function phoneNumbers\n * @memberof Twilio.Messaging.V1.ServiceInstance#\n *\n * @returns {Twilio.Messaging.V1.ServiceContext.PhoneNumberList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.phoneNumbers = function phoneNumbers() {\n  return this._proxy.phoneNumbers;\n};\n\n/* jshint ignore:start */\n/**\n * Access the shortCodes\n *\n * @function shortCodes\n * @memberof Twilio.Messaging.V1.ServiceInstance#\n *\n * @returns {Twilio.Messaging.V1.ServiceContext.ShortCodeList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.shortCodes = function shortCodes() {\n  return this._proxy.shortCodes;\n};\n\n/* jshint ignore:start */\n/**\n * Access the alphaSenders\n *\n * @function alphaSenders\n * @memberof Twilio.Messaging.V1.ServiceInstance#\n *\n * @returns {Twilio.Messaging.V1.ServiceContext.AlphaSenderList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.alphaSenders = function alphaSenders() {\n  return this._proxy.alphaSenders;\n};\n\n/* jshint ignore:start */\n/**\n * Access the usAppToPerson\n *\n * @function usAppToPerson\n * @memberof Twilio.Messaging.V1.ServiceInstance#\n *\n * @returns {Twilio.Messaging.V1.ServiceContext.UsAppToPersonList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.usAppToPerson = function usAppToPerson() {\n  return this._proxy.usAppToPerson;\n};\n\n/* jshint ignore:start */\n/**\n * Access the usAppToPersonUsecases\n *\n * @function usAppToPersonUsecases\n * @memberof Twilio.Messaging.V1.ServiceInstance#\n *\n * @returns {Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecaseList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.usAppToPersonUsecases = function\n    usAppToPersonUsecases() {\n  return this._proxy.usAppToPersonUsecases;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.ServiceContext\n *\n * @property {Twilio.Messaging.V1.ServiceContext.PhoneNumberList} phoneNumbers -\n *          phoneNumbers resource\n * @property {Twilio.Messaging.V1.ServiceContext.ShortCodeList} shortCodes -\n *          shortCodes resource\n * @property {Twilio.Messaging.V1.ServiceContext.AlphaSenderList} alphaSenders -\n *          alphaSenders resource\n * @property {Twilio.Messaging.V1.ServiceContext.UsAppToPersonList} usAppToPerson -\n *          usAppToPerson resource\n * @property {Twilio.Messaging.V1.ServiceContext.UsAppToPersonUsecaseList} usAppToPersonUsecases -\n *          usAppToPersonUsecases resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._phoneNumbers = undefined;\n  this._shortCodes = undefined;\n  this._alphaSenders = undefined;\n  this._usAppToPerson = undefined;\n  this._usAppToPersonUsecases = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Messaging.V1.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.inboundRequestUrl] -\n *          The URL we call using inbound_method when a message is received by any phone number or short code in the Service. This field will be overridden if the `use_inbound_webhook_on_number` field is enabled.\n * @param {string} [opts.inboundMethod] -\n *          The HTTP method we should use to call inbound_request_url\n * @param {string} [opts.fallbackUrl] -\n *          The URL that we call using fallback_method if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. This field will be overridden if the `use_inbound_webhook_on_number` field is enabled.\n * @param {string} [opts.fallbackMethod] -\n *          The HTTP method we should use to call fallback_url\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to pass status updates about message delivery\n * @param {boolean} [opts.stickySender] -\n *          Whether to enable Sticky Sender on the Service instance\n * @param {boolean} [opts.mmsConverter] -\n *          Whether to enable the MMS Converter for messages sent through the Service instance\n * @param {boolean} [opts.smartEncoding] -\n *          Whether to enable Encoding for messages sent through the Service instance\n * @param {service.scan_message_content} [opts.scanMessageContent] - Reserved\n * @param {boolean} [opts.fallbackToLongCode] -\n *          Whether to enable Fallback to Long Code for messages sent through the Service instance\n * @param {boolean} [opts.areaCodeGeomatch] -\n *          Whether to enable Area Code Geomatch on the Service Instance\n * @param {number} [opts.validityPeriod] -\n *          How long, in seconds, messages sent from the Service are valid\n * @param {boolean} [opts.synchronousValidation] - Reserved\n * @param {string} [opts.usecase] -\n *          A string describing the scenario in which the Messaging Service will be used\n * @param {boolean} [opts.useInboundWebhookOnNumber] -\n *          If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'InboundRequestUrl': _.get(opts, 'inboundRequestUrl'),\n    'InboundMethod': _.get(opts, 'inboundMethod'),\n    'FallbackUrl': _.get(opts, 'fallbackUrl'),\n    'FallbackMethod': _.get(opts, 'fallbackMethod'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'StickySender': serialize.bool(_.get(opts, 'stickySender')),\n    'MmsConverter': serialize.bool(_.get(opts, 'mmsConverter')),\n    'SmartEncoding': serialize.bool(_.get(opts, 'smartEncoding')),\n    'ScanMessageContent': _.get(opts, 'scanMessageContent'),\n    'FallbackToLongCode': serialize.bool(_.get(opts, 'fallbackToLongCode')),\n    'AreaCodeGeomatch': serialize.bool(_.get(opts, 'areaCodeGeomatch')),\n    'ValidityPeriod': _.get(opts, 'validityPeriod'),\n    'SynchronousValidation': serialize.bool(_.get(opts, 'synchronousValidation')),\n    'Usecase': _.get(opts, 'usecase'),\n    'UseInboundWebhookOnNumber': serialize.bool(_.get(opts, 'useInboundWebhookOnNumber'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Messaging.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Messaging.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'phoneNumbers', {\n    get: function() {\n      if (!this._phoneNumbers) {\n        this._phoneNumbers = new PhoneNumberList(this._version, this._solution.sid);\n      }\n      return this._phoneNumbers;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'shortCodes', {\n    get: function() {\n      if (!this._shortCodes) {\n        this._shortCodes = new ShortCodeList(this._version, this._solution.sid);\n      }\n      return this._shortCodes;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'alphaSenders', {\n    get: function() {\n      if (!this._alphaSenders) {\n        this._alphaSenders = new AlphaSenderList(this._version, this._solution.sid);\n      }\n      return this._alphaSenders;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'usAppToPerson', {\n    get: function() {\n      if (!this._usAppToPerson) {\n        this._usAppToPerson = new UsAppToPersonList(this._version, this._solution.sid);\n      }\n      return this._usAppToPerson;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'usAppToPersonUsecases', {\n    get: function() {\n      if (!this._usAppToPersonUsecases) {\n        this._usAppToPersonUsecases = new UsAppToPersonUsecaseList(this._version, this._solution.sid);\n      }\n      return this._usAppToPersonUsecases;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar UsecaseList;\nvar UsecasePage;\nvar UsecaseInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the UsecaseList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.UsecaseList\n *\n * @param {Twilio.Messaging.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nUsecaseList = function UsecaseList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function usecases\n   * @memberof Twilio.Messaging.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Messaging.V1.UsecaseContext}\n   */\n  /* jshint ignore:end */\n  function UsecaseListInstance(sid) {\n    return UsecaseListInstance.get(sid);\n  }\n\n  UsecaseListInstance._version = version;\n  // Path Solution\n  UsecaseListInstance._solution = {};\n  UsecaseListInstance._uri = `/Services/Usecases`;\n  /* jshint ignore:start */\n  /**\n   * fetch a UsecaseInstance\n   *\n   * @function fetch\n   * @memberof Twilio.Messaging.V1.UsecaseList#\n   *\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed UsecaseInstance\n   */\n  /* jshint ignore:end */\n  UsecaseListInstance.fetch = function fetch(callback) {\n    var deferred = Q.defer();\n    var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsecaseInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Messaging.V1.UsecaseList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UsecaseListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UsecaseListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UsecaseListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsecasePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.UsecasePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UsecaseSolution} solution - Path solution\n *\n * @returns UsecasePage\n */\n/* jshint ignore:end */\nUsecasePage = function UsecasePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UsecasePage.prototype, Page.prototype);\nUsecasePage.prototype.constructor = UsecasePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UsecaseInstance\n *\n * @function getInstance\n * @memberof Twilio.Messaging.V1.UsecasePage#\n *\n * @param {UsecasePayload} payload - Payload response from the API\n *\n * @returns UsecaseInstance\n */\n/* jshint ignore:end */\nUsecasePage.prototype.getInstance = function getInstance(payload) {\n  return new UsecaseInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.UsecasePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsecasePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsecasePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsecaseContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Messaging.V1.UsecaseInstance\n *\n * @property {object} usecases - Human readable Messaging Service Use Case details\n *\n * @param {V1} version - Version of the resource\n * @param {UsecasePayload} payload - The instance payload\n */\n/* jshint ignore:end */\nUsecaseInstance = function UsecaseInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.usecases = payload.usecases; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Messaging.V1.UsecaseInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsecaseInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsecaseInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UsecaseList: UsecaseList,\n  UsecasePage: UsecasePage,\n  UsecaseInstance: UsecaseInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar BrandRegistrationList = require(\n    './v1/brandRegistration').BrandRegistrationList;\nvar DeactivationsList = require('./v1/deactivation').DeactivationsList;\nvar ExternalCampaignList = require(\n    './v1/externalCampaign').ExternalCampaignList;\nvar ServiceList = require('./v1/service').ServiceList;\nvar UsecaseList = require('./v1/usecase').UsecaseList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Messaging\n *\n * @constructor Twilio.Messaging.V1\n *\n * @property {Twilio.Messaging.V1.BrandRegistrationList} brandRegistrations -\n *          brandRegistrations resource\n * @property {Twilio.Messaging.V1.DeactivationsList} deactivations -\n *          deactivations resource\n * @property {Twilio.Messaging.V1.ExternalCampaignList} externalCampaign -\n *          externalCampaign resource\n * @property {Twilio.Messaging.V1.ServiceList} services - services resource\n * @property {Twilio.Messaging.V1.UsecaseList} usecases - usecases resource\n *\n * @param {Twilio.Messaging} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._brandRegistrations = undefined;\n  this._deactivations = undefined;\n  this._externalCampaign = undefined;\n  this._services = undefined;\n  this._usecases = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'brandRegistrations', {\n    get: function() {\n      this._brandRegistrations = this._brandRegistrations || new BrandRegistrationList(this);\n      return this._brandRegistrations;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'deactivations', {\n    get: function() {\n      this._deactivations = this._deactivations || new DeactivationsList(this);\n      return this._deactivations;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'externalCampaign', {\n    get: function() {\n      this._externalCampaign = this._externalCampaign || new ExternalCampaignList(this);\n      return this._externalCampaign;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'usecases', {\n    get: function() {\n      this._usecases = this._usecases || new UsecaseList(this);\n      return this._usecases;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./messaging/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize messaging domain\n *\n * @constructor Twilio.Messaging\n *\n * @property {Twilio.Messaging.V1} v1 - v1 version\n * @property {Twilio.Messaging.V1.BrandRegistrationList} brandRegistrations -\n *          brandRegistrations resource\n * @property {Twilio.Messaging.V1.DeactivationsList} deactivations -\n *          deactivations resource\n * @property {Twilio.Messaging.V1.ExternalCampaignList} externalCampaign -\n *          externalCampaign resource\n * @property {Twilio.Messaging.V1.ServiceList} services - services resource\n * @property {Twilio.Messaging.V1.UsecaseList} usecases - usecases resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Messaging(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://messaging.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Messaging.prototype, Domain.prototype);\nMessaging.prototype.constructor = Messaging;\n\nObject.defineProperty(Messaging.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Messaging.prototype,\n  'brandRegistrations', {\n    get: function() {\n      return this.v1.brandRegistrations;\n    }\n});\n\nObject.defineProperty(Messaging.prototype,\n  'deactivations', {\n    get: function() {\n      return this.v1.deactivations;\n    }\n});\n\nObject.defineProperty(Messaging.prototype,\n  'externalCampaign', {\n    get: function() {\n      return this.v1.externalCampaign;\n    }\n});\n\nObject.defineProperty(Messaging.prototype,\n  'services', {\n    get: function() {\n      return this.v1.services;\n    }\n});\n\nObject.defineProperty(Messaging.prototype,\n  'usecases', {\n    get: function() {\n      return this.v1.usecases;\n    }\n});\n\nmodule.exports = Messaging;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar AlertList;\nvar AlertPage;\nvar AlertInstance;\nvar AlertContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AlertList\n *\n * @constructor Twilio.Monitor.V1.AlertList\n *\n * @param {Twilio.Monitor.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nAlertList = function AlertList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function alerts\n   * @memberof Twilio.Monitor.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Monitor.V1.AlertContext}\n   */\n  /* jshint ignore:end */\n  function AlertListInstance(sid) {\n    return AlertListInstance.get(sid);\n  }\n\n  AlertListInstance._version = version;\n  // Path Solution\n  AlertListInstance._solution = {};\n  AlertListInstance._uri = `/Alerts`;\n  /* jshint ignore:start */\n  /**\n   * Streams AlertInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Monitor.V1.AlertList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.logLevel] - Only show alerts for this log-level\n   * @param {Date} [opts.startDate] -\n   *          Only include alerts that occurred on or after this date and time\n   * @param {Date} [opts.endDate] -\n   *          Only include alerts that occurred on or before this date and time\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AlertListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AlertInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Monitor.V1.AlertList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.logLevel] - Only show alerts for this log-level\n   * @param {Date} [opts.startDate] -\n   *          Only include alerts that occurred on or after this date and time\n   * @param {Date} [opts.endDate] -\n   *          Only include alerts that occurred on or before this date and time\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AlertListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AlertInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Monitor.V1.AlertList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.logLevel] - Only show alerts for this log-level\n   * @param {Date} [opts.startDate] -\n   *          Only include alerts that occurred on or after this date and time\n   * @param {Date} [opts.endDate] -\n   *          Only include alerts that occurred on or before this date and time\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AlertListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'LogLevel': _.get(opts, 'logLevel'),\n      'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AlertPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AlertInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Monitor.V1.AlertList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AlertListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AlertPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a alert\n   *\n   * @function get\n   * @memberof Twilio.Monitor.V1.AlertList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Monitor.V1.AlertContext}\n   */\n  /* jshint ignore:end */\n  AlertListInstance.get = function get(sid) {\n    return new AlertContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Monitor.V1.AlertList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AlertListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AlertListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AlertListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AlertPage\n *\n * @constructor Twilio.Monitor.V1.AlertPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AlertSolution} solution - Path solution\n *\n * @returns AlertPage\n */\n/* jshint ignore:end */\nAlertPage = function AlertPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AlertPage.prototype, Page.prototype);\nAlertPage.prototype.constructor = AlertPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AlertInstance\n *\n * @function getInstance\n * @memberof Twilio.Monitor.V1.AlertPage#\n *\n * @param {AlertPayload} payload - Payload response from the API\n *\n * @returns AlertInstance\n */\n/* jshint ignore:end */\nAlertPage.prototype.getInstance = function getInstance(payload) {\n  return new AlertInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Monitor.V1.AlertPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAlertPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAlertPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AlertContext\n *\n * @constructor Twilio.Monitor.V1.AlertInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} alertText - The text of the alert\n * @property {string} apiVersion -\n *          The API version used when the alert was generated\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateGenerated -\n *          The date and time when the alert was generated specified in ISO 8601 format\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} errorCode -\n *          The error code for the condition that generated the alert\n * @property {string} logLevel - The log level\n * @property {string} moreInfo -\n *          The URL of the page in our Error Dictionary with more information about the error condition\n * @property {string} requestMethod -\n *          The method used by the request that generated the alert\n * @property {string} requestUrl - The URL of the request that generated the alert\n * @property {string} requestVariables -\n *          The variables passed in the request that generated the alert\n * @property {string} resourceSid -\n *          The SID of the resource for which the alert was generated\n * @property {string} responseBody -\n *          The response body of the request that generated the alert\n * @property {string} responseHeaders -\n *          The response headers of the request that generated the alert\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} url - The absolute URL of the Alert resource\n * @property {string} requestHeaders -\n *          The request headers of the request that generated the alert\n * @property {string} serviceSid -\n *          The SID of the service or resource that generated the alert\n *\n * @param {V1} version - Version of the resource\n * @param {AlertPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nAlertInstance = function AlertInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.alertText = payload.alert_text; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateGenerated = deserialize.iso8601DateTime(payload.date_generated); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.errorCode = payload.error_code; // jshint ignore:line\n  this.logLevel = payload.log_level; // jshint ignore:line\n  this.moreInfo = payload.more_info; // jshint ignore:line\n  this.requestMethod = payload.request_method; // jshint ignore:line\n  this.requestUrl = payload.request_url; // jshint ignore:line\n  this.requestVariables = payload.request_variables; // jshint ignore:line\n  this.resourceSid = payload.resource_sid; // jshint ignore:line\n  this.responseBody = payload.response_body; // jshint ignore:line\n  this.responseHeaders = payload.response_headers; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.requestHeaders = payload.request_headers; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(AlertInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AlertContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AlertInstance\n *\n * @function fetch\n * @memberof Twilio.Monitor.V1.AlertInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AlertInstance\n */\n/* jshint ignore:end */\nAlertInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Monitor.V1.AlertInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAlertInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAlertInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AlertContext\n *\n * @constructor Twilio.Monitor.V1.AlertContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nAlertContext = function AlertContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Alerts/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AlertInstance\n *\n * @function fetch\n * @memberof Twilio.Monitor.V1.AlertContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AlertInstance\n */\n/* jshint ignore:end */\nAlertContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AlertInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Monitor.V1.AlertContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAlertContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAlertContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AlertList: AlertList,\n  AlertPage: AlertPage,\n  AlertInstance: AlertInstance,\n  AlertContext: AlertContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar EventList;\nvar EventPage;\nvar EventInstance;\nvar EventContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EventList\n *\n * @constructor Twilio.Monitor.V1.EventList\n *\n * @param {Twilio.Monitor.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nEventList = function EventList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function events\n   * @memberof Twilio.Monitor.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Monitor.V1.EventContext}\n   */\n  /* jshint ignore:end */\n  function EventListInstance(sid) {\n    return EventListInstance.get(sid);\n  }\n\n  EventListInstance._version = version;\n  // Path Solution\n  EventListInstance._solution = {};\n  EventListInstance._uri = `/Events`;\n  /* jshint ignore:start */\n  /**\n   * Streams EventInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Monitor.V1.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.actorSid] - Only include events initiated by this Actor\n   * @param {string} [opts.eventType] - Only include events of this Event Type\n   * @param {string} [opts.resourceSid] -\n   *          Only include events that refer to this resource\n   * @param {string} [opts.sourceIpAddress] -\n   *          Only include events that originated from this IP address\n   * @param {Date} [opts.startDate] -\n   *          Only include events that occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include events that occurred on or before this date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EventListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EventInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Monitor.V1.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.actorSid] - Only include events initiated by this Actor\n   * @param {string} [opts.eventType] - Only include events of this Event Type\n   * @param {string} [opts.resourceSid] -\n   *          Only include events that refer to this resource\n   * @param {string} [opts.sourceIpAddress] -\n   *          Only include events that originated from this IP address\n   * @param {Date} [opts.startDate] -\n   *          Only include events that occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include events that occurred on or before this date\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Monitor.V1.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.actorSid] - Only include events initiated by this Actor\n   * @param {string} [opts.eventType] - Only include events of this Event Type\n   * @param {string} [opts.resourceSid] -\n   *          Only include events that refer to this resource\n   * @param {string} [opts.sourceIpAddress] -\n   *          Only include events that originated from this IP address\n   * @param {Date} [opts.startDate] -\n   *          Only include events that occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include events that occurred on or before this date\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ActorSid': _.get(opts, 'actorSid'),\n      'EventType': _.get(opts, 'eventType'),\n      'ResourceSid': _.get(opts, 'resourceSid'),\n      'SourceIpAddress': _.get(opts, 'sourceIpAddress'),\n      'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Monitor.V1.EventList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a event\n   *\n   * @function get\n   * @memberof Twilio.Monitor.V1.EventList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Monitor.V1.EventContext}\n   */\n  /* jshint ignore:end */\n  EventListInstance.get = function get(sid) {\n    return new EventContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Monitor.V1.EventList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EventListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EventListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EventListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventPage\n *\n * @constructor Twilio.Monitor.V1.EventPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EventSolution} solution - Path solution\n *\n * @returns EventPage\n */\n/* jshint ignore:end */\nEventPage = function EventPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EventPage.prototype, Page.prototype);\nEventPage.prototype.constructor = EventPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EventInstance\n *\n * @function getInstance\n * @memberof Twilio.Monitor.V1.EventPage#\n *\n * @param {EventPayload} payload - Payload response from the API\n *\n * @returns EventInstance\n */\n/* jshint ignore:end */\nEventPage.prototype.getInstance = function getInstance(payload) {\n  return new EventInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Monitor.V1.EventPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventContext\n *\n * @constructor Twilio.Monitor.V1.EventInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} actorSid -\n *          The SID of the actor that caused the event, if available\n * @property {string} actorType - The type of actor that caused the event\n * @property {string} description - A description of the event\n * @property {object} eventData -\n *          A JSON string that represents an object with additional data about the event\n * @property {Date} eventDate -\n *          The ISO 8601 date and time in GMT when the event was recorded\n * @property {string} eventType - The event's type\n * @property {string} resourceSid - The SID of the resource that was affected\n * @property {string} resourceType - The type of resource that was affected\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} source -\n *          The originating system or interface that caused the event\n * @property {string} sourceIpAddress - The IP address of the source\n * @property {string} url - The absolute URL of the resource that was affected\n * @property {string} links - The absolute URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {EventPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nEventInstance = function EventInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.actorSid = payload.actor_sid; // jshint ignore:line\n  this.actorType = payload.actor_type; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.eventData = payload.event_data; // jshint ignore:line\n  this.eventDate = deserialize.iso8601DateTime(payload.event_date); // jshint ignore:line\n  this.eventType = payload.event_type; // jshint ignore:line\n  this.resourceSid = payload.resource_sid; // jshint ignore:line\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.source = payload.source; // jshint ignore:line\n  this.sourceIpAddress = payload.source_ip_address; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(EventInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EventContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EventInstance\n *\n * @function fetch\n * @memberof Twilio.Monitor.V1.EventInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EventInstance\n */\n/* jshint ignore:end */\nEventInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Monitor.V1.EventInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventContext\n *\n * @constructor Twilio.Monitor.V1.EventContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nEventContext = function EventContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Events/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EventInstance\n *\n * @function fetch\n * @memberof Twilio.Monitor.V1.EventContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EventInstance\n */\n/* jshint ignore:end */\nEventContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EventInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Monitor.V1.EventContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEventContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EventList: EventList,\n  EventPage: EventPage,\n  EventInstance: EventInstance,\n  EventContext: EventContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar AlertList = require('./v1/alert').AlertList;\nvar EventList = require('./v1/event').EventList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Monitor\n *\n * @constructor Twilio.Monitor.V1\n *\n * @property {Twilio.Monitor.V1.AlertList} alerts - alerts resource\n * @property {Twilio.Monitor.V1.EventList} events - events resource\n *\n * @param {Twilio.Monitor} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._alerts = undefined;\n  this._events = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'alerts', {\n    get: function() {\n      this._alerts = this._alerts || new AlertList(this);\n      return this._alerts;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'events', {\n    get: function() {\n      this._events = this._events || new EventList(this);\n      return this._events;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./monitor/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize monitor domain\n *\n * @constructor Twilio.Monitor\n *\n * @property {Twilio.Monitor.V1} v1 - v1 version\n * @property {Twilio.Monitor.V1.AlertList} alerts - alerts resource\n * @property {Twilio.Monitor.V1.EventList} events - events resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Monitor(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://monitor.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Monitor.prototype, Domain.prototype);\nMonitor.prototype.constructor = Monitor;\n\nObject.defineProperty(Monitor.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Monitor.prototype,\n  'alerts', {\n    get: function() {\n      return this.v1.alerts;\n    }\n});\n\nObject.defineProperty(Monitor.prototype,\n  'events', {\n    get: function() {\n      return this.v1.events;\n    }\n});\n\nmodule.exports = Monitor;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CredentialList;\nvar CredentialPage;\nvar CredentialInstance;\nvar CredentialContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.CredentialList\n *\n * @param {Twilio.Notify.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCredentialList = function CredentialList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function credentials\n   * @memberof Twilio.Notify.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Notify.V1.CredentialContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListInstance(sid) {\n    return CredentialListInstance.get(sid);\n  }\n\n  CredentialListInstance._version = version;\n  // Path Solution\n  CredentialListInstance._solution = {};\n  CredentialListInstance._uri = `/Credentials`;\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Notify.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Notify.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Notify.V1.CredentialList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Notify.V1.CredentialList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CredentialInstance\n   *\n   * @function create\n   * @memberof Twilio.Notify.V1.CredentialList#\n   *\n   * @param {object} opts - Options for request\n   * @param {credential.push_service} opts.type - The Credential type\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.certificate] -\n   *          [APN only] The URL-encoded representation of the certificate\n   * @param {string} [opts.privateKey] -\n   *          [APN only] URL-encoded representation of the private key\n   * @param {boolean} [opts.sandbox] -\n   *          [APN only] Whether to send the credential to sandbox APNs\n   * @param {string} [opts.apiKey] -\n   *          [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging\n   * @param {string} [opts.secret] -\n   *          [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialInstance\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Type': _.get(opts, 'type'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Certificate': _.get(opts, 'certificate'),\n      'PrivateKey': _.get(opts, 'privateKey'),\n      'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n      'ApiKey': _.get(opts, 'apiKey'),\n      'Secret': _.get(opts, 'secret')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential\n   *\n   * @function get\n   * @memberof Twilio.Notify.V1.CredentialList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Notify.V1.CredentialContext}\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.get = function get(sid) {\n    return new CredentialContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Notify.V1.CredentialList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.CredentialPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialSolution} solution - Path solution\n *\n * @returns CredentialPage\n */\n/* jshint ignore:end */\nCredentialPage = function CredentialPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialPage.prototype, Page.prototype);\nCredentialPage.prototype.constructor = CredentialPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialInstance\n *\n * @function getInstance\n * @memberof Twilio.Notify.V1.CredentialPage#\n *\n * @param {CredentialPayload} payload - Payload response from the API\n *\n * @returns CredentialInstance\n */\n/* jshint ignore:end */\nCredentialPage.prototype.getInstance = function getInstance(payload) {\n  return new CredentialInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.CredentialPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.CredentialInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {credential.push_service} type -\n *          The Credential type, one of `gcm`, `fcm`, or `apn`\n * @property {string} sandbox -\n *          [APN only] Whether to send the credential to sandbox APNs\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Credential resource\n *\n * @param {V1} version - Version of the resource\n * @param {CredentialPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCredentialInstance = function CredentialInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.sandbox = payload.sandbox; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CredentialInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Notify.V1.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Notify.V1.CredentialInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.certificate] -\n *          [APN only] The URL-encoded representation of the certificate\n * @param {string} [opts.privateKey] -\n *          [APN only] URL-encoded representation of the private key\n * @param {boolean} [opts.sandbox] -\n *          [APN only] Whether to send the credential to sandbox APNs\n * @param {string} [opts.apiKey] -\n *          [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging\n * @param {string} [opts.secret] -\n *          [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Notify.V1.CredentialInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.CredentialInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.CredentialContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCredentialContext = function CredentialContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Credentials/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialInstance\n *\n * @function fetch\n * @memberof Twilio.Notify.V1.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CredentialInstance\n *\n * @function update\n * @memberof Twilio.Notify.V1.CredentialContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.certificate] -\n *          [APN only] The URL-encoded representation of the certificate\n * @param {string} [opts.privateKey] -\n *          [APN only] URL-encoded representation of the private key\n * @param {boolean} [opts.sandbox] -\n *          [APN only] Whether to send the credential to sandbox APNs\n * @param {string} [opts.apiKey] -\n *          [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging\n * @param {string} [opts.secret] -\n *          [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Certificate': _.get(opts, 'certificate'),\n    'PrivateKey': _.get(opts, 'privateKey'),\n    'Sandbox': serialize.bool(_.get(opts, 'sandbox')),\n    'ApiKey': _.get(opts, 'apiKey'),\n    'Secret': _.get(opts, 'secret')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialInstance\n *\n * @function remove\n * @memberof Twilio.Notify.V1.CredentialContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialInstance\n */\n/* jshint ignore:end */\nCredentialContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.CredentialContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialList: CredentialList,\n  CredentialPage: CredentialPage,\n  CredentialInstance: CredentialInstance,\n  CredentialContext: CredentialContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BindingList;\nvar BindingPage;\nvar BindingInstance;\nvar BindingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceContext.BindingList\n *\n * @param {Twilio.Notify.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nBindingList = function BindingList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function bindings\n   * @memberof Twilio.Notify.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Notify.V1.ServiceContext.BindingContext}\n   */\n  /* jshint ignore:end */\n  function BindingListInstance(sid) {\n    return BindingListInstance.get(sid);\n  }\n\n  BindingListInstance._version = version;\n  // Path Solution\n  BindingListInstance._solution = {serviceSid: serviceSid};\n  BindingListInstance._uri = `/Services/${serviceSid}/Bindings`;\n  /* jshint ignore:start */\n  /**\n   * create a BindingInstance\n   *\n   * @function create\n   * @memberof Twilio.Notify.V1.ServiceContext.BindingList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity -\n   *          The `identity` value that identifies the new resource's User\n   * @param {binding.binding_type} opts.bindingType - The type of the Binding\n   * @param {string} opts.address - The channel-specific address\n   * @param {string|list} [opts.tag] -\n   *          A tag that can be used to select the Bindings to notify\n   * @param {string} [opts.notificationProtocolVersion] -\n   *          The protocol version to use to send the notification\n   * @param {string} [opts.credentialSid] -\n   *          The SID of the Credential resource to be used to send notifications to this Binding\n   * @param {string} [opts.endpoint] - Deprecated\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed BindingInstance\n   */\n  /* jshint ignore:end */\n  BindingListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n    if (_.isUndefined(opts['bindingType'])) {\n      throw new Error('Required parameter \"opts[\\'bindingType\\']\" missing.');\n    }\n    if (_.isUndefined(opts['address'])) {\n      throw new Error('Required parameter \"opts[\\'address\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'BindingType': _.get(opts, 'bindingType'),\n      'Address': _.get(opts, 'address'),\n      'Tag': serialize.map(_.get(opts, 'tag'), function(e) { return e; }),\n      'NotificationProtocolVersion': _.get(opts, 'notificationProtocolVersion'),\n      'CredentialSid': _.get(opts, 'credentialSid'),\n      'Endpoint': _.get(opts, 'endpoint')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BindingInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams BindingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Notify.V1.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {string|list} [opts.tag] -\n   *          Only list Bindings that have all of the specified Tags\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BindingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BindingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Notify.V1.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {string|list} [opts.tag] -\n   *          Only list Bindings that have all of the specified Tags\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Notify.V1.ServiceContext.BindingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.startDate] -\n   *          Only include usage that has occurred on or after this date\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value of the resources to read\n   * @param {string|list} [opts.tag] -\n   *          Only list Bindings that have all of the specified Tags\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')),\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'Tag': serialize.map(_.get(opts, 'tag'), function(e) { return e; }),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BindingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Notify.V1.ServiceContext.BindingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BindingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BindingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a binding\n   *\n   * @function get\n   * @memberof Twilio.Notify.V1.ServiceContext.BindingList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Notify.V1.ServiceContext.BindingContext}\n   */\n  /* jshint ignore:end */\n  BindingListInstance.get = function get(sid) {\n    return new BindingContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Notify.V1.ServiceContext.BindingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BindingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BindingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BindingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceContext.BindingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BindingSolution} solution - Path solution\n *\n * @returns BindingPage\n */\n/* jshint ignore:end */\nBindingPage = function BindingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BindingPage.prototype, Page.prototype);\nBindingPage.prototype.constructor = BindingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BindingInstance\n *\n * @function getInstance\n * @memberof Twilio.Notify.V1.ServiceContext.BindingPage#\n *\n * @param {BindingPayload} payload - Payload response from the API\n *\n * @returns BindingInstance\n */\n/* jshint ignore:end */\nBindingPage.prototype.getInstance = function getInstance(payload) {\n  return new BindingInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.ServiceContext.BindingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBindingPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceContext.BindingInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} credentialSid -\n *          The SID of the Credential resource to be used to send notifications to this Binding\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} notificationProtocolVersion -\n *          The protocol version to use to send the notification\n * @property {string} endpoint - Deprecated\n * @property {string} identity -\n *          The `identity` value that identifies the new resource's User\n * @property {string} bindingType - The type of the Binding\n * @property {string} address - The channel-specific address\n * @property {string} tags - The list of tags associated with this Binding\n * @property {string} url - The absolute URL of the Binding resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {BindingPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nBindingInstance = function BindingInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.credentialSid = payload.credential_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.notificationProtocolVersion = payload.notification_protocol_version; // jshint ignore:line\n  this.endpoint = payload.endpoint; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.bindingType = payload.binding_type; // jshint ignore:line\n  this.address = payload.address; // jshint ignore:line\n  this.tags = payload.tags; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(BindingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BindingContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BindingInstance\n *\n * @function fetch\n * @memberof Twilio.Notify.V1.ServiceContext.BindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a BindingInstance\n *\n * @function remove\n * @memberof Twilio.Notify.V1.ServiceContext.BindingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.ServiceContext.BindingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBindingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BindingContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceContext.BindingContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nBindingContext = function BindingContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Bindings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BindingInstance\n *\n * @function fetch\n * @memberof Twilio.Notify.V1.ServiceContext.BindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BindingInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a BindingInstance\n *\n * @function remove\n * @memberof Twilio.Notify.V1.ServiceContext.BindingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BindingInstance\n */\n/* jshint ignore:end */\nBindingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.ServiceContext.BindingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBindingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBindingContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BindingList: BindingList,\n  BindingPage: BindingPage,\n  BindingInstance: BindingInstance,\n  BindingContext: BindingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar NotificationList;\nvar NotificationPage;\nvar NotificationInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceContext.NotificationList\n *\n * @param {Twilio.Notify.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nNotificationList = function NotificationList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function notifications\n   * @memberof Twilio.Notify.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Notify.V1.ServiceContext.NotificationContext}\n   */\n  /* jshint ignore:end */\n  function NotificationListInstance(sid) {\n    return NotificationListInstance.get(sid);\n  }\n\n  NotificationListInstance._version = version;\n  // Path Solution\n  NotificationListInstance._solution = {serviceSid: serviceSid};\n  NotificationListInstance._uri = `/Services/${serviceSid}/Notifications`;\n  /* jshint ignore:start */\n  /**\n   * create a NotificationInstance\n   *\n   * @function create\n   * @memberof Twilio.Notify.V1.ServiceContext.NotificationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.body] - The notification body text\n   * @param {notification.priority} [opts.priority] -\n   *          The priority of the notification\n   * @param {number} [opts.ttl] - How long, in seconds, the notification is valid\n   * @param {string} [opts.title] - The notification title\n   * @param {string} [opts.sound] -\n   *          The name of the sound to be played for the notification\n   * @param {string} [opts.action] - The actions to display for the notification\n   * @param {object} [opts.data] -\n   *          The custom key-value pairs of the notification's payload\n   * @param {object} [opts.apn] -\n   *          The APNS-specific payload that overrides corresponding attributes in a generic payload for APNS Bindings\n   * @param {object} [opts.gcm] -\n   *          The GCM-specific payload that overrides corresponding attributes in generic payload for GCM Bindings\n   * @param {object} [opts.sms] -\n   *          The SMS-specific payload that overrides corresponding attributes in generic payload for SMS Bindings\n   * @param {object} [opts.facebookMessenger] - Deprecated\n   * @param {object} [opts.fcm] -\n   *          The FCM-specific payload that overrides corresponding attributes in generic payload for FCM Bindings\n   * @param {string|list} [opts.segment] - A Segment to notify\n   * @param {object} [opts.alexa] - Deprecated\n   * @param {string|list} [opts.toBinding] -\n   *          The destination address specified as a JSON string\n   * @param {string} [opts.deliveryCallbackUrl] - URL to send webhooks\n   * @param {string|list} [opts.identity] -\n   *          The `identity` value that identifies the new resource's User\n   * @param {string|list} [opts.tag] - A tag that selects the Bindings to notify\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed NotificationInstance\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': serialize.map(_.get(opts, 'identity'), function(e) { return e; }),\n      'Tag': serialize.map(_.get(opts, 'tag'), function(e) { return e; }),\n      'Body': _.get(opts, 'body'),\n      'Priority': _.get(opts, 'priority'),\n      'Ttl': _.get(opts, 'ttl'),\n      'Title': _.get(opts, 'title'),\n      'Sound': _.get(opts, 'sound'),\n      'Action': _.get(opts, 'action'),\n      'Data': serialize.object(_.get(opts, 'data')),\n      'Apn': serialize.object(_.get(opts, 'apn')),\n      'Gcm': serialize.object(_.get(opts, 'gcm')),\n      'Sms': serialize.object(_.get(opts, 'sms')),\n      'FacebookMessenger': serialize.object(_.get(opts, 'facebookMessenger')),\n      'Fcm': serialize.object(_.get(opts, 'fcm')),\n      'Segment': serialize.map(_.get(opts, 'segment'), function(e) { return e; }),\n      'Alexa': serialize.object(_.get(opts, 'alexa')),\n      'ToBinding': serialize.map(_.get(opts, 'toBinding'), function(e) { return e; }),\n      'DeliveryCallbackUrl': _.get(opts, 'deliveryCallbackUrl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NotificationInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Notify.V1.ServiceContext.NotificationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NotificationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NotificationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceContext.NotificationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NotificationSolution} solution - Path solution\n *\n * @returns NotificationPage\n */\n/* jshint ignore:end */\nNotificationPage = function NotificationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NotificationPage.prototype, Page.prototype);\nNotificationPage.prototype.constructor = NotificationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NotificationInstance\n *\n * @function getInstance\n * @memberof Twilio.Notify.V1.ServiceContext.NotificationPage#\n *\n * @param {NotificationPayload} payload - Payload response from the API\n *\n * @returns NotificationInstance\n */\n/* jshint ignore:end */\nNotificationPage.prototype.getInstance = function getInstance(payload) {\n  return new NotificationInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.ServiceContext.NotificationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceContext.NotificationInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {string} identities -\n *          The list of identity values of the Users to notify\n * @property {string} tags - The tags that select the Bindings to notify\n * @property {string} segments - The list of Segments to notify\n * @property {notification.priority} priority - The priority of the notification\n * @property {number} ttl - How long, in seconds, the notification is valid\n * @property {string} title - The notification title\n * @property {string} body - The notification body text\n * @property {string} sound -\n *          The name of the sound to be played for the notification\n * @property {string} action - The actions to display for the notification\n * @property {object} data -\n *          The custom key-value pairs of the notification's payload\n * @property {object} apn -\n *          The APNS-specific payload that overrides corresponding attributes in a generic payload for APNS Bindings\n * @property {object} gcm -\n *          The GCM-specific payload that overrides corresponding attributes in generic payload for GCM Bindings\n * @property {object} fcm -\n *          The FCM-specific payload that overrides corresponding attributes in generic payload for FCM Bindings\n * @property {object} sms -\n *          The SMS-specific payload that overrides corresponding attributes in generic payload for SMS Bindings\n * @property {object} facebookMessenger - Deprecated\n * @property {object} alexa - Deprecated\n *\n * @param {V1} version - Version of the resource\n * @param {NotificationPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nNotificationInstance = function NotificationInstance(version, payload,\n                                                      serviceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.identities = payload.identities; // jshint ignore:line\n  this.tags = payload.tags; // jshint ignore:line\n  this.segments = payload.segments; // jshint ignore:line\n  this.priority = payload.priority; // jshint ignore:line\n  this.ttl = deserialize.integer(payload.ttl); // jshint ignore:line\n  this.title = payload.title; // jshint ignore:line\n  this.body = payload.body; // jshint ignore:line\n  this.sound = payload.sound; // jshint ignore:line\n  this.action = payload.action; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.apn = payload.apn; // jshint ignore:line\n  this.gcm = payload.gcm; // jshint ignore:line\n  this.fcm = payload.fcm; // jshint ignore:line\n  this.sms = payload.sms; // jshint ignore:line\n  this.facebookMessenger = payload.facebook_messenger; // jshint ignore:line\n  this.alexa = payload.alexa; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.ServiceContext.NotificationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NotificationList: NotificationList,\n  NotificationPage: NotificationPage,\n  NotificationInstance: NotificationInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BindingList = require('./service/binding').BindingList;\nvar NotificationList = require('./service/notification').NotificationList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceList\n *\n * @param {Twilio.Notify.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Notify.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Notify.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Notify.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.apnCredentialSid] -\n   *          The SID of the Credential to use for APN Bindings\n   * @param {string} [opts.gcmCredentialSid] -\n   *          The SID of the Credential to use for GCM Bindings\n   * @param {string} [opts.messagingServiceSid] -\n   *          The SID of the Messaging Service to use for SMS Bindings\n   * @param {string} [opts.facebookMessengerPageId] - Deprecated\n   * @param {string} [opts.defaultApnNotificationProtocolVersion] -\n   *          The protocol version to use for sending APNS notifications\n   * @param {string} [opts.defaultGcmNotificationProtocolVersion] -\n   *          The protocol version to use for sending GCM notifications\n   * @param {string} [opts.fcmCredentialSid] -\n   *          The SID of the Credential to use for FCM Bindings\n   * @param {string} [opts.defaultFcmNotificationProtocolVersion] -\n   *          The protocol version to use for sending FCM notifications\n   * @param {boolean} [opts.logEnabled] - Whether to log notifications\n   * @param {string} [opts.alexaSkillId] - Deprecated\n   * @param {string} [opts.defaultAlexaNotificationProtocolVersion] - Deprecated\n   * @param {string} [opts.deliveryCallbackUrl] - Webhook URL\n   * @param {boolean} [opts.deliveryCallbackEnabled] - Enable delivery callbacks\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'ApnCredentialSid': _.get(opts, 'apnCredentialSid'),\n      'GcmCredentialSid': _.get(opts, 'gcmCredentialSid'),\n      'MessagingServiceSid': _.get(opts, 'messagingServiceSid'),\n      'FacebookMessengerPageId': _.get(opts, 'facebookMessengerPageId'),\n      'DefaultApnNotificationProtocolVersion': _.get(opts, 'defaultApnNotificationProtocolVersion'),\n      'DefaultGcmNotificationProtocolVersion': _.get(opts, 'defaultGcmNotificationProtocolVersion'),\n      'FcmCredentialSid': _.get(opts, 'fcmCredentialSid'),\n      'DefaultFcmNotificationProtocolVersion': _.get(opts, 'defaultFcmNotificationProtocolVersion'),\n      'LogEnabled': serialize.bool(_.get(opts, 'logEnabled')),\n      'AlexaSkillId': _.get(opts, 'alexaSkillId'),\n      'DefaultAlexaNotificationProtocolVersion': _.get(opts, 'defaultAlexaNotificationProtocolVersion'),\n      'DeliveryCallbackUrl': _.get(opts, 'deliveryCallbackUrl'),\n      'DeliveryCallbackEnabled': serialize.bool(_.get(opts, 'deliveryCallbackEnabled'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Notify.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Service resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Notify.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Service resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Notify.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that identifies the Service resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Notify.V1.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Notify.V1.ServiceList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Notify.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Notify.V1.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServicePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Notify.V1.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} apnCredentialSid -\n *          The SID of the Credential to use for APN Bindings\n * @property {string} gcmCredentialSid -\n *          The SID of the Credential to use for GCM Bindings\n * @property {string} fcmCredentialSid -\n *          The SID of the Credential to use for FCM Bindings\n * @property {string} messagingServiceSid -\n *          The SID of the Messaging Service to use for SMS Bindings\n * @property {string} facebookMessengerPageId - Deprecated\n * @property {string} defaultApnNotificationProtocolVersion -\n *          The protocol version to use for sending APNS notifications\n * @property {string} defaultGcmNotificationProtocolVersion -\n *          The protocol version to use for sending GCM notifications\n * @property {string} defaultFcmNotificationProtocolVersion -\n *          The protocol version to use for sending FCM notifications\n * @property {boolean} logEnabled - Whether to log notifications\n * @property {string} url - The absolute URL of the Service resource\n * @property {string} links - The URLs of the resources related to the service\n * @property {string} alexaSkillId - Deprecated\n * @property {string} defaultAlexaNotificationProtocolVersion - Deprecated\n * @property {string} deliveryCallbackUrl - Webhook URL\n * @property {boolean} deliveryCallbackEnabled - Enable delivery callbacks\n *\n * @param {V1} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.apnCredentialSid = payload.apn_credential_sid; // jshint ignore:line\n  this.gcmCredentialSid = payload.gcm_credential_sid; // jshint ignore:line\n  this.fcmCredentialSid = payload.fcm_credential_sid; // jshint ignore:line\n  this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line\n  this.facebookMessengerPageId = payload.facebook_messenger_page_id; // jshint ignore:line\n  this.defaultApnNotificationProtocolVersion = payload.default_apn_notification_protocol_version; // jshint ignore:line\n  this.defaultGcmNotificationProtocolVersion = payload.default_gcm_notification_protocol_version; // jshint ignore:line\n  this.defaultFcmNotificationProtocolVersion = payload.default_fcm_notification_protocol_version; // jshint ignore:line\n  this.logEnabled = payload.log_enabled; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.alexaSkillId = payload.alexa_skill_id; // jshint ignore:line\n  this.defaultAlexaNotificationProtocolVersion = payload.default_alexa_notification_protocol_version; // jshint ignore:line\n  this.deliveryCallbackUrl = payload.delivery_callback_url; // jshint ignore:line\n  this.deliveryCallbackEnabled = payload.delivery_callback_enabled; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Notify.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Notify.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Notify.V1.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.apnCredentialSid] -\n *          The SID of the Credential to use for APN Bindings\n * @param {string} [opts.gcmCredentialSid] -\n *          The SID of the Credential to use for GCM Bindings\n * @param {string} [opts.messagingServiceSid] -\n *          The SID of the Messaging Service to use for SMS Bindings\n * @param {string} [opts.facebookMessengerPageId] - Deprecated\n * @param {string} [opts.defaultApnNotificationProtocolVersion] -\n *          The protocol version to use for sending APNS notifications\n * @param {string} [opts.defaultGcmNotificationProtocolVersion] -\n *          The protocol version to use for sending GCM notifications\n * @param {string} [opts.fcmCredentialSid] -\n *          The SID of the Credential to use for FCM Bindings\n * @param {string} [opts.defaultFcmNotificationProtocolVersion] -\n *          The protocol version to use for sending FCM notifications\n * @param {boolean} [opts.logEnabled] - Whether to log notifications\n * @param {string} [opts.alexaSkillId] - Deprecated\n * @param {string} [opts.defaultAlexaNotificationProtocolVersion] - Deprecated\n * @param {string} [opts.deliveryCallbackUrl] - Webhook URL\n * @param {boolean} [opts.deliveryCallbackEnabled] - Enable delivery callbacks\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the bindings\n *\n * @function bindings\n * @memberof Twilio.Notify.V1.ServiceInstance#\n *\n * @returns {Twilio.Notify.V1.ServiceContext.BindingList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.bindings = function bindings() {\n  return this._proxy.bindings;\n};\n\n/* jshint ignore:start */\n/**\n * Access the notifications\n *\n * @function notifications\n * @memberof Twilio.Notify.V1.ServiceInstance#\n *\n * @returns {Twilio.Notify.V1.ServiceContext.NotificationList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.notifications = function notifications() {\n  return this._proxy.notifications;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Notify.V1.ServiceContext\n *\n * @property {Twilio.Notify.V1.ServiceContext.BindingList} bindings -\n *          bindings resource\n * @property {Twilio.Notify.V1.ServiceContext.NotificationList} notifications -\n *          notifications resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._bindings = undefined;\n  this._notifications = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Notify.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Notify.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Notify.V1.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.apnCredentialSid] -\n *          The SID of the Credential to use for APN Bindings\n * @param {string} [opts.gcmCredentialSid] -\n *          The SID of the Credential to use for GCM Bindings\n * @param {string} [opts.messagingServiceSid] -\n *          The SID of the Messaging Service to use for SMS Bindings\n * @param {string} [opts.facebookMessengerPageId] - Deprecated\n * @param {string} [opts.defaultApnNotificationProtocolVersion] -\n *          The protocol version to use for sending APNS notifications\n * @param {string} [opts.defaultGcmNotificationProtocolVersion] -\n *          The protocol version to use for sending GCM notifications\n * @param {string} [opts.fcmCredentialSid] -\n *          The SID of the Credential to use for FCM Bindings\n * @param {string} [opts.defaultFcmNotificationProtocolVersion] -\n *          The protocol version to use for sending FCM notifications\n * @param {boolean} [opts.logEnabled] - Whether to log notifications\n * @param {string} [opts.alexaSkillId] - Deprecated\n * @param {string} [opts.defaultAlexaNotificationProtocolVersion] - Deprecated\n * @param {string} [opts.deliveryCallbackUrl] - Webhook URL\n * @param {boolean} [opts.deliveryCallbackEnabled] - Enable delivery callbacks\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'ApnCredentialSid': _.get(opts, 'apnCredentialSid'),\n    'GcmCredentialSid': _.get(opts, 'gcmCredentialSid'),\n    'MessagingServiceSid': _.get(opts, 'messagingServiceSid'),\n    'FacebookMessengerPageId': _.get(opts, 'facebookMessengerPageId'),\n    'DefaultApnNotificationProtocolVersion': _.get(opts, 'defaultApnNotificationProtocolVersion'),\n    'DefaultGcmNotificationProtocolVersion': _.get(opts, 'defaultGcmNotificationProtocolVersion'),\n    'FcmCredentialSid': _.get(opts, 'fcmCredentialSid'),\n    'DefaultFcmNotificationProtocolVersion': _.get(opts, 'defaultFcmNotificationProtocolVersion'),\n    'LogEnabled': serialize.bool(_.get(opts, 'logEnabled')),\n    'AlexaSkillId': _.get(opts, 'alexaSkillId'),\n    'DefaultAlexaNotificationProtocolVersion': _.get(opts, 'defaultAlexaNotificationProtocolVersion'),\n    'DeliveryCallbackUrl': _.get(opts, 'deliveryCallbackUrl'),\n    'DeliveryCallbackEnabled': serialize.bool(_.get(opts, 'deliveryCallbackEnabled'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'bindings', {\n    get: function() {\n      if (!this._bindings) {\n        this._bindings = new BindingList(this._version, this._solution.sid);\n      }\n      return this._bindings;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'notifications', {\n    get: function() {\n      if (!this._notifications) {\n        this._notifications = new NotificationList(this._version, this._solution.sid);\n      }\n      return this._notifications;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Notify.V1.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CredentialList = require('./v1/credential').CredentialList;\nvar ServiceList = require('./v1/service').ServiceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Notify\n *\n * @constructor Twilio.Notify.V1\n *\n * @property {Twilio.Notify.V1.CredentialList} credentials - credentials resource\n * @property {Twilio.Notify.V1.ServiceList} services - services resource\n *\n * @param {Twilio.Notify} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._credentials = undefined;\n  this._services = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'credentials', {\n    get: function() {\n      this._credentials = this._credentials || new CredentialList(this);\n      return this._credentials;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./notify/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize notify domain\n *\n * @constructor Twilio.Notify\n *\n * @property {Twilio.Notify.V1} v1 - v1 version\n * @property {Twilio.Notify.V1.CredentialList} credentials - credentials resource\n * @property {Twilio.Notify.V1.ServiceList} services - services resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Notify(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://notify.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Notify.prototype, Domain.prototype);\nNotify.prototype.constructor = Notify;\n\nObject.defineProperty(Notify.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Notify.prototype,\n  'credentials', {\n    get: function() {\n      return this.v1.credentials;\n    }\n});\n\nObject.defineProperty(Notify.prototype,\n  'services', {\n    get: function() {\n      return this.v1.services;\n    }\n});\n\nmodule.exports = Notify;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar BundleCopyList;\nvar BundleCopyPage;\nvar BundleCopyInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the BundleCopyList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n * @param {string} bundleSid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nBundleCopyList = function BundleCopyList(version, bundleSid) {\n  /* jshint ignore:start */\n  /**\n   * @function bundleCopies\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyContext}\n   */\n  /* jshint ignore:end */\n  function BundleCopyListInstance(sid) {\n    return BundleCopyListInstance.get(sid);\n  }\n\n  BundleCopyListInstance._version = version;\n  // Path Solution\n  BundleCopyListInstance._solution = {bundleSid: bundleSid};\n  BundleCopyListInstance._uri = `/RegulatoryCompliance/Bundles/${bundleSid}/Copies`;\n  /* jshint ignore:start */\n  /**\n   * create a BundleCopyInstance\n   *\n   * @function create\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the copied bundle\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed BundleCopyInstance\n   */\n  /* jshint ignore:end */\n  BundleCopyListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BundleCopyInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams BundleCopyInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BundleCopyListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BundleCopyInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BundleCopyListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BundleCopyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BundleCopyListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BundleCopyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BundleCopyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BundleCopyListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BundleCopyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BundleCopyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BundleCopyListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BundleCopyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BundleCopyPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BundleCopySolution} solution - Path solution\n *\n * @returns BundleCopyPage\n */\n/* jshint ignore:end */\nBundleCopyPage = function BundleCopyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BundleCopyPage.prototype, Page.prototype);\nBundleCopyPage.prototype.constructor = BundleCopyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BundleCopyInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyPage#\n *\n * @param {BundleCopyPayload} payload - Payload response from the API\n *\n * @returns BundleCopyInstance\n */\n/* jshint ignore:end */\nBundleCopyPage.prototype.getInstance = function getInstance(payload) {\n  return new BundleCopyInstance(this._version, payload, this._solution.bundleSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBundleCopyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBundleCopyPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BundleCopyContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} regulationSid - The unique string of a regulation\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {bundle_copy.status} status -\n *          The verification status of the Bundle resource\n * @property {Date} validUntil -\n *          The ISO 8601 date and time in GMT when the resource will be valid until\n * @property {string} email - The email address\n * @property {string} statusCallback -\n *          The URL we call to inform your application of status changes\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n *\n * @param {V2} version - Version of the resource\n * @param {BundleCopyPayload} payload - The instance payload\n * @param {sid} bundleSid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nBundleCopyInstance = function BundleCopyInstance(version, payload, bundleSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.regulationSid = payload.regulation_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.validUntil = deserialize.iso8601DateTime(payload.valid_until); // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {bundleSid: bundleSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBundleCopyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBundleCopyInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BundleCopyList: BundleCopyList,\n  BundleCopyPage: BundleCopyPage,\n  BundleCopyInstance: BundleCopyInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar EvaluationList;\nvar EvaluationPage;\nvar EvaluationInstance;\nvar EvaluationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EvaluationList\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n * @param {string} bundleSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nEvaluationList = function EvaluationList(version, bundleSid) {\n  /* jshint ignore:start */\n  /**\n   * @function evaluations\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationContext}\n   */\n  /* jshint ignore:end */\n  function EvaluationListInstance(sid) {\n    return EvaluationListInstance.get(sid);\n  }\n\n  EvaluationListInstance._version = version;\n  // Path Solution\n  EvaluationListInstance._solution = {bundleSid: bundleSid};\n  EvaluationListInstance._uri = `/RegulatoryCompliance/Bundles/${bundleSid}/Evaluations`;\n  /* jshint ignore:start */\n  /**\n   * create a EvaluationInstance\n   *\n   * @function create\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList#\n   *\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed EvaluationInstance\n   */\n  /* jshint ignore:end */\n  EvaluationListInstance.create = function create(callback) {\n    var deferred = Q.defer();\n    var promise = this._version.create({uri: this._uri, method: 'POST'});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EvaluationInstance(\n        this._version,\n        payload,\n        this._solution.bundleSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams EvaluationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EvaluationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EvaluationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EvaluationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EvaluationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EvaluationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EvaluationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EvaluationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EvaluationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EvaluationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a evaluation\n   *\n   * @function get\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList#\n   *\n   * @param {string} sid - The unique string that identifies the Evaluation resource\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationContext}\n   */\n  /* jshint ignore:end */\n  EvaluationListInstance.get = function get(sid) {\n    return new EvaluationContext(this._version, this._solution.bundleSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EvaluationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EvaluationListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EvaluationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EvaluationPage\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EvaluationSolution} solution - Path solution\n *\n * @returns EvaluationPage\n */\n/* jshint ignore:end */\nEvaluationPage = function EvaluationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EvaluationPage.prototype, Page.prototype);\nEvaluationPage.prototype.constructor = EvaluationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EvaluationInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationPage#\n *\n * @param {EvaluationPayload} payload - Payload response from the API\n *\n * @returns EvaluationInstance\n */\n/* jshint ignore:end */\nEvaluationPage.prototype.getInstance = function getInstance(payload) {\n  return new EvaluationInstance(this._version, payload, this._solution.bundleSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEvaluationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEvaluationPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EvaluationContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Evaluation resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} regulationSid - The unique string of a regulation\n * @property {string} bundleSid - The unique string that identifies the resource\n * @property {evaluation.status} status -\n *          The compliance status of the Evaluation resource\n * @property {object} results - The results of the Evaluation resource\n * @property {Date} dateCreated - The date_created\n * @property {string} url - The url\n *\n * @param {V2} version - Version of the resource\n * @param {EvaluationPayload} payload - The instance payload\n * @param {sid} bundleSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies the Evaluation resource\n */\n/* jshint ignore:end */\nEvaluationInstance = function EvaluationInstance(version, payload, bundleSid,\n                                                  sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.regulationSid = payload.regulation_sid; // jshint ignore:line\n  this.bundleSid = payload.bundle_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.results = payload.results; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {bundleSid: bundleSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(EvaluationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EvaluationContext(this._version, this._solution.bundleSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EvaluationInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EvaluationInstance\n */\n/* jshint ignore:end */\nEvaluationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEvaluationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEvaluationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EvaluationContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} bundleSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies the Evaluation resource\n */\n/* jshint ignore:end */\nEvaluationContext = function EvaluationContext(version, bundleSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {bundleSid: bundleSid, sid: sid, };\n  this._uri = `/RegulatoryCompliance/Bundles/${bundleSid}/Evaluations/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EvaluationInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EvaluationInstance\n */\n/* jshint ignore:end */\nEvaluationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EvaluationInstance(\n      this._version,\n      payload,\n      this._solution.bundleSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEvaluationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEvaluationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EvaluationList: EvaluationList,\n  EvaluationPage: EvaluationPage,\n  EvaluationInstance: EvaluationInstance,\n  EvaluationContext: EvaluationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ItemAssignmentList;\nvar ItemAssignmentPage;\nvar ItemAssignmentInstance;\nvar ItemAssignmentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ItemAssignmentList\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n * @param {string} bundleSid -\n *          The unique string that identifies the Bundle resource.\n */\n/* jshint ignore:end */\nItemAssignmentList = function ItemAssignmentList(version, bundleSid) {\n  /* jshint ignore:start */\n  /**\n   * @function itemAssignments\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentContext}\n   */\n  /* jshint ignore:end */\n  function ItemAssignmentListInstance(sid) {\n    return ItemAssignmentListInstance.get(sid);\n  }\n\n  ItemAssignmentListInstance._version = version;\n  // Path Solution\n  ItemAssignmentListInstance._solution = {bundleSid: bundleSid};\n  ItemAssignmentListInstance._uri = `/RegulatoryCompliance/Bundles/${bundleSid}/ItemAssignments`;\n  /* jshint ignore:start */\n  /**\n   * create a ItemAssignmentInstance\n   *\n   * @function create\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.objectSid - The sid of an object bag\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ItemAssignmentInstance\n   */\n  /* jshint ignore:end */\n  ItemAssignmentListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['objectSid'])) {\n      throw new Error('Required parameter \"opts[\\'objectSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'ObjectSid': _.get(opts, 'objectSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ItemAssignmentInstance(\n        this._version,\n        payload,\n        this._solution.bundleSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ItemAssignmentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ItemAssignmentListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ItemAssignmentInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ItemAssignmentListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ItemAssignmentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ItemAssignmentListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ItemAssignmentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ItemAssignmentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ItemAssignmentListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ItemAssignmentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a item_assignment\n   *\n   * @function get\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentContext}\n   */\n  /* jshint ignore:end */\n  ItemAssignmentListInstance.get = function get(sid) {\n    return new ItemAssignmentContext(this._version, this._solution.bundleSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ItemAssignmentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ItemAssignmentListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ItemAssignmentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ItemAssignmentPage\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ItemAssignmentSolution} solution - Path solution\n *\n * @returns ItemAssignmentPage\n */\n/* jshint ignore:end */\nItemAssignmentPage = function ItemAssignmentPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ItemAssignmentPage.prototype, Page.prototype);\nItemAssignmentPage.prototype.constructor = ItemAssignmentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ItemAssignmentInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentPage#\n *\n * @param {ItemAssignmentPayload} payload - Payload response from the API\n *\n * @returns ItemAssignmentInstance\n */\n/* jshint ignore:end */\nItemAssignmentPage.prototype.getInstance = function getInstance(payload) {\n  return new ItemAssignmentInstance(this._version, payload, this._solution.bundleSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nItemAssignmentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nItemAssignmentPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ItemAssignmentContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} bundleSid -\n *          The unique string that identifies the Bundle resource.\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} objectSid - The sid of an object bag\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {string} url - The absolute URL of the Identity resource\n *\n * @param {V2} version - Version of the resource\n * @param {ItemAssignmentPayload} payload - The instance payload\n * @param {sid} bundleSid - The unique string that identifies the Bundle resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nItemAssignmentInstance = function ItemAssignmentInstance(version, payload,\n                                                          bundleSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.bundleSid = payload.bundle_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.objectSid = payload.object_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {bundleSid: bundleSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ItemAssignmentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ItemAssignmentContext(\n          this._version,\n          this._solution.bundleSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ItemAssignmentInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ItemAssignmentInstance\n */\n/* jshint ignore:end */\nItemAssignmentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ItemAssignmentInstance\n *\n * @function remove\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ItemAssignmentInstance\n */\n/* jshint ignore:end */\nItemAssignmentInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nItemAssignmentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nItemAssignmentInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ItemAssignmentContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} bundleSid - The unique string that identifies the resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nItemAssignmentContext = function ItemAssignmentContext(version, bundleSid, sid)\n                                                        {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {bundleSid: bundleSid, sid: sid, };\n  this._uri = `/RegulatoryCompliance/Bundles/${bundleSid}/ItemAssignments/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ItemAssignmentInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ItemAssignmentInstance\n */\n/* jshint ignore:end */\nItemAssignmentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ItemAssignmentInstance(\n      this._version,\n      payload,\n      this._solution.bundleSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ItemAssignmentInstance\n *\n * @function remove\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ItemAssignmentInstance\n */\n/* jshint ignore:end */\nItemAssignmentContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nItemAssignmentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nItemAssignmentContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ItemAssignmentList: ItemAssignmentList,\n  ItemAssignmentPage: ItemAssignmentPage,\n  ItemAssignmentInstance: ItemAssignmentInstance,\n  ItemAssignmentContext: ItemAssignmentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ReplaceItemsList;\nvar ReplaceItemsPage;\nvar ReplaceItemsInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the ReplaceItemsList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n * @param {string} bundleSid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nReplaceItemsList = function ReplaceItemsList(version, bundleSid) {\n  /* jshint ignore:start */\n  /**\n   * @function replaceItems\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsContext}\n   */\n  /* jshint ignore:end */\n  function ReplaceItemsListInstance(sid) {\n    return ReplaceItemsListInstance.get(sid);\n  }\n\n  ReplaceItemsListInstance._version = version;\n  // Path Solution\n  ReplaceItemsListInstance._solution = {bundleSid: bundleSid};\n  ReplaceItemsListInstance._uri = `/RegulatoryCompliance/Bundles/${bundleSid}/ReplaceItems`;\n  /* jshint ignore:start */\n  /**\n   * create a ReplaceItemsInstance\n   *\n   * @function create\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.fromBundleSid -\n   *          The source bundle sid to copy the item assignments from\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ReplaceItemsInstance\n   */\n  /* jshint ignore:end */\n  ReplaceItemsListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['fromBundleSid'])) {\n      throw new Error('Required parameter \"opts[\\'fromBundleSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FromBundleSid': _.get(opts, 'fromBundleSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ReplaceItemsInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ReplaceItemsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ReplaceItemsListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ReplaceItemsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ReplaceItemsPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ReplaceItemsSolution} solution - Path solution\n *\n * @returns ReplaceItemsPage\n */\n/* jshint ignore:end */\nReplaceItemsPage = function ReplaceItemsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ReplaceItemsPage.prototype, Page.prototype);\nReplaceItemsPage.prototype.constructor = ReplaceItemsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ReplaceItemsInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsPage#\n *\n * @param {ReplaceItemsPayload} payload - Payload response from the API\n *\n * @returns ReplaceItemsInstance\n */\n/* jshint ignore:end */\nReplaceItemsPage.prototype.getInstance = function getInstance(payload) {\n  return new ReplaceItemsInstance(this._version, payload, this._solution.bundleSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nReplaceItemsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nReplaceItemsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ReplaceItemsContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} regulationSid - The unique string of a regulation\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {replace_items.status} status -\n *          The verification status of the Bundle resource\n * @property {Date} validUntil -\n *          The ISO 8601 date and time in GMT when the resource will be valid until\n * @property {string} email - The email address\n * @property {string} statusCallback -\n *          The URL we call to inform your application of status changes\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n *\n * @param {V2} version - Version of the resource\n * @param {ReplaceItemsPayload} payload - The instance payload\n * @param {sid} bundleSid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nReplaceItemsInstance = function ReplaceItemsInstance(version, payload,\n                                                      bundleSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.regulationSid = payload.regulation_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.validUntil = deserialize.iso8601DateTime(payload.valid_until); // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {bundleSid: bundleSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nReplaceItemsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nReplaceItemsInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ReplaceItemsList: ReplaceItemsList,\n  ReplaceItemsPage: ReplaceItemsPage,\n  ReplaceItemsInstance: ReplaceItemsInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BundleCopyList = require('./bundle/bundleCopy').BundleCopyList;\nvar EvaluationList = require('./bundle/evaluation').EvaluationList;\nvar ItemAssignmentList = require('./bundle/itemAssignment').ItemAssignmentList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar ReplaceItemsList = require('./bundle/replaceItems').ReplaceItemsList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BundleList;\nvar BundlePage;\nvar BundleInstance;\nvar BundleContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BundleList\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nBundleList = function BundleList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function bundles\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext}\n   */\n  /* jshint ignore:end */\n  function BundleListInstance(sid) {\n    return BundleListInstance.get(sid);\n  }\n\n  BundleListInstance._version = version;\n  // Path Solution\n  BundleListInstance._solution = {};\n  BundleListInstance._uri = `/RegulatoryCompliance/Bundles`;\n  /* jshint ignore:start */\n  /**\n   * create a BundleInstance\n   *\n   * @function create\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the resource\n   * @param {string} opts.email - The email address\n   * @param {string} [opts.statusCallback] -\n   *          The URL we call to inform your application of status changes.\n   * @param {string} [opts.regulationSid] - The unique string of a regulation.\n   * @param {string} [opts.isoCountry] - The ISO country code of the country\n   * @param {bundle.end_user_type} [opts.endUserType] -\n   *          The type of End User of the Bundle resource\n   * @param {string} [opts.numberType] - The type of phone number\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed BundleInstance\n   */\n  /* jshint ignore:end */\n  BundleListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['email'])) {\n      throw new Error('Required parameter \"opts[\\'email\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Email': _.get(opts, 'email'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'RegulationSid': _.get(opts, 'regulationSid'),\n      'IsoCountry': _.get(opts, 'isoCountry'),\n      'EndUserType': _.get(opts, 'endUserType'),\n      'NumberType': _.get(opts, 'numberType')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BundleInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams BundleInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {bundle.status} [opts.status] -\n   *          The verification status of the Bundle resource\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.regulationSid] - The unique string of a regulation.\n   * @param {string} [opts.isoCountry] - The ISO country code of the country\n   * @param {string} [opts.numberType] - The type of phone number\n   * @param {boolean} [opts.hasValidUntilDate] -\n   *          Indicates that the Bundle is a valid Bundle until a specified expiration date.\n   * @param {bundle.sort_by} [opts.sortBy] -\n   *          Can be `valid-until` or `date-updated`. Defaults to `date-created`.\n   * @param {bundle.sort_direction} [opts.sortDirection] -\n   *          Default is `DESC`. Can be `ASC` or `DESC`.\n   * @param {Date} [opts.validUntilDateBefore] -\n   *          Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.\n   * @param {Date} [opts.validUntilDate] -\n   *          Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.\n   * @param {Date} [opts.validUntilDateAfter] -\n   *          Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BundleListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BundleInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {bundle.status} [opts.status] -\n   *          The verification status of the Bundle resource\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.regulationSid] - The unique string of a regulation.\n   * @param {string} [opts.isoCountry] - The ISO country code of the country\n   * @param {string} [opts.numberType] - The type of phone number\n   * @param {boolean} [opts.hasValidUntilDate] -\n   *          Indicates that the Bundle is a valid Bundle until a specified expiration date.\n   * @param {bundle.sort_by} [opts.sortBy] -\n   *          Can be `valid-until` or `date-updated`. Defaults to `date-created`.\n   * @param {bundle.sort_direction} [opts.sortDirection] -\n   *          Default is `DESC`. Can be `ASC` or `DESC`.\n   * @param {Date} [opts.validUntilDateBefore] -\n   *          Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.\n   * @param {Date} [opts.validUntilDate] -\n   *          Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.\n   * @param {Date} [opts.validUntilDateAfter] -\n   *          Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BundleListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BundleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {bundle.status} [opts.status] -\n   *          The verification status of the Bundle resource\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.regulationSid] - The unique string of a regulation.\n   * @param {string} [opts.isoCountry] - The ISO country code of the country\n   * @param {string} [opts.numberType] - The type of phone number\n   * @param {boolean} [opts.hasValidUntilDate] -\n   *          Indicates that the Bundle is a valid Bundle until a specified expiration date.\n   * @param {bundle.sort_by} [opts.sortBy] -\n   *          Can be `valid-until` or `date-updated`. Defaults to `date-created`.\n   * @param {bundle.sort_direction} [opts.sortDirection] -\n   *          Default is `DESC`. Can be `ASC` or `DESC`.\n   * @param {Date} [opts.validUntilDateBefore] -\n   *          Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.\n   * @param {Date} [opts.validUntilDate] -\n   *          Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.\n   * @param {Date} [opts.validUntilDateAfter] -\n   *          Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BundleListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'RegulationSid': _.get(opts, 'regulationSid'),\n      'IsoCountry': _.get(opts, 'isoCountry'),\n      'NumberType': _.get(opts, 'numberType'),\n      'HasValidUntilDate': serialize.bool(_.get(opts, 'hasValidUntilDate')),\n      'SortBy': _.get(opts, 'sortBy'),\n      'SortDirection': _.get(opts, 'sortDirection'),\n      'ValidUntilDate<': serialize.iso8601DateTime(_.get(opts, 'validUntilDateBefore')),\n      'ValidUntilDate': serialize.iso8601DateTime(_.get(opts, 'validUntilDate')),\n      'ValidUntilDate>': serialize.iso8601DateTime(_.get(opts, 'validUntilDateAfter')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BundlePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BundleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BundleListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BundlePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a bundle\n   *\n   * @function get\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleList#\n   *\n   * @param {string} sid - The unique string that identifies the resource.\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext}\n   */\n  /* jshint ignore:end */\n  BundleListInstance.get = function get(sid) {\n    return new BundleContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BundleListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BundleListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BundleListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BundlePage\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundlePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BundleSolution} solution - Path solution\n *\n * @returns BundlePage\n */\n/* jshint ignore:end */\nBundlePage = function BundlePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BundlePage.prototype, Page.prototype);\nBundlePage.prototype.constructor = BundlePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BundleInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundlePage#\n *\n * @param {BundlePayload} payload - Payload response from the API\n *\n * @returns BundleInstance\n */\n/* jshint ignore:end */\nBundlePage.prototype.getInstance = function getInstance(payload) {\n  return new BundleInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundlePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBundlePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBundlePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BundleContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance\n *\n * @property {string} sid - The unique string that identifies the resource.\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} regulationSid - The unique string of a regulation.\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {bundle.status} status -\n *          The verification status of the Bundle resource\n * @property {Date} validUntil -\n *          The ISO 8601 date and time in GMT when the resource will be valid until.\n * @property {string} email - The email address\n * @property {string} statusCallback -\n *          The URL we call to inform your application of status changes.\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Bundle resource\n * @property {string} links - The URLs of the Assigned Items of the Bundle resource\n *\n * @param {V2} version - Version of the resource\n * @param {BundlePayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nBundleInstance = function BundleInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.regulationSid = payload.regulation_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.validUntil = deserialize.iso8601DateTime(payload.valid_until); // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(BundleInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BundleContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BundleInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BundleInstance\n */\n/* jshint ignore:end */\nBundleInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a BundleInstance\n *\n * @function update\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {bundle.status} [opts.status] -\n *          The verification status of the Bundle resource\n * @param {string} [opts.statusCallback] -\n *          The URL we call to inform your application of status changes.\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.email] - The email address\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BundleInstance\n */\n/* jshint ignore:end */\nBundleInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a BundleInstance\n *\n * @function remove\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BundleInstance\n */\n/* jshint ignore:end */\nBundleInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the evaluations\n *\n * @function evaluations\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#\n *\n * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList}\n */\n/* jshint ignore:end */\nBundleInstance.prototype.evaluations = function evaluations() {\n  return this._proxy.evaluations;\n};\n\n/* jshint ignore:start */\n/**\n * Access the itemAssignments\n *\n * @function itemAssignments\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#\n *\n * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList}\n */\n/* jshint ignore:end */\nBundleInstance.prototype.itemAssignments = function itemAssignments() {\n  return this._proxy.itemAssignments;\n};\n\n/* jshint ignore:start */\n/**\n * Access the bundleCopies\n *\n * @function bundleCopies\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#\n *\n * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList}\n */\n/* jshint ignore:end */\nBundleInstance.prototype.bundleCopies = function bundleCopies() {\n  return this._proxy.bundleCopies;\n};\n\n/* jshint ignore:start */\n/**\n * Access the replaceItems\n *\n * @function replaceItems\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#\n *\n * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList}\n */\n/* jshint ignore:end */\nBundleInstance.prototype.replaceItems = function replaceItems() {\n  return this._proxy.replaceItems;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBundleInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBundleInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BundleContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext\n *\n * @property {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.EvaluationList} evaluations -\n *          evaluations resource\n * @property {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ItemAssignmentList} itemAssignments -\n *          itemAssignments resource\n * @property {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.BundleCopyList} bundleCopies -\n *          bundleCopies resource\n * @property {Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext.ReplaceItemsList} replaceItems -\n *          replaceItems resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nBundleContext = function BundleContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/RegulatoryCompliance/Bundles/${sid}`;\n\n  // Dependents\n  this._evaluations = undefined;\n  this._itemAssignments = undefined;\n  this._bundleCopies = undefined;\n  this._replaceItems = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BundleInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BundleInstance\n */\n/* jshint ignore:end */\nBundleContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BundleInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a BundleInstance\n *\n * @function update\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext#\n *\n * @param {object} [opts] - Options for request\n * @param {bundle.status} [opts.status] -\n *          The verification status of the Bundle resource\n * @param {string} [opts.statusCallback] -\n *          The URL we call to inform your application of status changes.\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.email] - The email address\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BundleInstance\n */\n/* jshint ignore:end */\nBundleContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Status': _.get(opts, 'status'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Email': _.get(opts, 'email')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BundleInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a BundleInstance\n *\n * @function remove\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BundleInstance\n */\n/* jshint ignore:end */\nBundleContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(BundleContext.prototype,\n  'evaluations', {\n    get: function() {\n      if (!this._evaluations) {\n        this._evaluations = new EvaluationList(this._version, this._solution.sid);\n      }\n      return this._evaluations;\n    }\n});\n\nObject.defineProperty(BundleContext.prototype,\n  'itemAssignments', {\n    get: function() {\n      if (!this._itemAssignments) {\n        this._itemAssignments = new ItemAssignmentList(this._version, this._solution.sid);\n      }\n      return this._itemAssignments;\n    }\n});\n\nObject.defineProperty(BundleContext.prototype,\n  'bundleCopies', {\n    get: function() {\n      if (!this._bundleCopies) {\n        this._bundleCopies = new BundleCopyList(this._version, this._solution.sid);\n      }\n      return this._bundleCopies;\n    }\n});\n\nObject.defineProperty(BundleContext.prototype,\n  'replaceItems', {\n    get: function() {\n      if (!this._replaceItems) {\n        this._replaceItems = new ReplaceItemsList(this._version, this._solution.sid);\n      }\n      return this._replaceItems;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.BundleContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBundleContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBundleContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BundleList: BundleList,\n  BundlePage: BundlePage,\n  BundleInstance: BundleInstance,\n  BundleContext: BundleContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar EndUserList;\nvar EndUserPage;\nvar EndUserInstance;\nvar EndUserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserList\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nEndUserList = function EndUserList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function endUsers\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserContext}\n   */\n  /* jshint ignore:end */\n  function EndUserListInstance(sid) {\n    return EndUserListInstance.get(sid);\n  }\n\n  EndUserListInstance._version = version;\n  // Path Solution\n  EndUserListInstance._solution = {};\n  EndUserListInstance._uri = `/RegulatoryCompliance/EndUsers`;\n  /* jshint ignore:start */\n  /**\n   * create a EndUserInstance\n   *\n   * @function create\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the resource\n   * @param {end_user.type} opts.type - The type of end user of the Bundle resource\n   * @param {object} [opts.attributes] -\n   *          The set of parameters that compose the End User resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed EndUserInstance\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Attributes': serialize.object(_.get(opts, 'attributes'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams EndUserInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EndUserInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EndUserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EndUserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a end_user\n   *\n   * @function get\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserContext}\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.get = function get(sid) {\n    return new EndUserContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EndUserListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EndUserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserPage\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EndUserSolution} solution - Path solution\n *\n * @returns EndUserPage\n */\n/* jshint ignore:end */\nEndUserPage = function EndUserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EndUserPage.prototype, Page.prototype);\nEndUserPage.prototype.constructor = EndUserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EndUserInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserPage#\n *\n * @param {EndUserPayload} payload - Payload response from the API\n *\n * @returns EndUserInstance\n */\n/* jshint ignore:end */\nEndUserPage.prototype.getInstance = function getInstance(payload) {\n  return new EndUserInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEndUserPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {end_user.type} type - The type of end user of the Bundle resource\n * @property {object} attributes -\n *          The set of parameters that compose the End Users resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the End User resource\n *\n * @param {V2} version - Version of the resource\n * @param {EndUserPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nEndUserInstance = function EndUserInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(EndUserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EndUserContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EndUserInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a EndUserInstance\n *\n * @function update\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {object} [opts.attributes] -\n *          The set of parameters that compose the End User resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a EndUserInstance\n *\n * @function remove\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEndUserInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nEndUserContext = function EndUserContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/RegulatoryCompliance/EndUsers/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EndUserInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EndUserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a EndUserInstance\n *\n * @function update\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {object} [opts.attributes] -\n *          The set of parameters that compose the End User resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Attributes': serialize.object(_.get(opts, 'attributes'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EndUserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a EndUserInstance\n *\n * @function remove\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEndUserContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EndUserList: EndUserList,\n  EndUserPage: EndUserPage,\n  EndUserInstance: EndUserInstance,\n  EndUserContext: EndUserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar EndUserTypeList;\nvar EndUserTypePage;\nvar EndUserTypeInstance;\nvar EndUserTypeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserTypeList\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nEndUserTypeList = function EndUserTypeList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function endUserTypes\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeContext}\n   */\n  /* jshint ignore:end */\n  function EndUserTypeListInstance(sid) {\n    return EndUserTypeListInstance.get(sid);\n  }\n\n  EndUserTypeListInstance._version = version;\n  // Path Solution\n  EndUserTypeListInstance._solution = {};\n  EndUserTypeListInstance._uri = `/RegulatoryCompliance/EndUserTypes`;\n  /* jshint ignore:start */\n  /**\n   * Streams EndUserTypeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EndUserTypeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EndUserTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EndUserTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a end_user_type\n   *\n   * @function get\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeList#\n   *\n   * @param {string} sid -\n   *          The unique string that identifies the End-User Type resource\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeContext}\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.get = function get(sid) {\n    return new EndUserTypeContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EndUserTypeListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EndUserTypeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserTypePage\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EndUserTypeSolution} solution - Path solution\n *\n * @returns EndUserTypePage\n */\n/* jshint ignore:end */\nEndUserTypePage = function EndUserTypePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EndUserTypePage.prototype, Page.prototype);\nEndUserTypePage.prototype.constructor = EndUserTypePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EndUserTypeInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypePage#\n *\n * @param {EndUserTypePayload} payload - Payload response from the API\n *\n * @returns EndUserTypeInstance\n */\n/* jshint ignore:end */\nEndUserTypePage.prototype.getInstance = function getInstance(payload) {\n  return new EndUserTypeInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserTypePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEndUserTypePage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserTypeContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the End-User Type resource\n * @property {string} friendlyName -\n *          A human-readable description of the End-User Type resource\n * @property {string} machineName -\n *          A machine-readable description of the End-User Type resource\n * @property {object} fields - The required information for creating an End-User.\n * @property {string} url - The absolute URL of the End-User Type resource\n *\n * @param {V2} version - Version of the resource\n * @param {EndUserTypePayload} payload - The instance payload\n * @param {sid_like} sid -\n *          The unique string that identifies the End-User Type resource\n */\n/* jshint ignore:end */\nEndUserTypeInstance = function EndUserTypeInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.machineName = payload.machine_name; // jshint ignore:line\n  this.fields = payload.fields; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(EndUserTypeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EndUserTypeContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EndUserTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserTypeInstance\n */\n/* jshint ignore:end */\nEndUserTypeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserTypeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEndUserTypeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserTypeContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid_like} sid -\n *          The unique string that identifies the End-User Type resource\n */\n/* jshint ignore:end */\nEndUserTypeContext = function EndUserTypeContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/RegulatoryCompliance/EndUserTypes/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EndUserTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserTypeInstance\n */\n/* jshint ignore:end */\nEndUserTypeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EndUserTypeInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.EndUserTypeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserTypeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEndUserTypeContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EndUserTypeList: EndUserTypeList,\n  EndUserTypePage: EndUserTypePage,\n  EndUserTypeInstance: EndUserTypeInstance,\n  EndUserTypeContext: EndUserTypeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RegulationList;\nvar RegulationPage;\nvar RegulationInstance;\nvar RegulationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RegulationList\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nRegulationList = function RegulationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function regulations\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationContext}\n   */\n  /* jshint ignore:end */\n  function RegulationListInstance(sid) {\n    return RegulationListInstance.get(sid);\n  }\n\n  RegulationListInstance._version = version;\n  // Path Solution\n  RegulationListInstance._solution = {};\n  RegulationListInstance._uri = `/RegulatoryCompliance/Regulations`;\n  /* jshint ignore:start */\n  /**\n   * Streams RegulationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {regulation.end_user_type} [opts.endUserType] -\n   *          The type of End User of the Regulation resource\n   * @param {string} [opts.isoCountry] -\n   *          The ISO country code of the phone number's country\n   * @param {string} [opts.numberType] - The type of phone number being regulated\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RegulationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RegulationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {regulation.end_user_type} [opts.endUserType] -\n   *          The type of End User of the Regulation resource\n   * @param {string} [opts.isoCountry] -\n   *          The ISO country code of the phone number's country\n   * @param {string} [opts.numberType] - The type of phone number being regulated\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RegulationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RegulationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {regulation.end_user_type} [opts.endUserType] -\n   *          The type of End User of the Regulation resource\n   * @param {string} [opts.isoCountry] -\n   *          The ISO country code of the phone number's country\n   * @param {string} [opts.numberType] - The type of phone number being regulated\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RegulationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'EndUserType': _.get(opts, 'endUserType'),\n      'IsoCountry': _.get(opts, 'isoCountry'),\n      'NumberType': _.get(opts, 'numberType'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RegulationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RegulationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RegulationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RegulationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a regulation\n   *\n   * @function get\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationList#\n   *\n   * @param {string} sid - The unique string that identifies the Regulation resource\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationContext}\n   */\n  /* jshint ignore:end */\n  RegulationListInstance.get = function get(sid) {\n    return new RegulationContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RegulationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RegulationListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RegulationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RegulationPage\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RegulationSolution} solution - Path solution\n *\n * @returns RegulationPage\n */\n/* jshint ignore:end */\nRegulationPage = function RegulationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RegulationPage.prototype, Page.prototype);\nRegulationPage.prototype.constructor = RegulationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RegulationInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationPage#\n *\n * @param {RegulationPayload} payload - Payload response from the API\n *\n * @returns RegulationInstance\n */\n/* jshint ignore:end */\nRegulationPage.prototype.getInstance = function getInstance(payload) {\n  return new RegulationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRegulationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRegulationPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RegulationContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Regulation resource\n * @property {string} friendlyName -\n *          A human-readable description of the Regulation resource\n * @property {string} isoCountry -\n *          The ISO country code of the phone number's country\n * @property {string} numberType -\n *          The type of phone number restricted by the regulatory requirement\n * @property {regulation.end_user_type} endUserType -\n *          The type of End User of the Regulation resource\n * @property {object} requirements -\n *          The sid of a regulation object that dictates requirements\n * @property {string} url - The absolute URL of the Regulation resource\n *\n * @param {V2} version - Version of the resource\n * @param {RegulationPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the Regulation resource\n */\n/* jshint ignore:end */\nRegulationInstance = function RegulationInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.numberType = payload.number_type; // jshint ignore:line\n  this.endUserType = payload.end_user_type; // jshint ignore:line\n  this.requirements = payload.requirements; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(RegulationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RegulationContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RegulationInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RegulationInstance\n */\n/* jshint ignore:end */\nRegulationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRegulationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRegulationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RegulationContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the Regulation resource\n */\n/* jshint ignore:end */\nRegulationContext = function RegulationContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/RegulatoryCompliance/Regulations/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RegulationInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RegulationInstance\n */\n/* jshint ignore:end */\nRegulationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RegulationInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.RegulationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRegulationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRegulationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RegulationList: RegulationList,\n  RegulationPage: RegulationPage,\n  RegulationInstance: RegulationInstance,\n  RegulationContext: RegulationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SupportingDocumentList;\nvar SupportingDocumentPage;\nvar SupportingDocumentInstance;\nvar SupportingDocumentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentList\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nSupportingDocumentList = function SupportingDocumentList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function supportingDocuments\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentContext}\n   */\n  /* jshint ignore:end */\n  function SupportingDocumentListInstance(sid) {\n    return SupportingDocumentListInstance.get(sid);\n  }\n\n  SupportingDocumentListInstance._version = version;\n  // Path Solution\n  SupportingDocumentListInstance._solution = {};\n  SupportingDocumentListInstance._uri = `/RegulatoryCompliance/SupportingDocuments`;\n  /* jshint ignore:start */\n  /**\n   * create a SupportingDocumentInstance\n   *\n   * @function create\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the resource\n   * @param {string} opts.type - The type of the Supporting Document\n   * @param {object} [opts.attributes] -\n   *          The set of parameters that compose the Supporting Documents resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SupportingDocumentInstance\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Attributes': serialize.object(_.get(opts, 'attributes'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SupportingDocumentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SupportingDocumentInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SupportingDocumentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SupportingDocumentInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a supporting_document\n   *\n   * @function get\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentContext}\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.get = function get(sid) {\n    return new SupportingDocumentContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SupportingDocumentListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SupportingDocumentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentPage\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SupportingDocumentSolution} solution - Path solution\n *\n * @returns SupportingDocumentPage\n */\n/* jshint ignore:end */\nSupportingDocumentPage = function SupportingDocumentPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SupportingDocumentPage.prototype, Page.prototype);\nSupportingDocumentPage.prototype.constructor = SupportingDocumentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SupportingDocumentInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentPage#\n *\n * @param {SupportingDocumentPayload} payload - Payload response from the API\n *\n * @returns SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentPage.prototype.getInstance = function getInstance(payload) {\n  return new SupportingDocumentInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSupportingDocumentPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} mimeType - The image type of the file\n * @property {supporting_document.status} status -\n *          The verification status of the Supporting Document resource\n * @property {string} failureReason -\n *          The failure reason of the Supporting Document Resource.\n * @property {string} type - The type of the Supporting Document\n * @property {object} attributes -\n *          The set of parameters that compose the Supporting Documents resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Supporting Document resource\n *\n * @param {V2} version - Version of the resource\n * @param {SupportingDocumentPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSupportingDocumentInstance = function SupportingDocumentInstance(version,\n    payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.mimeType = payload.mime_type; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.failureReason = payload.failure_reason; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SupportingDocumentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SupportingDocumentContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SupportingDocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SupportingDocumentInstance\n *\n * @function update\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {object} [opts.attributes] -\n *          The set of parameters that compose the Supporting Document resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SupportingDocumentInstance\n *\n * @function remove\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSupportingDocumentInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSupportingDocumentContext = function SupportingDocumentContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/RegulatoryCompliance/SupportingDocuments/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SupportingDocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SupportingDocumentInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SupportingDocumentInstance\n *\n * @function update\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {object} [opts.attributes] -\n *          The set of parameters that compose the Supporting Document resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Attributes': serialize.object(_.get(opts, 'attributes'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SupportingDocumentInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SupportingDocumentInstance\n *\n * @function remove\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSupportingDocumentContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SupportingDocumentList: SupportingDocumentList,\n  SupportingDocumentPage: SupportingDocumentPage,\n  SupportingDocumentInstance: SupportingDocumentInstance,\n  SupportingDocumentContext: SupportingDocumentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SupportingDocumentTypeList;\nvar SupportingDocumentTypePage;\nvar SupportingDocumentTypeInstance;\nvar SupportingDocumentTypeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentTypeList\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nSupportingDocumentTypeList = function SupportingDocumentTypeList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function supportingDocumentTypes\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeContext}\n   */\n  /* jshint ignore:end */\n  function SupportingDocumentTypeListInstance(sid) {\n    return SupportingDocumentTypeListInstance.get(sid);\n  }\n\n  SupportingDocumentTypeListInstance._version = version;\n  // Path Solution\n  SupportingDocumentTypeListInstance._solution = {};\n  SupportingDocumentTypeListInstance._uri = `/RegulatoryCompliance/SupportingDocumentTypes`;\n  /* jshint ignore:start */\n  /**\n   * Streams SupportingDocumentTypeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SupportingDocumentTypeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SupportingDocumentTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SupportingDocumentTypeInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a supporting_document_type\n   *\n   * @function get\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeList#\n   *\n   * @param {string} sid -\n   *          The unique string that identifies the Supporting Document Type resource\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeContext}\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.get = function get(sid) {\n    return new SupportingDocumentTypeContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SupportingDocumentTypeListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SupportingDocumentTypeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentTypePage\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SupportingDocumentTypeSolution} solution - Path solution\n *\n * @returns SupportingDocumentTypePage\n */\n/* jshint ignore:end */\nSupportingDocumentTypePage = function SupportingDocumentTypePage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SupportingDocumentTypePage.prototype, Page.prototype);\nSupportingDocumentTypePage.prototype.constructor = SupportingDocumentTypePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SupportingDocumentTypeInstance\n *\n * @function getInstance\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypePage#\n *\n * @param {SupportingDocumentTypePayload} payload - Payload response from the API\n *\n * @returns SupportingDocumentTypeInstance\n */\n/* jshint ignore:end */\nSupportingDocumentTypePage.prototype.getInstance = function getInstance(payload)\n    {\n  return new SupportingDocumentTypeInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentTypePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSupportingDocumentTypePage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentTypeContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Supporting Document Type resource\n * @property {string} friendlyName -\n *          A human-readable description of the Supporting Document Type resource\n * @property {string} machineName -\n *          The machine-readable description of the Supporting Document Type resource\n * @property {object} fields -\n *          The required information for creating a Supporting Document\n * @property {string} url -\n *          The absolute URL of the Supporting Document Type resource\n *\n * @param {V2} version - Version of the resource\n * @param {SupportingDocumentTypePayload} payload - The instance payload\n * @param {sid_like} sid -\n *          The unique string that identifies the Supporting Document Type resource\n */\n/* jshint ignore:end */\nSupportingDocumentTypeInstance = function\n    SupportingDocumentTypeInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.machineName = payload.machine_name; // jshint ignore:line\n  this.fields = payload.fields; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SupportingDocumentTypeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SupportingDocumentTypeContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SupportingDocumentTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentTypeInstance\n */\n/* jshint ignore:end */\nSupportingDocumentTypeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentTypeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSupportingDocumentTypeInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentTypeContext\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid_like} sid -\n *          The unique string that identifies the Supporting Document Type resource\n */\n/* jshint ignore:end */\nSupportingDocumentTypeContext = function SupportingDocumentTypeContext(version,\n    sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/RegulatoryCompliance/SupportingDocumentTypes/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SupportingDocumentTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentTypeInstance\n */\n/* jshint ignore:end */\nSupportingDocumentTypeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SupportingDocumentTypeInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Numbers.V2.RegulatoryComplianceContext.SupportingDocumentTypeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentTypeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSupportingDocumentTypeContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SupportingDocumentTypeList: SupportingDocumentTypeList,\n  SupportingDocumentTypePage: SupportingDocumentTypePage,\n  SupportingDocumentTypeInstance: SupportingDocumentTypeInstance,\n  SupportingDocumentTypeContext: SupportingDocumentTypeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BundleList = require('./regulatoryCompliance/bundle').BundleList;\nvar EndUserList = require('./regulatoryCompliance/endUser').EndUserList;\nvar EndUserTypeList = require(\n    './regulatoryCompliance/endUserType').EndUserTypeList;\nvar RegulationList = require(\n    './regulatoryCompliance/regulation').RegulationList;\nvar SupportingDocumentList = require(\n    './regulatoryCompliance/supportingDocument').SupportingDocumentList;\nvar SupportingDocumentTypeList = require(\n    './regulatoryCompliance/supportingDocumentType').SupportingDocumentTypeList;\n\nvar RegulatoryComplianceList;\n\n/* jshint ignore:start */\n/**\n * Initialize the RegulatoryComplianceList\n *\n * @constructor Twilio.Numbers.V2.RegulatoryComplianceList\n *\n * @param {Twilio.Numbers.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nRegulatoryComplianceList = function RegulatoryComplianceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function regulatoryCompliance\n   * @memberof Twilio.Numbers.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Numbers.V2.RegulatoryComplianceContext}\n   */\n  /* jshint ignore:end */\n  function RegulatoryComplianceListInstance(sid) {\n    return RegulatoryComplianceListInstance.get(sid);\n  }\n\n  RegulatoryComplianceListInstance._version = version;\n  // Path Solution\n  RegulatoryComplianceListInstance._solution = {};\n\n  // Components\n  RegulatoryComplianceListInstance._bundles = undefined;\n  RegulatoryComplianceListInstance._endUsers = undefined;\n  RegulatoryComplianceListInstance._endUserTypes = undefined;\n  RegulatoryComplianceListInstance._regulations = undefined;\n  RegulatoryComplianceListInstance._supportingDocuments = undefined;\n  RegulatoryComplianceListInstance._supportingDocumentTypes = undefined;\n\n  Object.defineProperty(RegulatoryComplianceListInstance,\n    'bundles', {\n      get: function bundles() {\n        if (!this._bundles) {\n          this._bundles = new BundleList(this._version);\n        }\n\n        return this._bundles;\n      }\n  });\n\n  Object.defineProperty(RegulatoryComplianceListInstance,\n    'endUsers', {\n      get: function endUsers() {\n        if (!this._endUsers) {\n          this._endUsers = new EndUserList(this._version);\n        }\n\n        return this._endUsers;\n      }\n  });\n\n  Object.defineProperty(RegulatoryComplianceListInstance,\n    'endUserTypes', {\n      get: function endUserTypes() {\n        if (!this._endUserTypes) {\n          this._endUserTypes = new EndUserTypeList(this._version);\n        }\n\n        return this._endUserTypes;\n      }\n  });\n\n  Object.defineProperty(RegulatoryComplianceListInstance,\n    'regulations', {\n      get: function regulations() {\n        if (!this._regulations) {\n          this._regulations = new RegulationList(this._version);\n        }\n\n        return this._regulations;\n      }\n  });\n\n  Object.defineProperty(RegulatoryComplianceListInstance,\n    'supportingDocuments', {\n      get: function supportingDocuments() {\n        if (!this._supportingDocuments) {\n          this._supportingDocuments = new SupportingDocumentList(this._version);\n        }\n\n        return this._supportingDocuments;\n      }\n  });\n\n  Object.defineProperty(RegulatoryComplianceListInstance,\n    'supportingDocumentTypes', {\n      get: function supportingDocumentTypes() {\n        if (!this._supportingDocumentTypes) {\n          this._supportingDocumentTypes = new SupportingDocumentTypeList(this._version);\n        }\n\n        return this._supportingDocumentTypes;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Numbers.V2.RegulatoryComplianceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RegulatoryComplianceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RegulatoryComplianceListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RegulatoryComplianceListInstance;\n};\n\nmodule.exports = {\n  RegulatoryComplianceList: RegulatoryComplianceList\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar RegulatoryComplianceList = require(\n    './v2/regulatoryCompliance').RegulatoryComplianceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V2 version of Numbers\n *\n * @constructor Twilio.Numbers.V2\n *\n * @property {Twilio.Numbers.V2.RegulatoryComplianceList} regulatoryCompliance -\n *          regulatoryCompliance resource\n *\n * @param {Twilio.Numbers} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V2(domain) {\n  Version.prototype.constructor.call(this, domain, 'v2');\n\n  // Resources\n  this._regulatoryCompliance = undefined;\n}\n\n_.extend(V2.prototype, Version.prototype);\nV2.prototype.constructor = V2;\n\nObject.defineProperty(V2.prototype,\n  'regulatoryCompliance', {\n    get: function() {\n      this._regulatoryCompliance = this._regulatoryCompliance || new RegulatoryComplianceList(this);\n      return this._regulatoryCompliance;\n    }\n});\n\nmodule.exports = V2;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V2 = require('./numbers/V2');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize numbers domain\n *\n * @constructor Twilio.Numbers\n *\n * @property {Twilio.Numbers.V2} v2 - v2 version\n * @property {Twilio.Numbers.V2.RegulatoryComplianceList} regulatoryCompliance -\n *          regulatoryCompliance resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Numbers(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://numbers.twilio.com');\n\n  // Versions\n  this._v2 = undefined;\n}\n\n_.extend(Numbers.prototype, Domain.prototype);\nNumbers.prototype.constructor = Numbers;\n\nObject.defineProperty(Numbers.prototype,\n  'v2', {\n    get: function() {\n      this._v2 = this._v2 || new V2(this);\n      return this._v2;\n    }\n});\n\nObject.defineProperty(Numbers.prototype,\n  'regulatoryCompliance', {\n    get: function() {\n      return this.v2.regulatoryCompliance;\n    }\n});\n\nmodule.exports = Numbers;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ExportConfigurationList;\nvar ExportConfigurationPage;\nvar ExportConfigurationInstance;\nvar ExportConfigurationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportConfigurationList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportConfigurationList\n *\n * @param {Twilio.Preview.BulkExports} version - Version of the resource\n */\n/* jshint ignore:end */\nExportConfigurationList = function ExportConfigurationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function exportConfiguration\n   * @memberof Twilio.Preview.BulkExports#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.BulkExports.ExportConfigurationContext}\n   */\n  /* jshint ignore:end */\n  function ExportConfigurationListInstance(sid) {\n    return ExportConfigurationListInstance.get(sid);\n  }\n\n  ExportConfigurationListInstance._version = version;\n  // Path Solution\n  ExportConfigurationListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a export_configuration\n   *\n   * @function get\n   * @memberof Twilio.Preview.BulkExports.ExportConfigurationList#\n   *\n   * @param {string} resourceType -\n   *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n   *\n   * @returns {Twilio.Preview.BulkExports.ExportConfigurationContext}\n   */\n  /* jshint ignore:end */\n  ExportConfigurationListInstance.get = function get(resourceType) {\n    return new ExportConfigurationContext(this._version, resourceType);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.BulkExports.ExportConfigurationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExportConfigurationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExportConfigurationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExportConfigurationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportConfigurationPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportConfigurationPage\n *\n * @param {BulkExports} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExportConfigurationSolution} solution - Path solution\n *\n * @returns ExportConfigurationPage\n */\n/* jshint ignore:end */\nExportConfigurationPage = function ExportConfigurationPage(version, response,\n                                                            solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExportConfigurationPage.prototype, Page.prototype);\nExportConfigurationPage.prototype.constructor = ExportConfigurationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExportConfigurationInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.BulkExports.ExportConfigurationPage#\n *\n * @param {ExportConfigurationPayload} payload - Payload response from the API\n *\n * @returns ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationPage.prototype.getInstance = function getInstance(payload) {\n  return new ExportConfigurationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportConfigurationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportConfigurationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportConfigurationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportConfigurationContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportConfigurationInstance\n *\n * @property {boolean} enabled - Whether files are automatically generated\n * @property {string} webhookUrl - URL targeted at export\n * @property {string} webhookMethod - Whether to GET or POST to the webhook url\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @property {string} url - The URL of this resource.\n *\n * @param {BulkExports} version - Version of the resource\n * @param {ExportConfigurationPayload} payload - The instance payload\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportConfigurationInstance = function ExportConfigurationInstance(version,\n    payload, resourceType) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {resourceType: resourceType || this.resourceType, };\n};\n\nObject.defineProperty(ExportConfigurationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExportConfigurationContext(this._version, this._solution.resourceType);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExportConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.BulkExports.ExportConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ExportConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Preview.BulkExports.ExportConfigurationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.enabled] - Whether files are automatically generated\n * @param {string} [opts.webhookUrl] - URL targeted at export\n * @param {string} [opts.webhookMethod] - Whether to GET or POST to the webhook url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportConfigurationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportConfigurationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportConfigurationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportConfigurationContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportConfigurationContext\n *\n * @param {BulkExports} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportConfigurationContext = function ExportConfigurationContext(version,\n    resourceType) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {resourceType: resourceType, };\n  this._uri = `/Exports/${resourceType}/Configuration`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExportConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.BulkExports.ExportConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExportConfigurationInstance(\n      this._version,\n      payload,\n      this._solution.resourceType\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ExportConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Preview.BulkExports.ExportConfigurationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.enabled] - Whether files are automatically generated\n * @param {string} [opts.webhookUrl] - URL targeted at export\n * @param {string} [opts.webhookMethod] - Whether to GET or POST to the webhook url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Enabled': serialize.bool(_.get(opts, 'enabled')),\n    'WebhookUrl': _.get(opts, 'webhookUrl'),\n    'WebhookMethod': _.get(opts, 'webhookMethod')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExportConfigurationInstance(\n      this._version,\n      payload,\n      this._solution.resourceType\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportConfigurationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportConfigurationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExportConfigurationContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExportConfigurationList: ExportConfigurationList,\n  ExportConfigurationPage: ExportConfigurationPage,\n  ExportConfigurationInstance: ExportConfigurationInstance,\n  ExportConfigurationContext: ExportConfigurationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DayList;\nvar DayPage;\nvar DayInstance;\nvar DayContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DayList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.DayList\n *\n * @param {Twilio.Preview.BulkExports} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nDayList = function DayList(version, resourceType) {\n  /* jshint ignore:start */\n  /**\n   * @function days\n   * @memberof Twilio.Preview.BulkExports.ExportContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.BulkExports.ExportContext.DayContext}\n   */\n  /* jshint ignore:end */\n  function DayListInstance(sid) {\n    return DayListInstance.get(sid);\n  }\n\n  DayListInstance._version = version;\n  // Path Solution\n  DayListInstance._solution = {resourceType: resourceType};\n  DayListInstance._uri = `/Exports/${resourceType}/Days`;\n  /* jshint ignore:start */\n  /**\n   * Streams DayInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.BulkExports.ExportContext.DayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DayListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DayInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.BulkExports.ExportContext.DayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DayListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DayInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.BulkExports.ExportContext.DayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DayListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DayPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DayInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.BulkExports.ExportContext.DayList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DayListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DayPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a day\n   *\n   * @function get\n   * @memberof Twilio.Preview.BulkExports.ExportContext.DayList#\n   *\n   * @param {string} day - The date of the data in the file\n   *\n   * @returns {Twilio.Preview.BulkExports.ExportContext.DayContext}\n   */\n  /* jshint ignore:end */\n  DayListInstance.get = function get(day) {\n    return new DayContext(this._version, this._solution.resourceType, day);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.BulkExports.ExportContext.DayList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DayListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DayListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DayListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DayPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.DayPage\n *\n * @param {BulkExports} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DaySolution} solution - Path solution\n *\n * @returns DayPage\n */\n/* jshint ignore:end */\nDayPage = function DayPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DayPage.prototype, Page.prototype);\nDayPage.prototype.constructor = DayPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DayInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.BulkExports.ExportContext.DayPage#\n *\n * @param {DayPayload} payload - Payload response from the API\n *\n * @returns DayInstance\n */\n/* jshint ignore:end */\nDayPage.prototype.getInstance = function getInstance(payload) {\n  return new DayInstance(this._version, payload, this._solution.resourceType);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportContext.DayPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDayPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDayPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DayContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.DayInstance\n *\n * @property {string} redirectTo - The redirect_to\n * @property {string} day - The date of the data in the file\n * @property {number} size - Size of the file in bytes\n * @property {string} createDate - The date when resource is created\n * @property {string} friendlyName -\n *          The friendly name specified when creating the job\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n *\n * @param {BulkExports} version - Version of the resource\n * @param {DayPayload} payload - The instance payload\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @param {string} day - The date of the data in the file\n */\n/* jshint ignore:end */\nDayInstance = function DayInstance(version, payload, resourceType, day) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.redirectTo = payload.redirect_to; // jshint ignore:line\n  this.day = payload.day; // jshint ignore:line\n  this.size = deserialize.integer(payload.size); // jshint ignore:line\n  this.createDate = payload.create_date; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.resourceType = payload.resource_type; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {resourceType: resourceType, day: day || this.day, };\n};\n\nObject.defineProperty(DayInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DayContext(this._version, this._solution.resourceType, this._solution.day);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DayInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.BulkExports.ExportContext.DayInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DayInstance\n */\n/* jshint ignore:end */\nDayInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportContext.DayInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDayInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDayInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DayContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.DayContext\n *\n * @param {BulkExports} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @param {string} day - The date of the data in the file\n */\n/* jshint ignore:end */\nDayContext = function DayContext(version, resourceType, day) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {resourceType: resourceType, day: day, };\n  this._uri = `/Exports/${resourceType}/Days/${day}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DayInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.BulkExports.ExportContext.DayContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DayInstance\n */\n/* jshint ignore:end */\nDayContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DayInstance(\n      this._version,\n      payload,\n      this._solution.resourceType,\n      this._solution.day\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportContext.DayContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDayContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDayContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DayList: DayList,\n  DayPage: DayPage,\n  DayInstance: DayInstance,\n  DayContext: DayContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ExportCustomJobList;\nvar ExportCustomJobPage;\nvar ExportCustomJobInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportCustomJobList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList\n *\n * @param {Twilio.Preview.BulkExports} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportCustomJobList = function ExportCustomJobList(version, resourceType) {\n  /* jshint ignore:start */\n  /**\n   * @function exportCustomJobs\n   * @memberof Twilio.Preview.BulkExports.ExportContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.BulkExports.ExportContext.ExportCustomJobContext}\n   */\n  /* jshint ignore:end */\n  function ExportCustomJobListInstance(sid) {\n    return ExportCustomJobListInstance.get(sid);\n  }\n\n  ExportCustomJobListInstance._version = version;\n  // Path Solution\n  ExportCustomJobListInstance._solution = {resourceType: resourceType};\n  ExportCustomJobListInstance._uri = `/Exports/${resourceType}/Jobs`;\n  /* jshint ignore:start */\n  /**\n   * Streams ExportCustomJobInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ExportCustomJobInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ExportCustomJobInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExportCustomJobPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ExportCustomJobInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExportCustomJobPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ExportCustomJobInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.startDay -\n   *          The start day for the custom export specified as a string in the format of yyyy-mm-dd\n   * @param {string} opts.endDay -\n   *          The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day.\n   * @param {string} opts.friendlyName -\n   *          The friendly name specified when creating the job\n   * @param {string} [opts.webhookUrl] -\n   *          The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied.\n   * @param {string} [opts.webhookMethod] -\n   *          This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied.\n   * @param {string} [opts.email] -\n   *          The optional email to send the completion notification to\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ExportCustomJobInstance\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['startDay'])) {\n      throw new Error('Required parameter \"opts[\\'startDay\\']\" missing.');\n    }\n    if (_.isUndefined(opts['endDay'])) {\n      throw new Error('Required parameter \"opts[\\'endDay\\']\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'StartDay': _.get(opts, 'startDay'),\n      'EndDay': _.get(opts, 'endDay'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'WebhookUrl': _.get(opts, 'webhookUrl'),\n      'WebhookMethod': _.get(opts, 'webhookMethod'),\n      'Email': _.get(opts, 'email')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExportCustomJobInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExportCustomJobListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExportCustomJobListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportCustomJobPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.ExportCustomJobPage\n *\n * @param {BulkExports} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExportCustomJobSolution} solution - Path solution\n *\n * @returns ExportCustomJobPage\n */\n/* jshint ignore:end */\nExportCustomJobPage = function ExportCustomJobPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExportCustomJobPage.prototype, Page.prototype);\nExportCustomJobPage.prototype.constructor = ExportCustomJobPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExportCustomJobInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.BulkExports.ExportContext.ExportCustomJobPage#\n *\n * @param {ExportCustomJobPayload} payload - Payload response from the API\n *\n * @returns ExportCustomJobInstance\n */\n/* jshint ignore:end */\nExportCustomJobPage.prototype.getInstance = function getInstance(payload) {\n  return new ExportCustomJobInstance(this._version, payload, this._solution.resourceType);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportContext.ExportCustomJobPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportCustomJobPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportCustomJobPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportCustomJobContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.ExportCustomJobInstance\n *\n * @property {string} friendlyName -\n *          The friendly name specified when creating the job\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @property {string} startDay -\n *          The start day for the custom export specified as a string in the format of yyyy-MM-dd\n * @property {string} endDay -\n *          The end day for the custom export specified as a string in the format of yyyy-MM-dd\n * @property {string} webhookUrl - The optional webhook url called on completion\n * @property {string} webhookMethod - This is the method used to call the webhook\n * @property {string} email -\n *          The optional email to send the completion notification to\n * @property {string} jobSid -\n *          The unique job_sid returned when the custom export was created. This can be used to look up the status of the job.\n * @property {object} details - The details\n *\n * @param {BulkExports} version - Version of the resource\n * @param {ExportCustomJobPayload} payload - The instance payload\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportCustomJobInstance = function ExportCustomJobInstance(version, payload,\n                                                            resourceType) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.startDay = payload.start_day; // jshint ignore:line\n  this.endDay = payload.end_day; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.jobSid = payload.job_sid; // jshint ignore:line\n  this.details = payload.details; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {resourceType: resourceType, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportContext.ExportCustomJobInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportCustomJobInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportCustomJobInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExportCustomJobList: ExportCustomJobList,\n  ExportCustomJobPage: ExportCustomJobPage,\n  ExportCustomJobInstance: ExportCustomJobInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar JobList;\nvar JobPage;\nvar JobInstance;\nvar JobContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the JobList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.JobList\n *\n * @param {Twilio.Preview.BulkExports} version - Version of the resource\n */\n/* jshint ignore:end */\nJobList = function JobList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function jobs\n   * @memberof Twilio.Preview.BulkExports.ExportContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.BulkExports.ExportContext.JobContext}\n   */\n  /* jshint ignore:end */\n  function JobListInstance(sid) {\n    return JobListInstance.get(sid);\n  }\n\n  JobListInstance._version = version;\n  // Path Solution\n  JobListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a job\n   *\n   * @function get\n   * @memberof Twilio.Preview.BulkExports.ExportContext.JobList#\n   *\n   * @param {string} jobSid -\n   *          The unique string that that we created to identify the Bulk Export job\n   *\n   * @returns {Twilio.Preview.BulkExports.ExportContext.JobContext}\n   */\n  /* jshint ignore:end */\n  JobListInstance.get = function get(jobSid) {\n    return new JobContext(this._version, jobSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.BulkExports.ExportContext.JobList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  JobListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  JobListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return JobListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the JobPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.JobPage\n *\n * @param {BulkExports} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {JobSolution} solution - Path solution\n *\n * @returns JobPage\n */\n/* jshint ignore:end */\nJobPage = function JobPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(JobPage.prototype, Page.prototype);\nJobPage.prototype.constructor = JobPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of JobInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.BulkExports.ExportContext.JobPage#\n *\n * @param {JobPayload} payload - Payload response from the API\n *\n * @returns JobInstance\n */\n/* jshint ignore:end */\nJobPage.prototype.getInstance = function getInstance(payload) {\n  return new JobInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportContext.JobPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nJobPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nJobPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the JobContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.JobInstance\n *\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @property {string} friendlyName -\n *          The friendly name specified when creating the job\n * @property {object} details -\n *          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\n * @property {string} startDay -\n *          The start time for the export specified when creating the job\n * @property {string} endDay -\n *          The end time for the export specified when creating the job\n * @property {string} jobSid - The job_sid returned when the export was created\n * @property {string} webhookUrl - The optional webhook url called on completion\n * @property {string} webhookMethod - This is the method used to call the webhook\n * @property {string} email -\n *          The optional email to send the completion notification to\n * @property {string} url - The url\n *\n * @param {BulkExports} version - Version of the resource\n * @param {JobPayload} payload - The instance payload\n * @param {sid} jobSid -\n *          The unique string that that we created to identify the Bulk Export job\n */\n/* jshint ignore:end */\nJobInstance = function JobInstance(version, payload, jobSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.details = payload.details; // jshint ignore:line\n  this.startDay = payload.start_day; // jshint ignore:line\n  this.endDay = payload.end_day; // jshint ignore:line\n  this.jobSid = payload.job_sid; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {jobSid: jobSid || this.jobSid, };\n};\n\nObject.defineProperty(JobInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new JobContext(this._version, this._solution.jobSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a JobInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.BulkExports.ExportContext.JobInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed JobInstance\n */\n/* jshint ignore:end */\nJobInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a JobInstance\n *\n * @function remove\n * @memberof Twilio.Preview.BulkExports.ExportContext.JobInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed JobInstance\n */\n/* jshint ignore:end */\nJobInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportContext.JobInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nJobInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nJobInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the JobContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext.JobContext\n *\n * @param {BulkExports} version - Version of the resource\n * @param {sid} jobSid -\n *          The unique string that that we created to identify the Bulk Export job\n */\n/* jshint ignore:end */\nJobContext = function JobContext(version, jobSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {jobSid: jobSid, };\n  this._uri = `/Exports/Jobs/${jobSid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a JobInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.BulkExports.ExportContext.JobContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed JobInstance\n */\n/* jshint ignore:end */\nJobContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new JobInstance(this._version, payload, this._solution.jobSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a JobInstance\n *\n * @function remove\n * @memberof Twilio.Preview.BulkExports.ExportContext.JobContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed JobInstance\n */\n/* jshint ignore:end */\nJobContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportContext.JobContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nJobContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nJobContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  JobList: JobList,\n  JobPage: JobPage,\n  JobInstance: JobInstance,\n  JobContext: JobContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DayList = require('./export/day').DayList;\nvar ExportCustomJobList = require(\n    './export/exportCustomJob').ExportCustomJobList;\nvar JobList = require('./export/job').JobList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ExportList;\nvar ExportPage;\nvar ExportInstance;\nvar ExportContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportList\n *\n * @param {Twilio.Preview.BulkExports} version - Version of the resource\n */\n/* jshint ignore:end */\nExportList = function ExportList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function exports\n   * @memberof Twilio.Preview.BulkExports#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.BulkExports.ExportContext}\n   */\n  /* jshint ignore:end */\n  function ExportListInstance(sid) {\n    return ExportListInstance.get(sid);\n  }\n\n  ExportListInstance._version = version;\n  // Path Solution\n  ExportListInstance._solution = {};\n\n  // Components\n  ExportListInstance._jobs = undefined;\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a export\n   *\n   * @function get\n   * @memberof Twilio.Preview.BulkExports.ExportList#\n   *\n   * @param {string} resourceType -\n   *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n   *\n   * @returns {Twilio.Preview.BulkExports.ExportContext}\n   */\n  /* jshint ignore:end */\n  ExportListInstance.get = function get(resourceType) {\n    return new ExportContext(this._version, resourceType);\n  };\n\n  Object.defineProperty(ExportListInstance,\n    'jobs', {\n      get: function jobs() {\n        if (!this._jobs) {\n          this._jobs = new JobList(this._version);\n        }\n\n        return this._jobs;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.BulkExports.ExportList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExportListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExportListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExportListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportPage\n *\n * @param {BulkExports} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExportSolution} solution - Path solution\n *\n * @returns ExportPage\n */\n/* jshint ignore:end */\nExportPage = function ExportPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExportPage.prototype, Page.prototype);\nExportPage.prototype.constructor = ExportPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExportInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.BulkExports.ExportPage#\n *\n * @param {ExportPayload} payload - Payload response from the API\n *\n * @returns ExportInstance\n */\n/* jshint ignore:end */\nExportPage.prototype.getInstance = function getInstance(payload) {\n  return new ExportInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportInstance\n *\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @property {string} url - The URL of this resource.\n * @property {string} links - Nested resource URLs.\n *\n * @param {BulkExports} version - Version of the resource\n * @param {ExportPayload} payload - The instance payload\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportInstance = function ExportInstance(version, payload, resourceType) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {resourceType: resourceType || this.resourceType, };\n};\n\nObject.defineProperty(ExportInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExportContext(this._version, this._solution.resourceType);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExportInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.BulkExports.ExportInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportInstance\n */\n/* jshint ignore:end */\nExportInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the days\n *\n * @function days\n * @memberof Twilio.Preview.BulkExports.ExportInstance#\n *\n * @returns {Twilio.Preview.BulkExports.ExportContext.DayList}\n */\n/* jshint ignore:end */\nExportInstance.prototype.days = function days() {\n  return this._proxy.days;\n};\n\n/* jshint ignore:start */\n/**\n * Access the exportCustomJobs\n *\n * @function exportCustomJobs\n * @memberof Twilio.Preview.BulkExports.ExportInstance#\n *\n * @returns {Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList}\n */\n/* jshint ignore:end */\nExportInstance.prototype.exportCustomJobs = function exportCustomJobs() {\n  return this._proxy.exportCustomJobs;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.BulkExports.ExportContext\n *\n * @property {Twilio.Preview.BulkExports.ExportContext.DayList} days -\n *          days resource\n * @property {Twilio.Preview.BulkExports.ExportContext.ExportCustomJobList} exportCustomJobs -\n *          exportCustomJobs resource\n *\n * @param {BulkExports} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportContext = function ExportContext(version, resourceType) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {resourceType: resourceType, };\n  this._uri = `/Exports/${resourceType}`;\n\n  // Dependents\n  this._days = undefined;\n  this._exportCustomJobs = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExportInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.BulkExports.ExportContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportInstance\n */\n/* jshint ignore:end */\nExportContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExportInstance(this._version, payload, this._solution.resourceType));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ExportContext.prototype,\n  'days', {\n    get: function() {\n      if (!this._days) {\n        this._days = new DayList(this._version, this._solution.resourceType);\n      }\n      return this._days;\n    }\n});\n\nObject.defineProperty(ExportContext.prototype,\n  'exportCustomJobs', {\n    get: function() {\n      if (!this._exportCustomJobs) {\n        this._exportCustomJobs = new ExportCustomJobList(this._version, this._solution.resourceType);\n      }\n      return this._exportCustomJobs;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.BulkExports.ExportContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExportContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExportList: ExportList,\n  ExportPage: ExportPage,\n  ExportInstance: ExportInstance,\n  ExportContext: ExportContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar ExportConfigurationList = require(\n    './bulk_exports/exportConfiguration').ExportConfigurationList;\nvar ExportList = require('./bulk_exports/export').ExportList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BulkExports version of Preview\n *\n * @constructor Twilio.Preview.BulkExports\n *\n * @property {Twilio.Preview.BulkExports.ExportList} exports - exports resource\n * @property {Twilio.Preview.BulkExports.ExportConfigurationList} exportConfiguration -\n *          exportConfiguration resource\n *\n * @param {Twilio.Preview} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction BulkExports(domain) {\n  Version.prototype.constructor.call(this, domain, 'BulkExports');\n\n  // Resources\n  this._exports = undefined;\n  this._exportConfiguration = undefined;\n}\n\n_.extend(BulkExports.prototype, Version.prototype);\nBulkExports.prototype.constructor = BulkExports;\n\nObject.defineProperty(BulkExports.prototype,\n  'exports', {\n    get: function() {\n      this._exports = this._exports || new ExportList(this);\n      return this._exports;\n    }\n});\n\nObject.defineProperty(BulkExports.prototype,\n  'exportConfiguration', {\n    get: function() {\n      this._exportConfiguration = this._exportConfiguration || new ExportConfigurationList(this);\n      return this._exportConfiguration;\n    }\n});\n\nmodule.exports = BulkExports;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CertificateList;\nvar CertificatePage;\nvar CertificateInstance;\nvar CertificateContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CertificateList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.CertificateList\n *\n * @param {Twilio.Preview.DeployedDevices} version - Version of the resource\n * @param {string} fleetSid - The unique identifier of the Fleet.\n */\n/* jshint ignore:end */\nCertificateList = function CertificateList(version, fleetSid) {\n  /* jshint ignore:start */\n  /**\n   * @function certificates\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext.CertificateContext}\n   */\n  /* jshint ignore:end */\n  function CertificateListInstance(sid) {\n    return CertificateListInstance.get(sid);\n  }\n\n  CertificateListInstance._version = version;\n  // Path Solution\n  CertificateListInstance._solution = {fleetSid: fleetSid};\n  CertificateListInstance._uri = `/Fleets/${fleetSid}/Certificates`;\n  /* jshint ignore:start */\n  /**\n   * create a CertificateInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.certificateData - The public certificate data.\n   * @param {string} [opts.friendlyName] -\n   *          The human readable description for this Certificate.\n   * @param {string} [opts.deviceSid] -\n   *          The unique identifier of a Device to be authenticated.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CertificateInstance\n   */\n  /* jshint ignore:end */\n  CertificateListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['certificateData'])) {\n      throw new Error('Required parameter \"opts[\\'certificateData\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'CertificateData': _.get(opts, 'certificateData'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'DeviceSid': _.get(opts, 'deviceSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CertificateInstance(\n        this._version,\n        payload,\n        this._solution.fleetSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams CertificateInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.deviceSid] -\n   *          Find all Certificates authenticating specified Device.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CertificateListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CertificateInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.deviceSid] -\n   *          Find all Certificates authenticating specified Device.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CertificateListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CertificateInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.deviceSid] -\n   *          Find all Certificates authenticating specified Device.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CertificateListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DeviceSid': _.get(opts, 'deviceSid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CertificatePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CertificateInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CertificateListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CertificatePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a certificate\n   *\n   * @function get\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateList#\n   *\n   * @param {string} sid - A string that uniquely identifies the Certificate.\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext.CertificateContext}\n   */\n  /* jshint ignore:end */\n  CertificateListInstance.get = function get(sid) {\n    return new CertificateContext(this._version, this._solution.fleetSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CertificateListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CertificateListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CertificateListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CertificatePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.CertificatePage\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CertificateSolution} solution - Path solution\n *\n * @returns CertificatePage\n */\n/* jshint ignore:end */\nCertificatePage = function CertificatePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CertificatePage.prototype, Page.prototype);\nCertificatePage.prototype.constructor = CertificatePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CertificateInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificatePage#\n *\n * @param {CertificatePayload} payload - Payload response from the API\n *\n * @returns CertificateInstance\n */\n/* jshint ignore:end */\nCertificatePage.prototype.getInstance = function getInstance(payload) {\n  return new CertificateInstance(this._version, payload, this._solution.fleetSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificatePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCertificatePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCertificatePage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CertificateContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.CertificateInstance\n *\n * @property {string} sid - A string that uniquely identifies this Certificate.\n * @property {string} url - URL of this Certificate.\n * @property {string} friendlyName -\n *          A human readable description for this Certificate.\n * @property {string} fleetSid - The unique identifier of the Fleet.\n * @property {string} accountSid - The unique SID that identifies this Account.\n * @property {string} deviceSid - The unique identifier of a mapped Device.\n * @property {string} thumbprint - A Certificate unique payload hash.\n * @property {Date} dateCreated - The date this Certificate was created.\n * @property {Date} dateUpdated - The date this Certificate was updated.\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {CertificatePayload} payload - The instance payload\n * @param {sid_like} fleetSid - The unique identifier of the Fleet.\n * @param {sid} sid - A string that uniquely identifies the Certificate.\n */\n/* jshint ignore:end */\nCertificateInstance = function CertificateInstance(version, payload, fleetSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.fleetSid = payload.fleet_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.deviceSid = payload.device_sid; // jshint ignore:line\n  this.thumbprint = payload.thumbprint; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {fleetSid: fleetSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(CertificateInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CertificateContext(this._version, this._solution.fleetSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CertificateInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CertificateInstance\n */\n/* jshint ignore:end */\nCertificateInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CertificateInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CertificateInstance\n */\n/* jshint ignore:end */\nCertificateInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CertificateInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human readable description for this Certificate.\n * @param {string} [opts.deviceSid] -\n *          The unique identifier of a Device to be authenticated.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CertificateInstance\n */\n/* jshint ignore:end */\nCertificateInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCertificateInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCertificateInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CertificateContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.CertificateContext\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {sid_like} fleetSid - The fleet_sid\n * @param {sid} sid - A string that uniquely identifies the Certificate.\n */\n/* jshint ignore:end */\nCertificateContext = function CertificateContext(version, fleetSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {fleetSid: fleetSid, sid: sid, };\n  this._uri = `/Fleets/${fleetSid}/Certificates/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CertificateInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CertificateInstance\n */\n/* jshint ignore:end */\nCertificateContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CertificateInstance(\n      this._version,\n      payload,\n      this._solution.fleetSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CertificateInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CertificateInstance\n */\n/* jshint ignore:end */\nCertificateContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CertificateInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human readable description for this Certificate.\n * @param {string} [opts.deviceSid] -\n *          The unique identifier of a Device to be authenticated.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CertificateInstance\n */\n/* jshint ignore:end */\nCertificateContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DeviceSid': _.get(opts, 'deviceSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CertificateInstance(\n      this._version,\n      payload,\n      this._solution.fleetSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.CertificateContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCertificateContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCertificateContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CertificateList: CertificateList,\n  CertificatePage: CertificatePage,\n  CertificateInstance: CertificateInstance,\n  CertificateContext: CertificateContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DeploymentList;\nvar DeploymentPage;\nvar DeploymentInstance;\nvar DeploymentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DeploymentList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.DeploymentList\n *\n * @param {Twilio.Preview.DeployedDevices} version - Version of the resource\n * @param {string} fleetSid - The unique identifier of the Fleet.\n */\n/* jshint ignore:end */\nDeploymentList = function DeploymentList(version, fleetSid) {\n  /* jshint ignore:start */\n  /**\n   * @function deployments\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext.DeploymentContext}\n   */\n  /* jshint ignore:end */\n  function DeploymentListInstance(sid) {\n    return DeploymentListInstance.get(sid);\n  }\n\n  DeploymentListInstance._version = version;\n  // Path Solution\n  DeploymentListInstance._solution = {fleetSid: fleetSid};\n  DeploymentListInstance._uri = `/Fleets/${fleetSid}/Deployments`;\n  /* jshint ignore:start */\n  /**\n   * create a DeploymentInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description for this Deployment.\n   * @param {string} [opts.syncServiceSid] -\n   *          The unique identifier of the Sync service instance.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed DeploymentInstance\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'SyncServiceSid': _.get(opts, 'syncServiceSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeploymentInstance(\n        this._version,\n        payload,\n        this._solution.fleetSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams DeploymentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DeploymentInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DeploymentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeploymentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DeploymentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeploymentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a deployment\n   *\n   * @function get\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentList#\n   *\n   * @param {string} sid - A string that uniquely identifies the Deployment.\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext.DeploymentContext}\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.get = function get(sid) {\n    return new DeploymentContext(this._version, this._solution.fleetSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DeploymentListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DeploymentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeploymentPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.DeploymentPage\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DeploymentSolution} solution - Path solution\n *\n * @returns DeploymentPage\n */\n/* jshint ignore:end */\nDeploymentPage = function DeploymentPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DeploymentPage.prototype, Page.prototype);\nDeploymentPage.prototype.constructor = DeploymentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DeploymentInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentPage#\n *\n * @param {DeploymentPayload} payload - Payload response from the API\n *\n * @returns DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentPage.prototype.getInstance = function getInstance(payload) {\n  return new DeploymentInstance(this._version, payload, this._solution.fleetSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeploymentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeploymentPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeploymentContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.DeploymentInstance\n *\n * @property {string} sid - A string that uniquely identifies this Deployment.\n * @property {string} url - URL of this Deployment.\n * @property {string} friendlyName -\n *          A human readable description for this Deployment\n * @property {string} fleetSid - The unique identifier of the Fleet.\n * @property {string} accountSid - The unique SID that identifies this Account.\n * @property {string} syncServiceSid -\n *          The unique identifier of the Sync service instance.\n * @property {Date} dateCreated - The date this Deployment was created.\n * @property {Date} dateUpdated - The date this Deployment was updated.\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {DeploymentPayload} payload - The instance payload\n * @param {sid_like} fleetSid - The unique identifier of the Fleet.\n * @param {sid} sid - A string that uniquely identifies the Deployment.\n */\n/* jshint ignore:end */\nDeploymentInstance = function DeploymentInstance(version, payload, fleetSid,\n                                                  sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.fleetSid = payload.fleet_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.syncServiceSid = payload.sync_service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {fleetSid: fleetSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(DeploymentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DeploymentContext(this._version, this._solution.fleetSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DeploymentInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a DeploymentInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a DeploymentInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A human readable description for this Deployment.\n * @param {string} [opts.syncServiceSid] -\n *          The unique identifier of the Sync service instance.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeploymentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeploymentInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeploymentContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.DeploymentContext\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {sid_like} fleetSid - The fleet_sid\n * @param {sid} sid - A string that uniquely identifies the Deployment.\n */\n/* jshint ignore:end */\nDeploymentContext = function DeploymentContext(version, fleetSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {fleetSid: fleetSid, sid: sid, };\n  this._uri = `/Fleets/${fleetSid}/Deployments/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DeploymentInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DeploymentInstance(\n      this._version,\n      payload,\n      this._solution.fleetSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a DeploymentInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a DeploymentInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A human readable description for this Deployment.\n * @param {string} [opts.syncServiceSid] -\n *          The unique identifier of the Sync service instance.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'SyncServiceSid': _.get(opts, 'syncServiceSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DeploymentInstance(\n      this._version,\n      payload,\n      this._solution.fleetSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeploymentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeploymentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDeploymentContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DeploymentList: DeploymentList,\n  DeploymentPage: DeploymentPage,\n  DeploymentInstance: DeploymentInstance,\n  DeploymentContext: DeploymentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DeviceList;\nvar DevicePage;\nvar DeviceInstance;\nvar DeviceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DeviceList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.DeviceList\n *\n * @param {Twilio.Preview.DeployedDevices} version - Version of the resource\n * @param {string} fleetSid - The unique identifier of the Fleet.\n */\n/* jshint ignore:end */\nDeviceList = function DeviceList(version, fleetSid) {\n  /* jshint ignore:start */\n  /**\n   * @function devices\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext.DeviceContext}\n   */\n  /* jshint ignore:end */\n  function DeviceListInstance(sid) {\n    return DeviceListInstance.get(sid);\n  }\n\n  DeviceListInstance._version = version;\n  // Path Solution\n  DeviceListInstance._solution = {fleetSid: fleetSid};\n  DeviceListInstance._uri = `/Fleets/${fleetSid}/Devices`;\n  /* jshint ignore:start */\n  /**\n   * create a DeviceInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] - A unique, addressable name of this Device.\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description for this Device.\n   * @param {string} [opts.identity] - An identifier of the Device user.\n   * @param {string} [opts.deploymentSid] - The unique SID of the Deployment group.\n   * @param {boolean} [opts.enabled] - The enabled\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed DeviceInstance\n   */\n  /* jshint ignore:end */\n  DeviceListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Identity': _.get(opts, 'identity'),\n      'DeploymentSid': _.get(opts, 'deploymentSid'),\n      'Enabled': serialize.bool(_.get(opts, 'enabled'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeviceInstance(\n        this._version,\n        payload,\n        this._solution.fleetSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams DeviceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.deploymentSid] -\n   *          Find all Devices grouped under the specified Deployment.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DeviceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DeviceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.deploymentSid] -\n   *          Find all Devices grouped under the specified Deployment.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeviceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DeviceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.deploymentSid] -\n   *          Find all Devices grouped under the specified Deployment.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeviceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DeploymentSid': _.get(opts, 'deploymentSid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DevicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DeviceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeviceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DevicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a device\n   *\n   * @function get\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceList#\n   *\n   * @param {string} sid - A string that uniquely identifies the Device.\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext.DeviceContext}\n   */\n  /* jshint ignore:end */\n  DeviceListInstance.get = function get(sid) {\n    return new DeviceContext(this._version, this._solution.fleetSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DeviceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DeviceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DeviceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DevicePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.DevicePage\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DeviceSolution} solution - Path solution\n *\n * @returns DevicePage\n */\n/* jshint ignore:end */\nDevicePage = function DevicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DevicePage.prototype, Page.prototype);\nDevicePage.prototype.constructor = DevicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DeviceInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DevicePage#\n *\n * @param {DevicePayload} payload - Payload response from the API\n *\n * @returns DeviceInstance\n */\n/* jshint ignore:end */\nDevicePage.prototype.getInstance = function getInstance(payload) {\n  return new DeviceInstance(this._version, payload, this._solution.fleetSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DevicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDevicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDevicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeviceContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.DeviceInstance\n *\n * @property {string} sid - A string that uniquely identifies this Device.\n * @property {string} url - URL of this Device.\n * @property {string} uniqueName - A unique, addressable name of this Device.\n * @property {string} friendlyName - A human readable description for this Device\n * @property {string} fleetSid - The unique identifier of the Fleet.\n * @property {boolean} enabled - Device enabled flag.\n * @property {string} accountSid - The unique SID that identifies this Account.\n * @property {string} identity - An identifier of the Device user.\n * @property {string} deploymentSid - The unique SID of the Deployment group.\n * @property {Date} dateCreated - The date this Device was created.\n * @property {Date} dateUpdated - The date this Device was updated.\n * @property {Date} dateAuthenticated - The date this Device was authenticated.\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {DevicePayload} payload - The instance payload\n * @param {sid_like} fleetSid - The unique identifier of the Fleet.\n * @param {sid_like} sid - A string that uniquely identifies the Device.\n */\n/* jshint ignore:end */\nDeviceInstance = function DeviceInstance(version, payload, fleetSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.fleetSid = payload.fleet_sid; // jshint ignore:line\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.deploymentSid = payload.deployment_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.dateAuthenticated = deserialize.iso8601DateTime(payload.date_authenticated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {fleetSid: fleetSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(DeviceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DeviceContext(this._version, this._solution.fleetSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DeviceInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeviceInstance\n */\n/* jshint ignore:end */\nDeviceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a DeviceInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeviceInstance\n */\n/* jshint ignore:end */\nDeviceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a DeviceInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A human readable description for this Device.\n * @param {string} [opts.identity] - An identifier of the Device user.\n * @param {string} [opts.deploymentSid] - The unique SID of the Deployment group.\n * @param {boolean} [opts.enabled] - The enabled\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeviceInstance\n */\n/* jshint ignore:end */\nDeviceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeviceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeviceInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeviceContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.DeviceContext\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {sid_like} fleetSid - The fleet_sid\n * @param {sid_like} sid - A string that uniquely identifies the Device.\n */\n/* jshint ignore:end */\nDeviceContext = function DeviceContext(version, fleetSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {fleetSid: fleetSid, sid: sid, };\n  this._uri = `/Fleets/${fleetSid}/Devices/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DeviceInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeviceInstance\n */\n/* jshint ignore:end */\nDeviceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DeviceInstance(\n      this._version,\n      payload,\n      this._solution.fleetSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a DeviceInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeviceInstance\n */\n/* jshint ignore:end */\nDeviceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a DeviceInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A human readable description for this Device.\n * @param {string} [opts.identity] - An identifier of the Device user.\n * @param {string} [opts.deploymentSid] - The unique SID of the Deployment group.\n * @param {boolean} [opts.enabled] - The enabled\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeviceInstance\n */\n/* jshint ignore:end */\nDeviceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Identity': _.get(opts, 'identity'),\n    'DeploymentSid': _.get(opts, 'deploymentSid'),\n    'Enabled': serialize.bool(_.get(opts, 'enabled'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DeviceInstance(\n      this._version,\n      payload,\n      this._solution.fleetSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.DeviceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeviceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDeviceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DeviceList: DeviceList,\n  DevicePage: DevicePage,\n  DeviceInstance: DeviceInstance,\n  DeviceContext: DeviceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar KeyList;\nvar KeyPage;\nvar KeyInstance;\nvar KeyContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the KeyList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.KeyList\n *\n * @param {Twilio.Preview.DeployedDevices} version - Version of the resource\n * @param {string} fleetSid - The unique identifier of the Fleet.\n */\n/* jshint ignore:end */\nKeyList = function KeyList(version, fleetSid) {\n  /* jshint ignore:start */\n  /**\n   * @function keys\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext.KeyContext}\n   */\n  /* jshint ignore:end */\n  function KeyListInstance(sid) {\n    return KeyListInstance.get(sid);\n  }\n\n  KeyListInstance._version = version;\n  // Path Solution\n  KeyListInstance._solution = {fleetSid: fleetSid};\n  KeyListInstance._uri = `/Fleets/${fleetSid}/Keys`;\n  /* jshint ignore:start */\n  /**\n   * create a KeyInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The human readable description for this Key.\n   * @param {string} [opts.deviceSid] -\n   *          The unique identifier of a Key to be authenticated.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed KeyInstance\n   */\n  /* jshint ignore:end */\n  KeyListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'DeviceSid': _.get(opts, 'deviceSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new KeyInstance(\n        this._version,\n        payload,\n        this._solution.fleetSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams KeyInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.deviceSid] -\n   *          Find all Keys authenticating specified Device.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  KeyListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists KeyInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.deviceSid] -\n   *          Find all Keys authenticating specified Device.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  KeyListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of KeyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.deviceSid] -\n   *          Find all Keys authenticating specified Device.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  KeyListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DeviceSid': _.get(opts, 'deviceSid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new KeyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of KeyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  KeyListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new KeyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a key\n   *\n   * @function get\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyList#\n   *\n   * @param {string} sid - A string that uniquely identifies the Key.\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext.KeyContext}\n   */\n  /* jshint ignore:end */\n  KeyListInstance.get = function get(sid) {\n    return new KeyContext(this._version, this._solution.fleetSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  KeyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  KeyListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return KeyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the KeyPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.KeyPage\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {KeySolution} solution - Path solution\n *\n * @returns KeyPage\n */\n/* jshint ignore:end */\nKeyPage = function KeyPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(KeyPage.prototype, Page.prototype);\nKeyPage.prototype.constructor = KeyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of KeyInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyPage#\n *\n * @param {KeyPayload} payload - Payload response from the API\n *\n * @returns KeyInstance\n */\n/* jshint ignore:end */\nKeyPage.prototype.getInstance = function getInstance(payload) {\n  return new KeyInstance(this._version, payload, this._solution.fleetSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nKeyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nKeyPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the KeyContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.KeyInstance\n *\n * @property {string} sid - A string that uniquely identifies this Key.\n * @property {string} url - URL of this Key.\n * @property {string} friendlyName - A human readable description for this Key.\n * @property {string} fleetSid - The unique identifier of the Fleet.\n * @property {string} accountSid - The unique SID that identifies this Account.\n * @property {string} deviceSid - The unique identifier of a mapped Device.\n * @property {string} secret - The key secret.\n * @property {Date} dateCreated - The date this Key credential was created.\n * @property {Date} dateUpdated - The date this Key credential was updated.\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {KeyPayload} payload - The instance payload\n * @param {sid_like} fleetSid - The unique identifier of the Fleet.\n * @param {sid} sid - A string that uniquely identifies the Key.\n */\n/* jshint ignore:end */\nKeyInstance = function KeyInstance(version, payload, fleetSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.fleetSid = payload.fleet_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.deviceSid = payload.device_sid; // jshint ignore:line\n  this.secret = payload.secret; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {fleetSid: fleetSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(KeyInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new KeyContext(this._version, this._solution.fleetSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a KeyInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a KeyInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a KeyInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human readable description for this Key.\n * @param {string} [opts.deviceSid] -\n *          The unique identifier of a Key to be authenticated.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nKeyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nKeyInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the KeyContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext.KeyContext\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {sid_like} fleetSid - The fleet_sid\n * @param {sid} sid - A string that uniquely identifies the Key.\n */\n/* jshint ignore:end */\nKeyContext = function KeyContext(version, fleetSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {fleetSid: fleetSid, sid: sid, };\n  this._uri = `/Fleets/${fleetSid}/Keys/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a KeyInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new KeyInstance(\n      this._version,\n      payload,\n      this._solution.fleetSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a KeyInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a KeyInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The human readable description for this Key.\n * @param {string} [opts.deviceSid] -\n *          The unique identifier of a Key to be authenticated.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed KeyInstance\n */\n/* jshint ignore:end */\nKeyContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DeviceSid': _.get(opts, 'deviceSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new KeyInstance(\n      this._version,\n      payload,\n      this._solution.fleetSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext.KeyContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nKeyContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nKeyContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  KeyList: KeyList,\n  KeyPage: KeyPage,\n  KeyInstance: KeyInstance,\n  KeyContext: KeyContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CertificateList = require('./fleet/certificate').CertificateList;\nvar DeploymentList = require('./fleet/deployment').DeploymentList;\nvar DeviceList = require('./fleet/device').DeviceList;\nvar KeyList = require('./fleet/key').KeyList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar FleetList;\nvar FleetPage;\nvar FleetInstance;\nvar FleetContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FleetList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetList\n *\n * @param {Twilio.Preview.DeployedDevices} version - Version of the resource\n */\n/* jshint ignore:end */\nFleetList = function FleetList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function fleets\n   * @memberof Twilio.Preview.DeployedDevices#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext}\n   */\n  /* jshint ignore:end */\n  function FleetListInstance(sid) {\n    return FleetListInstance.get(sid);\n  }\n\n  FleetListInstance._version = version;\n  // Path Solution\n  FleetListInstance._solution = {};\n  FleetListInstance._uri = `/Fleets`;\n  /* jshint ignore:start */\n  /**\n   * create a FleetInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.DeployedDevices.FleetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description for this Fleet.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FleetInstance\n   */\n  /* jshint ignore:end */\n  FleetListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FleetInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams FleetInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.DeployedDevices.FleetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FleetListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FleetInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.DeployedDevices.FleetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FleetListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FleetInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.DeployedDevices.FleetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FleetListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FleetPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FleetInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.DeployedDevices.FleetList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FleetListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FleetPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a fleet\n   *\n   * @function get\n   * @memberof Twilio.Preview.DeployedDevices.FleetList#\n   *\n   * @param {string} sid - A string that uniquely identifies the Fleet.\n   *\n   * @returns {Twilio.Preview.DeployedDevices.FleetContext}\n   */\n  /* jshint ignore:end */\n  FleetListInstance.get = function get(sid) {\n    return new FleetContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.DeployedDevices.FleetList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FleetListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FleetListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FleetListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FleetPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetPage\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FleetSolution} solution - Path solution\n *\n * @returns FleetPage\n */\n/* jshint ignore:end */\nFleetPage = function FleetPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FleetPage.prototype, Page.prototype);\nFleetPage.prototype.constructor = FleetPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FleetInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.DeployedDevices.FleetPage#\n *\n * @param {FleetPayload} payload - Payload response from the API\n *\n * @returns FleetInstance\n */\n/* jshint ignore:end */\nFleetPage.prototype.getInstance = function getInstance(payload) {\n  return new FleetInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFleetPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFleetPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FleetContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetInstance\n *\n * @property {string} sid - A string that uniquely identifies this Fleet.\n * @property {string} url - URL of this Fleet.\n * @property {string} uniqueName - A unique, addressable name of this Fleet.\n * @property {string} friendlyName - A human readable description for this Fleet.\n * @property {string} accountSid - The unique SID that identifies this Account.\n * @property {string} defaultDeploymentSid -\n *          The unique SID that identifies this Fleet's default Deployment.\n * @property {Date} dateCreated - The date this Fleet was created.\n * @property {Date} dateUpdated - The date this Fleet was updated.\n * @property {string} links - Nested resource URLs.\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {FleetPayload} payload - The instance payload\n * @param {sid_like} sid - A string that uniquely identifies the Fleet.\n */\n/* jshint ignore:end */\nFleetInstance = function FleetInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.defaultDeploymentSid = payload.default_deployment_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(FleetInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FleetContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FleetInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FleetInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FleetInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A human readable description for this Fleet.\n * @param {string} [opts.defaultDeploymentSid] - A default Deployment SID.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the devices\n *\n * @function devices\n * @memberof Twilio.Preview.DeployedDevices.FleetInstance#\n *\n * @returns {Twilio.Preview.DeployedDevices.FleetContext.DeviceList}\n */\n/* jshint ignore:end */\nFleetInstance.prototype.devices = function devices() {\n  return this._proxy.devices;\n};\n\n/* jshint ignore:start */\n/**\n * Access the deployments\n *\n * @function deployments\n * @memberof Twilio.Preview.DeployedDevices.FleetInstance#\n *\n * @returns {Twilio.Preview.DeployedDevices.FleetContext.DeploymentList}\n */\n/* jshint ignore:end */\nFleetInstance.prototype.deployments = function deployments() {\n  return this._proxy.deployments;\n};\n\n/* jshint ignore:start */\n/**\n * Access the certificates\n *\n * @function certificates\n * @memberof Twilio.Preview.DeployedDevices.FleetInstance#\n *\n * @returns {Twilio.Preview.DeployedDevices.FleetContext.CertificateList}\n */\n/* jshint ignore:end */\nFleetInstance.prototype.certificates = function certificates() {\n  return this._proxy.certificates;\n};\n\n/* jshint ignore:start */\n/**\n * Access the keys\n *\n * @function keys\n * @memberof Twilio.Preview.DeployedDevices.FleetInstance#\n *\n * @returns {Twilio.Preview.DeployedDevices.FleetContext.KeyList}\n */\n/* jshint ignore:end */\nFleetInstance.prototype.keys = function keys() {\n  return this._proxy.keys;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFleetInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFleetInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FleetContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.DeployedDevices.FleetContext\n *\n * @property {Twilio.Preview.DeployedDevices.FleetContext.DeviceList} devices -\n *          devices resource\n * @property {Twilio.Preview.DeployedDevices.FleetContext.DeploymentList} deployments -\n *          deployments resource\n * @property {Twilio.Preview.DeployedDevices.FleetContext.CertificateList} certificates -\n *          certificates resource\n * @property {Twilio.Preview.DeployedDevices.FleetContext.KeyList} keys -\n *          keys resource\n *\n * @param {DeployedDevices} version - Version of the resource\n * @param {sid_like} sid - A string that uniquely identifies the Fleet.\n */\n/* jshint ignore:end */\nFleetContext = function FleetContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Fleets/${sid}`;\n\n  // Dependents\n  this._devices = undefined;\n  this._deployments = undefined;\n  this._certificates = undefined;\n  this._keys = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FleetInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.DeployedDevices.FleetContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FleetInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FleetInstance\n *\n * @function remove\n * @memberof Twilio.Preview.DeployedDevices.FleetContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FleetInstance\n *\n * @function update\n * @memberof Twilio.Preview.DeployedDevices.FleetContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A human readable description for this Fleet.\n * @param {string} [opts.defaultDeploymentSid] - A default Deployment SID.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DefaultDeploymentSid': _.get(opts, 'defaultDeploymentSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FleetInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(FleetContext.prototype,\n  'devices', {\n    get: function() {\n      if (!this._devices) {\n        this._devices = new DeviceList(this._version, this._solution.sid);\n      }\n      return this._devices;\n    }\n});\n\nObject.defineProperty(FleetContext.prototype,\n  'deployments', {\n    get: function() {\n      if (!this._deployments) {\n        this._deployments = new DeploymentList(this._version, this._solution.sid);\n      }\n      return this._deployments;\n    }\n});\n\nObject.defineProperty(FleetContext.prototype,\n  'certificates', {\n    get: function() {\n      if (!this._certificates) {\n        this._certificates = new CertificateList(this._version, this._solution.sid);\n      }\n      return this._certificates;\n    }\n});\n\nObject.defineProperty(FleetContext.prototype,\n  'keys', {\n    get: function() {\n      if (!this._keys) {\n        this._keys = new KeyList(this._version, this._solution.sid);\n      }\n      return this._keys;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.DeployedDevices.FleetContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFleetContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFleetContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FleetList: FleetList,\n  FleetPage: FleetPage,\n  FleetInstance: FleetInstance,\n  FleetContext: FleetContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar FleetList = require('./deployed_devices/fleet').FleetList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeployedDevices version of Preview\n *\n * @constructor Twilio.Preview.DeployedDevices\n *\n * @property {Twilio.Preview.DeployedDevices.FleetList} fleets - fleets resource\n *\n * @param {Twilio.Preview} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction DeployedDevices(domain) {\n  Version.prototype.constructor.call(this, domain, 'DeployedDevices');\n\n  // Resources\n  this._fleets = undefined;\n}\n\n_.extend(DeployedDevices.prototype, Version.prototype);\nDeployedDevices.prototype.constructor = DeployedDevices;\n\nObject.defineProperty(DeployedDevices.prototype,\n  'fleets', {\n    get: function() {\n      this._fleets = this._fleets || new FleetList(this);\n      return this._fleets;\n    }\n});\n\nmodule.exports = DeployedDevices;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DependentHostedNumberOrderList;\nvar DependentHostedNumberOrderPage;\nvar DependentHostedNumberOrderInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the DependentHostedNumberOrderList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderList\n *\n * @param {Twilio.Preview.HostedNumbers} version - Version of the resource\n * @param {string} signingDocumentSid - LOA document sid.\n */\n/* jshint ignore:end */\nDependentHostedNumberOrderList = function\n    DependentHostedNumberOrderList(version, signingDocumentSid) {\n  /* jshint ignore:start */\n  /**\n   * @function dependentHostedNumberOrders\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderContext}\n   */\n  /* jshint ignore:end */\n  function DependentHostedNumberOrderListInstance(sid) {\n    return DependentHostedNumberOrderListInstance.get(sid);\n  }\n\n  DependentHostedNumberOrderListInstance._version = version;\n  // Path Solution\n  DependentHostedNumberOrderListInstance._solution = {signingDocumentSid: signingDocumentSid};\n  DependentHostedNumberOrderListInstance._uri = `/AuthorizationDocuments/${signingDocumentSid}/DependentHostedNumberOrders`;\n  /* jshint ignore:start */\n  /**\n   * Streams DependentHostedNumberOrderInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {dependent_hosted_number_order.status} [opts.status] -\n   *          The Status of this HostedNumberOrder.\n   * @param {string} [opts.phoneNumber] - An E164 formatted phone number.\n   * @param {string} [opts.incomingPhoneNumberSid] - IncomingPhoneNumber sid.\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description of this resource.\n   * @param {string} [opts.uniqueName] -\n   *          A unique, developer assigned name of this HostedNumberOrder.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DependentHostedNumberOrderListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DependentHostedNumberOrderInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {dependent_hosted_number_order.status} [opts.status] -\n   *          The Status of this HostedNumberOrder.\n   * @param {string} [opts.phoneNumber] - An E164 formatted phone number.\n   * @param {string} [opts.incomingPhoneNumberSid] - IncomingPhoneNumber sid.\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description of this resource.\n   * @param {string} [opts.uniqueName] -\n   *          A unique, developer assigned name of this HostedNumberOrder.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DependentHostedNumberOrderListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DependentHostedNumberOrderInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {dependent_hosted_number_order.status} [opts.status] -\n   *          The Status of this HostedNumberOrder.\n   * @param {string} [opts.phoneNumber] - An E164 formatted phone number.\n   * @param {string} [opts.incomingPhoneNumberSid] - IncomingPhoneNumber sid.\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description of this resource.\n   * @param {string} [opts.uniqueName] -\n   *          A unique, developer assigned name of this HostedNumberOrder.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DependentHostedNumberOrderListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'IncomingPhoneNumberSid': _.get(opts, 'incomingPhoneNumberSid'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DependentHostedNumberOrderPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DependentHostedNumberOrderInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DependentHostedNumberOrderListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DependentHostedNumberOrderPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DependentHostedNumberOrderListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DependentHostedNumberOrderListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DependentHostedNumberOrderListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DependentHostedNumberOrderPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderPage\n *\n * @param {HostedNumbers} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DependentHostedNumberOrderSolution} solution - Path solution\n *\n * @returns DependentHostedNumberOrderPage\n */\n/* jshint ignore:end */\nDependentHostedNumberOrderPage = function\n    DependentHostedNumberOrderPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DependentHostedNumberOrderPage.prototype, Page.prototype);\nDependentHostedNumberOrderPage.prototype.constructor = DependentHostedNumberOrderPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DependentHostedNumberOrderInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderPage#\n *\n * @param {DependentHostedNumberOrderPayload} payload -\n *          Payload response from the API\n *\n * @returns DependentHostedNumberOrderInstance\n */\n/* jshint ignore:end */\nDependentHostedNumberOrderPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new DependentHostedNumberOrderInstance(\n    this._version,\n    payload,\n    this._solution.signingDocumentSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDependentHostedNumberOrderPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDependentHostedNumberOrderPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DependentHostedNumberOrderContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderInstance\n *\n * @property {string} sid - HostedNumberOrder sid.\n * @property {string} accountSid - Account sid.\n * @property {string} incomingPhoneNumberSid - IncomingPhoneNumber sid.\n * @property {string} addressSid - Address sid.\n * @property {string} signingDocumentSid - LOA document sid.\n * @property {string} phoneNumber - An E164 formatted phone number.\n * @property {PhoneNumberCapabilities} capabilities -\n *          A mapping of phone number capabilities.\n * @property {string} friendlyName - A human readable description of this resource.\n * @property {string} uniqueName -\n *          A unique, developer assigned name of this HostedNumberOrder.\n * @property {dependent_hosted_number_order.status} status -\n *          The Status of this HostedNumberOrder.\n * @property {string} failureReason -\n *          Why a hosted_number_order reached status \"action-required\"\n * @property {Date} dateCreated - The date this HostedNumberOrder was created.\n * @property {Date} dateUpdated - The date this HostedNumberOrder was updated.\n * @property {number} verificationAttempts -\n *          The number of attempts made to verify ownership of the phone number.\n * @property {string} email - Email.\n * @property {string} ccEmails - A list of emails.\n * @property {dependent_hosted_number_order.verification_type} verificationType -\n *          The method used for verifying ownership of the number to be hosted.\n * @property {string} verificationDocumentSid - Verification Document Sid.\n * @property {string} extension -\n *          Phone extension to use for ownership verification call.\n * @property {number} callDelay -\n *          Seconds (0-30) to delay ownership verification call by.\n * @property {string} verificationCode -\n *          The digits passed during the ownership verification call.\n * @property {string} verificationCallSids -\n *          List of IDs for ownership verification calls.\n *\n * @param {HostedNumbers} version - Version of the resource\n * @param {DependentHostedNumberOrderPayload} payload - The instance payload\n * @param {sid} signingDocumentSid - LOA document sid.\n */\n/* jshint ignore:end */\nDependentHostedNumberOrderInstance = function\n    DependentHostedNumberOrderInstance(version, payload, signingDocumentSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.incomingPhoneNumberSid = payload.incoming_phone_number_sid; // jshint ignore:line\n  this.addressSid = payload.address_sid; // jshint ignore:line\n  this.signingDocumentSid = payload.signing_document_sid; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.failureReason = payload.failure_reason; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.verificationAttempts = deserialize.integer(payload.verification_attempts); // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.ccEmails = payload.cc_emails; // jshint ignore:line\n  this.verificationType = payload.verification_type; // jshint ignore:line\n  this.verificationDocumentSid = payload.verification_document_sid; // jshint ignore:line\n  this.extension = payload.extension; // jshint ignore:line\n  this.callDelay = deserialize.integer(payload.call_delay); // jshint ignore:line\n  this.verificationCode = payload.verification_code; // jshint ignore:line\n  this.verificationCallSids = payload.verification_call_sids; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {signingDocumentSid: signingDocumentSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDependentHostedNumberOrderInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDependentHostedNumberOrderInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DependentHostedNumberOrderList: DependentHostedNumberOrderList,\n  DependentHostedNumberOrderPage: DependentHostedNumberOrderPage,\n  DependentHostedNumberOrderInstance: DependentHostedNumberOrderInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DependentHostedNumberOrderList = require(\n    './authorizationDocument/dependentHostedNumberOrder').DependentHostedNumberOrderList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar AuthorizationDocumentList;\nvar AuthorizationDocumentPage;\nvar AuthorizationDocumentInstance;\nvar AuthorizationDocumentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthorizationDocumentList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.AuthorizationDocumentList\n *\n * @param {Twilio.Preview.HostedNumbers} version - Version of the resource\n */\n/* jshint ignore:end */\nAuthorizationDocumentList = function AuthorizationDocumentList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function authorizationDocuments\n   * @memberof Twilio.Preview.HostedNumbers#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.HostedNumbers.AuthorizationDocumentContext}\n   */\n  /* jshint ignore:end */\n  function AuthorizationDocumentListInstance(sid) {\n    return AuthorizationDocumentListInstance.get(sid);\n  }\n\n  AuthorizationDocumentListInstance._version = version;\n  // Path Solution\n  AuthorizationDocumentListInstance._solution = {};\n  AuthorizationDocumentListInstance._uri = `/AuthorizationDocuments`;\n  /* jshint ignore:start */\n  /**\n   * Streams AuthorizationDocumentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.email] - Email.\n   * @param {authorization_document.status} [opts.status] -\n   *          The Status of this AuthorizationDocument.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AuthorizationDocumentListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AuthorizationDocumentInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.email] - Email.\n   * @param {authorization_document.status} [opts.status] -\n   *          The Status of this AuthorizationDocument.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthorizationDocumentListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AuthorizationDocumentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.email] - Email.\n   * @param {authorization_document.status} [opts.status] -\n   *          The Status of this AuthorizationDocument.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthorizationDocumentListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Email': _.get(opts, 'email'),\n      'Status': _.get(opts, 'status'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthorizationDocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AuthorizationDocumentInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AuthorizationDocumentListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthorizationDocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a AuthorizationDocumentInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string|list} opts.hostedNumberOrderSids -\n   *          A list of HostedNumberOrder sids.\n   * @param {string} opts.addressSid - Address sid.\n   * @param {string} opts.email - Email.\n   * @param {string} opts.contactTitle -\n   *          Title of signee of this Authorization Document.\n   * @param {string} opts.contactPhoneNumber -\n   *          Authorization Document's signee's phone number.\n   * @param {string|list} [opts.ccEmails] - A list of emails.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AuthorizationDocumentInstance\n   */\n  /* jshint ignore:end */\n  AuthorizationDocumentListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['hostedNumberOrderSids'])) {\n      throw new Error('Required parameter \"opts[\\'hostedNumberOrderSids\\']\" missing.');\n    }\n    if (_.isUndefined(opts['addressSid'])) {\n      throw new Error('Required parameter \"opts[\\'addressSid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['email'])) {\n      throw new Error('Required parameter \"opts[\\'email\\']\" missing.');\n    }\n    if (_.isUndefined(opts['contactTitle'])) {\n      throw new Error('Required parameter \"opts[\\'contactTitle\\']\" missing.');\n    }\n    if (_.isUndefined(opts['contactPhoneNumber'])) {\n      throw new Error('Required parameter \"opts[\\'contactPhoneNumber\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'HostedNumberOrderSids': serialize.map(_.get(opts, 'hostedNumberOrderSids'), function(e) { return e; }),\n      'AddressSid': _.get(opts, 'addressSid'),\n      'Email': _.get(opts, 'email'),\n      'ContactTitle': _.get(opts, 'contactTitle'),\n      'ContactPhoneNumber': _.get(opts, 'contactPhoneNumber'),\n      'CcEmails': serialize.map(_.get(opts, 'ccEmails'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AuthorizationDocumentInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a authorization_document\n   *\n   * @function get\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentList#\n   *\n   * @param {string} sid - AuthorizationDocument sid.\n   *\n   * @returns {Twilio.Preview.HostedNumbers.AuthorizationDocumentContext}\n   */\n  /* jshint ignore:end */\n  AuthorizationDocumentListInstance.get = function get(sid) {\n    return new AuthorizationDocumentContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AuthorizationDocumentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AuthorizationDocumentListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AuthorizationDocumentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthorizationDocumentPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.AuthorizationDocumentPage\n *\n * @param {HostedNumbers} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AuthorizationDocumentSolution} solution - Path solution\n *\n * @returns AuthorizationDocumentPage\n */\n/* jshint ignore:end */\nAuthorizationDocumentPage = function AuthorizationDocumentPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AuthorizationDocumentPage.prototype, Page.prototype);\nAuthorizationDocumentPage.prototype.constructor = AuthorizationDocumentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AuthorizationDocumentInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentPage#\n *\n * @param {AuthorizationDocumentPayload} payload - Payload response from the API\n *\n * @returns AuthorizationDocumentInstance\n */\n/* jshint ignore:end */\nAuthorizationDocumentPage.prototype.getInstance = function getInstance(payload)\n    {\n  return new AuthorizationDocumentInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthorizationDocumentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthorizationDocumentPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthorizationDocumentContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.AuthorizationDocumentInstance\n *\n * @property {string} sid - AuthorizationDocument sid.\n * @property {string} addressSid - Address sid.\n * @property {authorization_document.status} status -\n *          The Status of this AuthorizationDocument.\n * @property {string} email - Email.\n * @property {string} ccEmails - A list of emails.\n * @property {Date} dateCreated - The date this AuthorizationDocument was created.\n * @property {Date} dateUpdated - The date this AuthorizationDocument was updated.\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {HostedNumbers} version - Version of the resource\n * @param {AuthorizationDocumentPayload} payload - The instance payload\n * @param {sid} sid - AuthorizationDocument sid.\n */\n/* jshint ignore:end */\nAuthorizationDocumentInstance = function AuthorizationDocumentInstance(version,\n    payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.addressSid = payload.address_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.ccEmails = payload.cc_emails; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(AuthorizationDocumentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AuthorizationDocumentContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AuthorizationDocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthorizationDocumentInstance\n */\n/* jshint ignore:end */\nAuthorizationDocumentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AuthorizationDocumentInstance\n *\n * @function update\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string|list} [opts.hostedNumberOrderSids] -\n *          A list of HostedNumberOrder sids.\n * @param {string} [opts.addressSid] - Address sid.\n * @param {string} [opts.email] - Email.\n * @param {string|list} [opts.ccEmails] - A list of emails.\n * @param {authorization_document.status} [opts.status] -\n *          The Status of this AuthorizationDocument.\n * @param {string} [opts.contactTitle] -\n *          Title of signee of this Authorization Document.\n * @param {string} [opts.contactPhoneNumber] -\n *          Authorization Document's signee's phone number.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthorizationDocumentInstance\n */\n/* jshint ignore:end */\nAuthorizationDocumentInstance.prototype.update = function update(opts, callback)\n    {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the dependentHostedNumberOrders\n *\n * @function dependentHostedNumberOrders\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentInstance#\n *\n * @returns {Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderList}\n */\n/* jshint ignore:end */\nAuthorizationDocumentInstance.prototype.dependentHostedNumberOrders = function\n    dependentHostedNumberOrders() {\n  return this._proxy.dependentHostedNumberOrders;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthorizationDocumentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAuthorizationDocumentInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AuthorizationDocumentContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.AuthorizationDocumentContext\n *\n * @property {Twilio.Preview.HostedNumbers.AuthorizationDocumentContext.DependentHostedNumberOrderList} dependentHostedNumberOrders -\n *          dependentHostedNumberOrders resource\n *\n * @param {HostedNumbers} version - Version of the resource\n * @param {sid} sid - AuthorizationDocument sid.\n */\n/* jshint ignore:end */\nAuthorizationDocumentContext = function AuthorizationDocumentContext(version,\n    sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/AuthorizationDocuments/${sid}`;\n\n  // Dependents\n  this._dependentHostedNumberOrders = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AuthorizationDocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthorizationDocumentInstance\n */\n/* jshint ignore:end */\nAuthorizationDocumentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AuthorizationDocumentInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AuthorizationDocumentInstance\n *\n * @function update\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string|list} [opts.hostedNumberOrderSids] -\n *          A list of HostedNumberOrder sids.\n * @param {string} [opts.addressSid] - Address sid.\n * @param {string} [opts.email] - Email.\n * @param {string|list} [opts.ccEmails] - A list of emails.\n * @param {authorization_document.status} [opts.status] -\n *          The Status of this AuthorizationDocument.\n * @param {string} [opts.contactTitle] -\n *          Title of signee of this Authorization Document.\n * @param {string} [opts.contactPhoneNumber] -\n *          Authorization Document's signee's phone number.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AuthorizationDocumentInstance\n */\n/* jshint ignore:end */\nAuthorizationDocumentContext.prototype.update = function update(opts, callback)\n    {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'HostedNumberOrderSids': serialize.map(_.get(opts, 'hostedNumberOrderSids'), function(e) { return e; }),\n    'AddressSid': _.get(opts, 'addressSid'),\n    'Email': _.get(opts, 'email'),\n    'CcEmails': serialize.map(_.get(opts, 'ccEmails'), function(e) { return e; }),\n    'Status': _.get(opts, 'status'),\n    'ContactTitle': _.get(opts, 'contactTitle'),\n    'ContactPhoneNumber': _.get(opts, 'contactPhoneNumber')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AuthorizationDocumentInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AuthorizationDocumentContext.prototype,\n  'dependentHostedNumberOrders', {\n    get: function() {\n      if (!this._dependentHostedNumberOrders) {\n        this._dependentHostedNumberOrders = new DependentHostedNumberOrderList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._dependentHostedNumberOrders;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.HostedNumbers.AuthorizationDocumentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAuthorizationDocumentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAuthorizationDocumentContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AuthorizationDocumentList: AuthorizationDocumentList,\n  AuthorizationDocumentPage: AuthorizationDocumentPage,\n  AuthorizationDocumentInstance: AuthorizationDocumentInstance,\n  AuthorizationDocumentContext: AuthorizationDocumentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar HostedNumberOrderList;\nvar HostedNumberOrderPage;\nvar HostedNumberOrderInstance;\nvar HostedNumberOrderContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the HostedNumberOrderList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.HostedNumberOrderList\n *\n * @param {Twilio.Preview.HostedNumbers} version - Version of the resource\n */\n/* jshint ignore:end */\nHostedNumberOrderList = function HostedNumberOrderList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function hostedNumberOrders\n   * @memberof Twilio.Preview.HostedNumbers#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.HostedNumbers.HostedNumberOrderContext}\n   */\n  /* jshint ignore:end */\n  function HostedNumberOrderListInstance(sid) {\n    return HostedNumberOrderListInstance.get(sid);\n  }\n\n  HostedNumberOrderListInstance._version = version;\n  // Path Solution\n  HostedNumberOrderListInstance._solution = {};\n  HostedNumberOrderListInstance._uri = `/HostedNumberOrders`;\n  /* jshint ignore:start */\n  /**\n   * Streams HostedNumberOrderInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {hosted_number_order.status} [opts.status] -\n   *          The Status of this HostedNumberOrder.\n   * @param {string} [opts.phoneNumber] - An E164 formatted phone number.\n   * @param {string} [opts.incomingPhoneNumberSid] - IncomingPhoneNumber sid.\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description of this resource.\n   * @param {string} [opts.uniqueName] -\n   *          A unique, developer assigned name of this HostedNumberOrder.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  HostedNumberOrderListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists HostedNumberOrderInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {hosted_number_order.status} [opts.status] -\n   *          The Status of this HostedNumberOrder.\n   * @param {string} [opts.phoneNumber] - An E164 formatted phone number.\n   * @param {string} [opts.incomingPhoneNumberSid] - IncomingPhoneNumber sid.\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description of this resource.\n   * @param {string} [opts.uniqueName] -\n   *          A unique, developer assigned name of this HostedNumberOrder.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  HostedNumberOrderListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of HostedNumberOrderInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {hosted_number_order.status} [opts.status] -\n   *          The Status of this HostedNumberOrder.\n   * @param {string} [opts.phoneNumber] - An E164 formatted phone number.\n   * @param {string} [opts.incomingPhoneNumberSid] - IncomingPhoneNumber sid.\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description of this resource.\n   * @param {string} [opts.uniqueName] -\n   *          A unique, developer assigned name of this HostedNumberOrder.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  HostedNumberOrderListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'IncomingPhoneNumberSid': _.get(opts, 'incomingPhoneNumberSid'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new HostedNumberOrderPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of HostedNumberOrderInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  HostedNumberOrderListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new HostedNumberOrderPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a HostedNumberOrderInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.phoneNumber - An E164 formatted phone number.\n   * @param {boolean} opts.smsCapability - Specify SMS capability to host.\n   * @param {string} [opts.accountSid] - Account Sid.\n   * @param {string} [opts.friendlyName] -\n   *          A human readable description of this resource.\n   * @param {string} [opts.uniqueName] -\n   *          A unique, developer assigned name of this HostedNumberOrder.\n   * @param {string|list} [opts.ccEmails] - A list of emails.\n   * @param {string} [opts.smsUrl] - SMS URL.\n   * @param {string} [opts.smsMethod] - SMS Method.\n   * @param {string} [opts.smsFallbackUrl] - SMS Fallback URL.\n   * @param {string} [opts.smsFallbackMethod] - SMS Fallback Method.\n   * @param {string} [opts.statusCallbackUrl] - Status Callback URL.\n   * @param {string} [opts.statusCallbackMethod] - Status Callback Method.\n   * @param {string} [opts.smsApplicationSid] - SMS Application Sid.\n   * @param {string} [opts.addressSid] - Address sid.\n   * @param {string} [opts.email] - Email.\n   * @param {hosted_number_order.verification_type} [opts.verificationType] -\n   *          Verification Type.\n   * @param {string} [opts.verificationDocumentSid] - Verification Document Sid\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed HostedNumberOrderInstance\n   */\n  /* jshint ignore:end */\n  HostedNumberOrderListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['phoneNumber'])) {\n      throw new Error('Required parameter \"opts[\\'phoneNumber\\']\" missing.');\n    }\n    if (_.isUndefined(opts['smsCapability'])) {\n      throw new Error('Required parameter \"opts[\\'smsCapability\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'SmsCapability': serialize.bool(_.get(opts, 'smsCapability')),\n      'AccountSid': _.get(opts, 'accountSid'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'CcEmails': serialize.map(_.get(opts, 'ccEmails'), function(e) { return e; }),\n      'SmsUrl': _.get(opts, 'smsUrl'),\n      'SmsMethod': _.get(opts, 'smsMethod'),\n      'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n      'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n      'StatusCallbackUrl': _.get(opts, 'statusCallbackUrl'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'SmsApplicationSid': _.get(opts, 'smsApplicationSid'),\n      'AddressSid': _.get(opts, 'addressSid'),\n      'Email': _.get(opts, 'email'),\n      'VerificationType': _.get(opts, 'verificationType'),\n      'VerificationDocumentSid': _.get(opts, 'verificationDocumentSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new HostedNumberOrderInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a hosted_number_order\n   *\n   * @function get\n   * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderList#\n   *\n   * @param {string} sid - HostedNumberOrder sid.\n   *\n   * @returns {Twilio.Preview.HostedNumbers.HostedNumberOrderContext}\n   */\n  /* jshint ignore:end */\n  HostedNumberOrderListInstance.get = function get(sid) {\n    return new HostedNumberOrderContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  HostedNumberOrderListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  HostedNumberOrderListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return HostedNumberOrderListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the HostedNumberOrderPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.HostedNumberOrderPage\n *\n * @param {HostedNumbers} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {HostedNumberOrderSolution} solution - Path solution\n *\n * @returns HostedNumberOrderPage\n */\n/* jshint ignore:end */\nHostedNumberOrderPage = function HostedNumberOrderPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(HostedNumberOrderPage.prototype, Page.prototype);\nHostedNumberOrderPage.prototype.constructor = HostedNumberOrderPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of HostedNumberOrderInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderPage#\n *\n * @param {HostedNumberOrderPayload} payload - Payload response from the API\n *\n * @returns HostedNumberOrderInstance\n */\n/* jshint ignore:end */\nHostedNumberOrderPage.prototype.getInstance = function getInstance(payload) {\n  return new HostedNumberOrderInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nHostedNumberOrderPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nHostedNumberOrderPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the HostedNumberOrderContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.HostedNumberOrderInstance\n *\n * @property {string} sid - HostedNumberOrder sid.\n * @property {string} accountSid - Account Sid.\n * @property {string} incomingPhoneNumberSid - IncomingPhoneNumber sid.\n * @property {string} addressSid - Address sid.\n * @property {string} signingDocumentSid - LOA document sid.\n * @property {string} phoneNumber - An E164 formatted phone number.\n * @property {PhoneNumberCapabilities} capabilities -\n *          A mapping of phone number capabilities.\n * @property {string} friendlyName - A human readable description of this resource.\n * @property {string} uniqueName -\n *          A unique, developer assigned name of this HostedNumberOrder.\n * @property {hosted_number_order.status} status -\n *          The Status of this HostedNumberOrder.\n * @property {string} failureReason -\n *          Why a hosted_number_order reached status \"action-required\"\n * @property {Date} dateCreated - The date this HostedNumberOrder was created.\n * @property {Date} dateUpdated - The date this HostedNumberOrder was updated.\n * @property {number} verificationAttempts -\n *          The number of attempts made to verify ownership of the phone number.\n * @property {string} email - Email.\n * @property {string} ccEmails - A list of emails.\n * @property {string} url - The URL of this HostedNumberOrder.\n * @property {hosted_number_order.verification_type} verificationType -\n *          The method used for verifying ownership of the number to be hosted.\n * @property {string} verificationDocumentSid - Verification Document Sid.\n * @property {string} extension -\n *          Phone extension to use for ownership verification call.\n * @property {number} callDelay -\n *          Seconds (0-30) to delay ownership verification call by.\n * @property {string} verificationCode -\n *          The digits passed during the ownership verification call.\n * @property {string} verificationCallSids -\n *          List of IDs for ownership verification calls.\n *\n * @param {HostedNumbers} version - Version of the resource\n * @param {HostedNumberOrderPayload} payload - The instance payload\n * @param {sid} sid - HostedNumberOrder sid.\n */\n/* jshint ignore:end */\nHostedNumberOrderInstance = function HostedNumberOrderInstance(version, payload,\n    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.incomingPhoneNumberSid = payload.incoming_phone_number_sid; // jshint ignore:line\n  this.addressSid = payload.address_sid; // jshint ignore:line\n  this.signingDocumentSid = payload.signing_document_sid; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.failureReason = payload.failure_reason; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.verificationAttempts = deserialize.integer(payload.verification_attempts); // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.ccEmails = payload.cc_emails; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.verificationType = payload.verification_type; // jshint ignore:line\n  this.verificationDocumentSid = payload.verification_document_sid; // jshint ignore:line\n  this.extension = payload.extension; // jshint ignore:line\n  this.callDelay = deserialize.integer(payload.call_delay); // jshint ignore:line\n  this.verificationCode = payload.verification_code; // jshint ignore:line\n  this.verificationCallSids = payload.verification_call_sids; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(HostedNumberOrderInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new HostedNumberOrderContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a HostedNumberOrderInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed HostedNumberOrderInstance\n */\n/* jshint ignore:end */\nHostedNumberOrderInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a HostedNumberOrderInstance\n *\n * @function remove\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed HostedNumberOrderInstance\n */\n/* jshint ignore:end */\nHostedNumberOrderInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a HostedNumberOrderInstance\n *\n * @function update\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A human readable description of this resource.\n * @param {string} [opts.uniqueName] -\n *          A unique, developer assigned name of this HostedNumberOrder.\n * @param {string} [opts.email] - Email.\n * @param {string|list} [opts.ccEmails] - A list of emails.\n * @param {hosted_number_order.status} [opts.status] -\n *          The Status of this HostedNumberOrder.\n * @param {string} [opts.verificationCode] - A verification code.\n * @param {hosted_number_order.verification_type} [opts.verificationType] -\n *          Verification Type.\n * @param {string} [opts.verificationDocumentSid] - Verification Document Sid\n * @param {string} [opts.extension] -\n *          Digits to dial after connecting the verification call.\n * @param {number} [opts.callDelay] -\n *          The number of seconds, between 0 and 60, to delay before initiating the verification call.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed HostedNumberOrderInstance\n */\n/* jshint ignore:end */\nHostedNumberOrderInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nHostedNumberOrderInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nHostedNumberOrderInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the HostedNumberOrderContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.HostedNumbers.HostedNumberOrderContext\n *\n * @param {HostedNumbers} version - Version of the resource\n * @param {sid} sid - HostedNumberOrder sid.\n */\n/* jshint ignore:end */\nHostedNumberOrderContext = function HostedNumberOrderContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/HostedNumberOrders/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a HostedNumberOrderInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed HostedNumberOrderInstance\n */\n/* jshint ignore:end */\nHostedNumberOrderContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new HostedNumberOrderInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a HostedNumberOrderInstance\n *\n * @function remove\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed HostedNumberOrderInstance\n */\n/* jshint ignore:end */\nHostedNumberOrderContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a HostedNumberOrderInstance\n *\n * @function update\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A human readable description of this resource.\n * @param {string} [opts.uniqueName] -\n *          A unique, developer assigned name of this HostedNumberOrder.\n * @param {string} [opts.email] - Email.\n * @param {string|list} [opts.ccEmails] - A list of emails.\n * @param {hosted_number_order.status} [opts.status] -\n *          The Status of this HostedNumberOrder.\n * @param {string} [opts.verificationCode] - A verification code.\n * @param {hosted_number_order.verification_type} [opts.verificationType] -\n *          Verification Type.\n * @param {string} [opts.verificationDocumentSid] - Verification Document Sid\n * @param {string} [opts.extension] -\n *          Digits to dial after connecting the verification call.\n * @param {number} [opts.callDelay] -\n *          The number of seconds, between 0 and 60, to delay before initiating the verification call.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed HostedNumberOrderInstance\n */\n/* jshint ignore:end */\nHostedNumberOrderContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'Email': _.get(opts, 'email'),\n    'CcEmails': serialize.map(_.get(opts, 'ccEmails'), function(e) { return e; }),\n    'Status': _.get(opts, 'status'),\n    'VerificationCode': _.get(opts, 'verificationCode'),\n    'VerificationType': _.get(opts, 'verificationType'),\n    'VerificationDocumentSid': _.get(opts, 'verificationDocumentSid'),\n    'Extension': _.get(opts, 'extension'),\n    'CallDelay': _.get(opts, 'callDelay')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new HostedNumberOrderInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.HostedNumbers.HostedNumberOrderContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nHostedNumberOrderContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nHostedNumberOrderContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  HostedNumberOrderList: HostedNumberOrderList,\n  HostedNumberOrderPage: HostedNumberOrderPage,\n  HostedNumberOrderInstance: HostedNumberOrderInstance,\n  HostedNumberOrderContext: HostedNumberOrderContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar AuthorizationDocumentList = require(\n    './hosted_numbers/authorizationDocument').AuthorizationDocumentList;\nvar HostedNumberOrderList = require(\n    './hosted_numbers/hostedNumberOrder').HostedNumberOrderList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the HostedNumbers version of Preview\n *\n * @constructor Twilio.Preview.HostedNumbers\n *\n * @property {Twilio.Preview.HostedNumbers.AuthorizationDocumentList} authorizationDocuments -\n *          authorizationDocuments resource\n * @property {Twilio.Preview.HostedNumbers.HostedNumberOrderList} hostedNumberOrders -\n *          hostedNumberOrders resource\n *\n * @param {Twilio.Preview} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction HostedNumbers(domain) {\n  Version.prototype.constructor.call(this, domain, 'HostedNumbers');\n\n  // Resources\n  this._authorizationDocuments = undefined;\n  this._hostedNumberOrders = undefined;\n}\n\n_.extend(HostedNumbers.prototype, Version.prototype);\nHostedNumbers.prototype.constructor = HostedNumbers;\n\nObject.defineProperty(HostedNumbers.prototype,\n  'authorizationDocuments', {\n    get: function() {\n      this._authorizationDocuments = this._authorizationDocuments || new AuthorizationDocumentList(this);\n      return this._authorizationDocuments;\n    }\n});\n\nObject.defineProperty(HostedNumbers.prototype,\n  'hostedNumberOrders', {\n    get: function() {\n      this._hostedNumberOrders = this._hostedNumberOrders || new HostedNumberOrderList(this);\n      return this._hostedNumberOrders;\n    }\n});\n\nmodule.exports = HostedNumbers;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AvailableAddOnExtensionList;\nvar AvailableAddOnExtensionPage;\nvar AvailableAddOnExtensionInstance;\nvar AvailableAddOnExtensionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailableAddOnExtensionList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionList\n *\n * @param {Twilio.Preview.Marketplace} version - Version of the resource\n * @param {string} availableAddOnSid -\n *          The SID of the AvailableAddOn resource to which this extension applies\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionList = function AvailableAddOnExtensionList(version,\n    availableAddOnSid) {\n  /* jshint ignore:start */\n  /**\n   * @function extensions\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionContext}\n   */\n  /* jshint ignore:end */\n  function AvailableAddOnExtensionListInstance(sid) {\n    return AvailableAddOnExtensionListInstance.get(sid);\n  }\n\n  AvailableAddOnExtensionListInstance._version = version;\n  // Path Solution\n  AvailableAddOnExtensionListInstance._solution = {availableAddOnSid: availableAddOnSid};\n  AvailableAddOnExtensionListInstance._uri = `/AvailableAddOns/${availableAddOnSid}/Extensions`;\n  /* jshint ignore:start */\n  /**\n   * Streams AvailableAddOnExtensionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AvailableAddOnExtensionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AvailableAddOnExtensionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AvailableAddOnExtensionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AvailableAddOnExtensionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AvailableAddOnExtensionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AvailableAddOnExtensionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AvailableAddOnExtensionInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AvailableAddOnExtensionListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AvailableAddOnExtensionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a available_add_on_extension\n   *\n   * @function get\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionList#\n   *\n   * @param {string} sid - The SID of the AvailableAddOn Extension resource to fetch\n   *\n   * @returns {Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionContext}\n   */\n  /* jshint ignore:end */\n  AvailableAddOnExtensionListInstance.get = function get(sid) {\n    return new AvailableAddOnExtensionContext(this._version, this._solution.availableAddOnSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AvailableAddOnExtensionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AvailableAddOnExtensionListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AvailableAddOnExtensionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailableAddOnExtensionPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionPage\n *\n * @param {Marketplace} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AvailableAddOnExtensionSolution} solution - Path solution\n *\n * @returns AvailableAddOnExtensionPage\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionPage = function AvailableAddOnExtensionPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AvailableAddOnExtensionPage.prototype, Page.prototype);\nAvailableAddOnExtensionPage.prototype.constructor = AvailableAddOnExtensionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AvailableAddOnExtensionInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionPage#\n *\n * @param {AvailableAddOnExtensionPayload} payload - Payload response from the API\n *\n * @returns AvailableAddOnExtensionInstance\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new AvailableAddOnExtensionInstance(\n    this._version,\n    payload,\n    this._solution.availableAddOnSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAvailableAddOnExtensionPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailableAddOnExtensionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} availableAddOnSid -\n *          The SID of the AvailableAddOn resource to which this extension applies\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} productName - The name of the Extension's Product\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} url - The absolute URL of the resource\n *\n * @param {Marketplace} version - Version of the resource\n * @param {AvailableAddOnExtensionPayload} payload - The instance payload\n * @param {sid} availableAddOnSid -\n *          The SID of the AvailableAddOn resource to which this extension applies\n * @param {sid} sid - The SID of the AvailableAddOn Extension resource to fetch\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionInstance = function\n    AvailableAddOnExtensionInstance(version, payload, availableAddOnSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.availableAddOnSid = payload.available_add_on_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.productName = payload.product_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {availableAddOnSid: availableAddOnSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AvailableAddOnExtensionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AvailableAddOnExtensionContext(\n          this._version,\n          this._solution.availableAddOnSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AvailableAddOnExtensionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AvailableAddOnExtensionInstance\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAvailableAddOnExtensionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailableAddOnExtensionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionContext\n *\n * @param {Marketplace} version - Version of the resource\n * @param {sid} availableAddOnSid -\n *          The SID of the AvailableAddOn resource with the extension to fetch\n * @param {sid} sid - The SID of the AvailableAddOn Extension resource to fetch\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionContext = function\n    AvailableAddOnExtensionContext(version, availableAddOnSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {availableAddOnSid: availableAddOnSid, sid: sid, };\n  this._uri = `/AvailableAddOns/${availableAddOnSid}/Extensions/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AvailableAddOnExtensionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AvailableAddOnExtensionInstance\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AvailableAddOnExtensionInstance(\n      this._version,\n      payload,\n      this._solution.availableAddOnSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAvailableAddOnExtensionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAvailableAddOnExtensionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AvailableAddOnExtensionList: AvailableAddOnExtensionList,\n  AvailableAddOnExtensionPage: AvailableAddOnExtensionPage,\n  AvailableAddOnExtensionInstance: AvailableAddOnExtensionInstance,\n  AvailableAddOnExtensionContext: AvailableAddOnExtensionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AvailableAddOnExtensionList = require(\n    './availableAddOn/availableAddOnExtension').AvailableAddOnExtensionList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar AvailableAddOnList;\nvar AvailableAddOnPage;\nvar AvailableAddOnInstance;\nvar AvailableAddOnContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailableAddOnList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.AvailableAddOnList\n *\n * @param {Twilio.Preview.Marketplace} version - Version of the resource\n */\n/* jshint ignore:end */\nAvailableAddOnList = function AvailableAddOnList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function availableAddOns\n   * @memberof Twilio.Preview.Marketplace#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Marketplace.AvailableAddOnContext}\n   */\n  /* jshint ignore:end */\n  function AvailableAddOnListInstance(sid) {\n    return AvailableAddOnListInstance.get(sid);\n  }\n\n  AvailableAddOnListInstance._version = version;\n  // Path Solution\n  AvailableAddOnListInstance._solution = {};\n  AvailableAddOnListInstance._uri = `/AvailableAddOns`;\n  /* jshint ignore:start */\n  /**\n   * Streams AvailableAddOnInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AvailableAddOnListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AvailableAddOnInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AvailableAddOnListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AvailableAddOnInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AvailableAddOnListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AvailableAddOnPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AvailableAddOnInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AvailableAddOnListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AvailableAddOnPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a available_add_on\n   *\n   * @function get\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnList#\n   *\n   * @param {string} sid - The SID of the AvailableAddOn resource to fetch\n   *\n   * @returns {Twilio.Preview.Marketplace.AvailableAddOnContext}\n   */\n  /* jshint ignore:end */\n  AvailableAddOnListInstance.get = function get(sid) {\n    return new AvailableAddOnContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Marketplace.AvailableAddOnList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AvailableAddOnListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AvailableAddOnListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AvailableAddOnListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailableAddOnPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.AvailableAddOnPage\n *\n * @param {Marketplace} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AvailableAddOnSolution} solution - Path solution\n *\n * @returns AvailableAddOnPage\n */\n/* jshint ignore:end */\nAvailableAddOnPage = function AvailableAddOnPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AvailableAddOnPage.prototype, Page.prototype);\nAvailableAddOnPage.prototype.constructor = AvailableAddOnPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AvailableAddOnInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnPage#\n *\n * @param {AvailableAddOnPayload} payload - Payload response from the API\n *\n * @returns AvailableAddOnInstance\n */\n/* jshint ignore:end */\nAvailableAddOnPage.prototype.getInstance = function getInstance(payload) {\n  return new AvailableAddOnInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAvailableAddOnPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAvailableAddOnPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailableAddOnContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.AvailableAddOnInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} description -\n *          A short description of the Add-on's functionality\n * @property {string} pricingType - How customers are charged for using this Add-on\n * @property {object} configurationSchema -\n *          The JSON object with the configuration that must be provided when installing a given Add-on\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {Marketplace} version - Version of the resource\n * @param {AvailableAddOnPayload} payload - The instance payload\n * @param {sid} sid - The SID of the AvailableAddOn resource to fetch\n */\n/* jshint ignore:end */\nAvailableAddOnInstance = function AvailableAddOnInstance(version, payload, sid)\n                                                          {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.pricingType = payload.pricing_type; // jshint ignore:line\n  this.configurationSchema = payload.configuration_schema; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(AvailableAddOnInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AvailableAddOnContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AvailableAddOnInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AvailableAddOnInstance\n */\n/* jshint ignore:end */\nAvailableAddOnInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the extensions\n *\n * @function extensions\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnInstance#\n *\n * @returns {Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionList}\n */\n/* jshint ignore:end */\nAvailableAddOnInstance.prototype.extensions = function extensions() {\n  return this._proxy.extensions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAvailableAddOnInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAvailableAddOnInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AvailableAddOnContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.AvailableAddOnContext\n *\n * @property {Twilio.Preview.Marketplace.AvailableAddOnContext.AvailableAddOnExtensionList} extensions -\n *          extensions resource\n *\n * @param {Marketplace} version - Version of the resource\n * @param {sid} sid - The SID of the AvailableAddOn resource to fetch\n */\n/* jshint ignore:end */\nAvailableAddOnContext = function AvailableAddOnContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/AvailableAddOns/${sid}`;\n\n  // Dependents\n  this._extensions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AvailableAddOnInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AvailableAddOnInstance\n */\n/* jshint ignore:end */\nAvailableAddOnContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AvailableAddOnInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AvailableAddOnContext.prototype,\n  'extensions', {\n    get: function() {\n      if (!this._extensions) {\n        this._extensions = new AvailableAddOnExtensionList(this._version, this._solution.sid);\n      }\n      return this._extensions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.AvailableAddOnContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAvailableAddOnContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAvailableAddOnContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AvailableAddOnList: AvailableAddOnList,\n  AvailableAddOnPage: AvailableAddOnPage,\n  AvailableAddOnInstance: AvailableAddOnInstance,\n  AvailableAddOnContext: AvailableAddOnContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar InstalledAddOnExtensionList;\nvar InstalledAddOnExtensionPage;\nvar InstalledAddOnExtensionInstance;\nvar InstalledAddOnExtensionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InstalledAddOnExtensionList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionList\n *\n * @param {Twilio.Preview.Marketplace} version - Version of the resource\n * @param {string} installedAddOnSid -\n *          The SID of the InstalledAddOn resource to which this extension applies\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionList = function InstalledAddOnExtensionList(version,\n    installedAddOnSid) {\n  /* jshint ignore:start */\n  /**\n   * @function extensions\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionContext}\n   */\n  /* jshint ignore:end */\n  function InstalledAddOnExtensionListInstance(sid) {\n    return InstalledAddOnExtensionListInstance.get(sid);\n  }\n\n  InstalledAddOnExtensionListInstance._version = version;\n  // Path Solution\n  InstalledAddOnExtensionListInstance._solution = {installedAddOnSid: installedAddOnSid};\n  InstalledAddOnExtensionListInstance._uri = `/InstalledAddOns/${installedAddOnSid}/Extensions`;\n  /* jshint ignore:start */\n  /**\n   * Streams InstalledAddOnExtensionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InstalledAddOnExtensionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InstalledAddOnExtensionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InstalledAddOnExtensionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InstalledAddOnExtensionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InstalledAddOnExtensionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InstalledAddOnExtensionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InstalledAddOnExtensionInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InstalledAddOnExtensionListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InstalledAddOnExtensionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a installed_add_on_extension\n   *\n   * @function get\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionList#\n   *\n   * @param {string} sid - The SID of the InstalledAddOn Extension resource to fetch\n   *\n   * @returns {Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionContext}\n   */\n  /* jshint ignore:end */\n  InstalledAddOnExtensionListInstance.get = function get(sid) {\n    return new InstalledAddOnExtensionContext(this._version, this._solution.installedAddOnSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InstalledAddOnExtensionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InstalledAddOnExtensionListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InstalledAddOnExtensionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InstalledAddOnExtensionPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionPage\n *\n * @param {Marketplace} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InstalledAddOnExtensionSolution} solution - Path solution\n *\n * @returns InstalledAddOnExtensionPage\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionPage = function InstalledAddOnExtensionPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InstalledAddOnExtensionPage.prototype, Page.prototype);\nInstalledAddOnExtensionPage.prototype.constructor = InstalledAddOnExtensionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InstalledAddOnExtensionInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionPage#\n *\n * @param {InstalledAddOnExtensionPayload} payload - Payload response from the API\n *\n * @returns InstalledAddOnExtensionInstance\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new InstalledAddOnExtensionInstance(\n    this._version,\n    payload,\n    this._solution.installedAddOnSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInstalledAddOnExtensionPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InstalledAddOnExtensionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} installedAddOnSid -\n *          The SID of the InstalledAddOn resource to which this extension applies\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} productName - The name of the Extension's Product\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {boolean} enabled - Whether the Extension will be invoked\n * @property {string} url - The absolute URL of the resource\n *\n * @param {Marketplace} version - Version of the resource\n * @param {InstalledAddOnExtensionPayload} payload - The instance payload\n * @param {sid} installedAddOnSid -\n *          The SID of the InstalledAddOn resource to which this extension applies\n * @param {sid} sid - The SID of the InstalledAddOn Extension resource to fetch\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionInstance = function\n    InstalledAddOnExtensionInstance(version, payload, installedAddOnSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.installedAddOnSid = payload.installed_add_on_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.productName = payload.product_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {installedAddOnSid: installedAddOnSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(InstalledAddOnExtensionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InstalledAddOnExtensionContext(\n          this._version,\n          this._solution.installedAddOnSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a InstalledAddOnExtensionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnExtensionInstance\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a InstalledAddOnExtensionInstance\n *\n * @function update\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionInstance#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.enabled - Whether the Extension should be invoked\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnExtensionInstance\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionInstance.prototype.update = function update(opts,\n    callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInstalledAddOnExtensionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InstalledAddOnExtensionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionContext\n *\n * @param {Marketplace} version - Version of the resource\n * @param {sid} installedAddOnSid -\n *          The SID of the InstalledAddOn resource with the extension to fetch\n * @param {sid} sid - The SID of the InstalledAddOn Extension resource to fetch\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionContext = function\n    InstalledAddOnExtensionContext(version, installedAddOnSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {installedAddOnSid: installedAddOnSid, sid: sid, };\n  this._uri = `/InstalledAddOns/${installedAddOnSid}/Extensions/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InstalledAddOnExtensionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnExtensionInstance\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InstalledAddOnExtensionInstance(\n      this._version,\n      payload,\n      this._solution.installedAddOnSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a InstalledAddOnExtensionInstance\n *\n * @function update\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionContext#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.enabled - Whether the Extension should be invoked\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnExtensionInstance\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionContext.prototype.update = function update(opts,\n    callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['enabled'])) {\n    throw new Error('Required parameter \"opts[\\'enabled\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Enabled': serialize.bool(_.get(opts, 'enabled'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InstalledAddOnExtensionInstance(\n      this._version,\n      payload,\n      this._solution.installedAddOnSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInstalledAddOnExtensionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInstalledAddOnExtensionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InstalledAddOnExtensionList: InstalledAddOnExtensionList,\n  InstalledAddOnExtensionPage: InstalledAddOnExtensionPage,\n  InstalledAddOnExtensionInstance: InstalledAddOnExtensionInstance,\n  InstalledAddOnExtensionContext: InstalledAddOnExtensionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar InstalledAddOnExtensionList = require(\n    './installedAddOn/installedAddOnExtension').InstalledAddOnExtensionList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar InstalledAddOnList;\nvar InstalledAddOnPage;\nvar InstalledAddOnInstance;\nvar InstalledAddOnContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InstalledAddOnList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.InstalledAddOnList\n *\n * @param {Twilio.Preview.Marketplace} version - Version of the resource\n */\n/* jshint ignore:end */\nInstalledAddOnList = function InstalledAddOnList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function installedAddOns\n   * @memberof Twilio.Preview.Marketplace#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Marketplace.InstalledAddOnContext}\n   */\n  /* jshint ignore:end */\n  function InstalledAddOnListInstance(sid) {\n    return InstalledAddOnListInstance.get(sid);\n  }\n\n  InstalledAddOnListInstance._version = version;\n  // Path Solution\n  InstalledAddOnListInstance._solution = {};\n  InstalledAddOnListInstance._uri = `/InstalledAddOns`;\n  /* jshint ignore:start */\n  /**\n   * create a InstalledAddOnInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.availableAddOnSid -\n   *          The SID of the AvaliableAddOn to install\n   * @param {boolean} opts.acceptTermsOfService -\n   *          Whether the Terms of Service were accepted\n   * @param {object} [opts.configuration] -\n   *          The JSON object representing the configuration\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed InstalledAddOnInstance\n   */\n  /* jshint ignore:end */\n  InstalledAddOnListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['availableAddOnSid'])) {\n      throw new Error('Required parameter \"opts[\\'availableAddOnSid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['acceptTermsOfService'])) {\n      throw new Error('Required parameter \"opts[\\'acceptTermsOfService\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'AvailableAddOnSid': _.get(opts, 'availableAddOnSid'),\n      'AcceptTermsOfService': serialize.bool(_.get(opts, 'acceptTermsOfService')),\n      'Configuration': serialize.object(_.get(opts, 'configuration')),\n      'UniqueName': _.get(opts, 'uniqueName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InstalledAddOnInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams InstalledAddOnInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InstalledAddOnListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InstalledAddOnInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InstalledAddOnListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InstalledAddOnInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InstalledAddOnListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InstalledAddOnPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InstalledAddOnInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InstalledAddOnListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InstalledAddOnPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a installed_add_on\n   *\n   * @function get\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnList#\n   *\n   * @param {string} sid - The SID of the InstalledAddOn resource to fetch\n   *\n   * @returns {Twilio.Preview.Marketplace.InstalledAddOnContext}\n   */\n  /* jshint ignore:end */\n  InstalledAddOnListInstance.get = function get(sid) {\n    return new InstalledAddOnContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Marketplace.InstalledAddOnList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InstalledAddOnListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InstalledAddOnListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InstalledAddOnListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InstalledAddOnPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.InstalledAddOnPage\n *\n * @param {Marketplace} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InstalledAddOnSolution} solution - Path solution\n *\n * @returns InstalledAddOnPage\n */\n/* jshint ignore:end */\nInstalledAddOnPage = function InstalledAddOnPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InstalledAddOnPage.prototype, Page.prototype);\nInstalledAddOnPage.prototype.constructor = InstalledAddOnPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InstalledAddOnInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnPage#\n *\n * @param {InstalledAddOnPayload} payload - Payload response from the API\n *\n * @returns InstalledAddOnInstance\n */\n/* jshint ignore:end */\nInstalledAddOnPage.prototype.getInstance = function getInstance(payload) {\n  return new InstalledAddOnInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInstalledAddOnPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInstalledAddOnPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InstalledAddOnContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.InstalledAddOnInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} description -\n *          A short description of the Add-on's functionality\n * @property {object} configuration -\n *          The JSON object that represents the current configuration of installed Add-on\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {Marketplace} version - Version of the resource\n * @param {InstalledAddOnPayload} payload - The instance payload\n * @param {sid} sid - The SID of the InstalledAddOn resource to fetch\n */\n/* jshint ignore:end */\nInstalledAddOnInstance = function InstalledAddOnInstance(version, payload, sid)\n                                                          {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.configuration = payload.configuration; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(InstalledAddOnInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InstalledAddOnContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a InstalledAddOnInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnInstance\n */\n/* jshint ignore:end */\nInstalledAddOnInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InstalledAddOnInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnInstance\n */\n/* jshint ignore:end */\nInstalledAddOnInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a InstalledAddOnInstance\n *\n * @function update\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.configuration] -\n *          The JSON object representing the configuration\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnInstance\n */\n/* jshint ignore:end */\nInstalledAddOnInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the extensions\n *\n * @function extensions\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnInstance#\n *\n * @returns {Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionList}\n */\n/* jshint ignore:end */\nInstalledAddOnInstance.prototype.extensions = function extensions() {\n  return this._proxy.extensions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInstalledAddOnInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInstalledAddOnInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InstalledAddOnContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Marketplace.InstalledAddOnContext\n *\n * @property {Twilio.Preview.Marketplace.InstalledAddOnContext.InstalledAddOnExtensionList} extensions -\n *          extensions resource\n *\n * @param {Marketplace} version - Version of the resource\n * @param {sid} sid - The SID of the InstalledAddOn resource to fetch\n */\n/* jshint ignore:end */\nInstalledAddOnContext = function InstalledAddOnContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/InstalledAddOns/${sid}`;\n\n  // Dependents\n  this._extensions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * remove a InstalledAddOnInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnInstance\n */\n/* jshint ignore:end */\nInstalledAddOnContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InstalledAddOnInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnInstance\n */\n/* jshint ignore:end */\nInstalledAddOnContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InstalledAddOnInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a InstalledAddOnInstance\n *\n * @function update\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.configuration] -\n *          The JSON object representing the configuration\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InstalledAddOnInstance\n */\n/* jshint ignore:end */\nInstalledAddOnContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Configuration': serialize.object(_.get(opts, 'configuration')),\n    'UniqueName': _.get(opts, 'uniqueName')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InstalledAddOnInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(InstalledAddOnContext.prototype,\n  'extensions', {\n    get: function() {\n      if (!this._extensions) {\n        this._extensions = new InstalledAddOnExtensionList(this._version, this._solution.sid);\n      }\n      return this._extensions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Marketplace.InstalledAddOnContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInstalledAddOnContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInstalledAddOnContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InstalledAddOnList: InstalledAddOnList,\n  InstalledAddOnPage: InstalledAddOnPage,\n  InstalledAddOnInstance: InstalledAddOnInstance,\n  InstalledAddOnContext: InstalledAddOnContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar AvailableAddOnList = require(\n    './marketplace/availableAddOn').AvailableAddOnList;\nvar InstalledAddOnList = require(\n    './marketplace/installedAddOn').InstalledAddOnList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the Marketplace version of Preview\n *\n * @constructor Twilio.Preview.Marketplace\n *\n * @property {Twilio.Preview.Marketplace.AvailableAddOnList} availableAddOns -\n *          availableAddOns resource\n * @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -\n *          installedAddOns resource\n *\n * @param {Twilio.Preview} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction Marketplace(domain) {\n  Version.prototype.constructor.call(this, domain, 'marketplace');\n\n  // Resources\n  this._availableAddOns = undefined;\n  this._installedAddOns = undefined;\n}\n\n_.extend(Marketplace.prototype, Version.prototype);\nMarketplace.prototype.constructor = Marketplace;\n\nObject.defineProperty(Marketplace.prototype,\n  'availableAddOns', {\n    get: function() {\n      this._availableAddOns = this._availableAddOns || new AvailableAddOnList(this);\n      return this._availableAddOns;\n    }\n});\n\nObject.defineProperty(Marketplace.prototype,\n  'installedAddOns', {\n    get: function() {\n      this._installedAddOns = this._installedAddOns || new InstalledAddOnList(this);\n      return this._installedAddOns;\n    }\n});\n\nmodule.exports = Marketplace;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar DocumentPermissionList;\nvar DocumentPermissionPage;\nvar DocumentPermissionInstance;\nvar DocumentPermissionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPermissionList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionList\n *\n * @param {Twilio.Preview.Sync} version - Version of the resource\n * @param {string} serviceSid - Sync Service Instance SID.\n * @param {string} documentSid - Sync Document SID.\n */\n/* jshint ignore:end */\nDocumentPermissionList = function DocumentPermissionList(version, serviceSid,\n                                                          documentSid) {\n  /* jshint ignore:start */\n  /**\n   * @function documentPermissions\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionContext}\n   */\n  /* jshint ignore:end */\n  function DocumentPermissionListInstance(sid) {\n    return DocumentPermissionListInstance.get(sid);\n  }\n\n  DocumentPermissionListInstance._version = version;\n  // Path Solution\n  DocumentPermissionListInstance._solution = {serviceSid: serviceSid, documentSid: documentSid};\n  DocumentPermissionListInstance._uri = `/Services/${serviceSid}/Documents/${documentSid}/Permissions`;\n  /* jshint ignore:start */\n  /**\n   * Streams DocumentPermissionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DocumentPermissionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DocumentPermissionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DocumentPermissionInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a document_permission\n   *\n   * @function get\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {string} identity -\n   *          Identity of the user to whom the Sync Document Permission applies.\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionContext}\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.get = function get(identity) {\n    return new DocumentPermissionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.documentSid,\n      identity\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DocumentPermissionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DocumentPermissionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPermissionPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionPage\n *\n * @param {Sync} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DocumentPermissionSolution} solution - Path solution\n *\n * @returns DocumentPermissionPage\n */\n/* jshint ignore:end */\nDocumentPermissionPage = function DocumentPermissionPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DocumentPermissionPage.prototype, Page.prototype);\nDocumentPermissionPage.prototype.constructor = DocumentPermissionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DocumentPermissionInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionPage#\n *\n * @param {DocumentPermissionPayload} payload - Payload response from the API\n *\n * @returns DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionPage.prototype.getInstance = function getInstance(payload) {\n  return new DocumentPermissionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.documentSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentPermissionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDocumentPermissionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPermissionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionInstance\n *\n * @property {string} accountSid - Twilio Account SID.\n * @property {string} serviceSid - Sync Service Instance SID.\n * @property {string} documentSid - Sync Document SID.\n * @property {string} identity -\n *          Identity of the user to whom the Sync Document Permission applies.\n * @property {boolean} read - Read access.\n * @property {boolean} write - Write access.\n * @property {boolean} manage - Manage access.\n * @property {string} url - URL of this Sync Document Permission.\n *\n * @param {Sync} version - Version of the resource\n * @param {DocumentPermissionPayload} payload - The instance payload\n * @param {sid} serviceSid - Sync Service Instance SID.\n * @param {sid} documentSid - Sync Document SID.\n * @param {string} identity -\n *          Identity of the user to whom the Sync Document Permission applies.\n */\n/* jshint ignore:end */\nDocumentPermissionInstance = function DocumentPermissionInstance(version,\n    payload, serviceSid, documentSid, identity) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.documentSid = payload.document_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.read = payload.read; // jshint ignore:line\n  this.write = payload.write; // jshint ignore:line\n  this.manage = payload.manage; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    serviceSid: serviceSid,\n    documentSid: documentSid,\n    identity: identity || this.identity,\n  };\n};\n\nObject.defineProperty(DocumentPermissionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DocumentPermissionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.documentSid,\n          this._solution.identity\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DocumentPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a DocumentPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a DocumentPermissionInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionInstance#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access.\n * @param {boolean} opts.write - Write access.\n * @param {boolean} opts.manage - Manage access.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentPermissionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDocumentPermissionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPermissionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionContext\n *\n * @param {Sync} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} documentSid - Sync Document SID or unique name.\n * @param {string} identity -\n *          Identity of the user to whom the Sync Document Permission applies.\n */\n/* jshint ignore:end */\nDocumentPermissionContext = function DocumentPermissionContext(version,\n    serviceSid, documentSid, identity) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, documentSid: documentSid, identity: identity, };\n  this._uri = `/Services/${serviceSid}/Documents/${documentSid}/Permissions/${identity}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DocumentPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DocumentPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.documentSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a DocumentPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a DocumentPermissionInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionContext#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access.\n * @param {boolean} opts.write - Write access.\n * @param {boolean} opts.manage - Manage access.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['read'])) {\n    throw new Error('Required parameter \"opts[\\'read\\']\" missing.');\n  }\n  if (_.isUndefined(opts['write'])) {\n    throw new Error('Required parameter \"opts[\\'write\\']\" missing.');\n  }\n  if (_.isUndefined(opts['manage'])) {\n    throw new Error('Required parameter \"opts[\\'manage\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Read': serialize.bool(_.get(opts, 'read')),\n    'Write': serialize.bool(_.get(opts, 'write')),\n    'Manage': serialize.bool(_.get(opts, 'manage'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DocumentPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.documentSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentPermissionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDocumentPermissionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DocumentPermissionList: DocumentPermissionList,\n  DocumentPermissionPage: DocumentPermissionPage,\n  DocumentPermissionInstance: DocumentPermissionInstance,\n  DocumentPermissionContext: DocumentPermissionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DocumentPermissionList = require(\n    './document/documentPermission').DocumentPermissionList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DocumentList;\nvar DocumentPage;\nvar DocumentInstance;\nvar DocumentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.DocumentList\n *\n * @param {Twilio.Preview.Sync} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nDocumentList = function DocumentList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function documents\n   * @memberof Twilio.Preview.Sync.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.DocumentContext}\n   */\n  /* jshint ignore:end */\n  function DocumentListInstance(sid) {\n    return DocumentListInstance.get(sid);\n  }\n\n  DocumentListInstance._version = version;\n  // Path Solution\n  DocumentListInstance._solution = {serviceSid: serviceSid};\n  DocumentListInstance._uri = `/Services/${serviceSid}/Documents`;\n  /* jshint ignore:start */\n  /**\n   * create a DocumentInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] - The unique_name\n   * @param {object} [opts.data] - The data\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed DocumentInstance\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Data': serialize.object(_.get(opts, 'data'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams DocumentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DocumentInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DocumentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DocumentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a document\n   *\n   * @function get\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.DocumentContext}\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.get = function get(sid) {\n    return new DocumentContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Sync.ServiceContext.DocumentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DocumentListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DocumentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.DocumentPage\n *\n * @param {Sync} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DocumentSolution} solution - Path solution\n *\n * @returns DocumentPage\n */\n/* jshint ignore:end */\nDocumentPage = function DocumentPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DocumentPage.prototype, Page.prototype);\nDocumentPage.prototype.constructor = DocumentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DocumentInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentPage#\n *\n * @param {DocumentPayload} payload - Payload response from the API\n *\n * @returns DocumentInstance\n */\n/* jshint ignore:end */\nDocumentPage.prototype.getInstance = function getInstance(payload) {\n  return new DocumentInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDocumentPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.DocumentInstance\n *\n * @property {string} sid - The sid\n * @property {string} uniqueName - The unique_name\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} url - The url\n * @property {string} links - The links\n * @property {string} revision - The revision\n * @property {object} data - The data\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} createdBy - The created_by\n *\n * @param {Sync} version - Version of the resource\n * @param {DocumentPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nDocumentInstance = function DocumentInstance(version, payload, serviceSid, sid)\n                                              {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(DocumentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DocumentContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a DocumentInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a DocumentInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentInstance#\n *\n * @param {object} opts - Options for request\n * @param {object} opts.data - The data\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the documentPermissions\n *\n * @function documentPermissions\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentInstance#\n *\n * @returns {Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionList}\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.documentPermissions = function documentPermissions()\n    {\n  return this._proxy.documentPermissions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDocumentInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.DocumentContext\n *\n * @property {Twilio.Preview.Sync.ServiceContext.DocumentContext.DocumentPermissionList} documentPermissions -\n *          documentPermissions resource\n *\n * @param {Sync} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nDocumentContext = function DocumentContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Documents/${sid}`;\n\n  // Dependents\n  this._documentPermissions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DocumentInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a DocumentInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a DocumentInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext#\n *\n * @param {object} opts - Options for request\n * @param {object} opts.data - The data\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['data'])) {\n    throw new Error('Required parameter \"opts[\\'data\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Data': serialize.object(_.get(opts, 'data'))});\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DocumentInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(DocumentContext.prototype,\n  'documentPermissions', {\n    get: function() {\n      if (!this._documentPermissions) {\n        this._documentPermissions = new DocumentPermissionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._documentPermissions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.DocumentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDocumentContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DocumentList: DocumentList,\n  DocumentPage: DocumentPage,\n  DocumentInstance: DocumentInstance,\n  DocumentContext: DocumentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SyncListItemList;\nvar SyncListItemPage;\nvar SyncListItemInstance;\nvar SyncListItemContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListItemList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList\n *\n * @param {Twilio.Preview.Sync} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} listSid - The list_sid\n */\n/* jshint ignore:end */\nSyncListItemList = function SyncListItemList(version, serviceSid, listSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncListItems\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemContext}\n   */\n  /* jshint ignore:end */\n  function SyncListItemListInstance(sid) {\n    return SyncListItemListInstance.get(sid);\n  }\n\n  SyncListItemListInstance._version = version;\n  // Path Solution\n  SyncListItemListInstance._solution = {serviceSid: serviceSid, listSid: listSid};\n  SyncListItemListInstance._uri = `/Services/${serviceSid}/Lists/${listSid}/Items`;\n  /* jshint ignore:start */\n  /**\n   * create a SyncListItemInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {object} opts - Options for request\n   * @param {object} opts.data - The data\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SyncListItemInstance\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['data'])) {\n      throw new Error('Required parameter \"opts[\\'data\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Data': serialize.object(_.get(opts, 'data'))});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListItemInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.listSid,\n        this._solution.index\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SyncListItemInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_list_item.query_result_order} [opts.order] - The order\n   * @param {string} [opts.from] - The from\n   * @param {sync_list_item.query_from_bound_type} [opts.bounds] - The bounds\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncListItemInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_list_item.query_result_order} [opts.order] - The order\n   * @param {string} [opts.from] - The from\n   * @param {sync_list_item.query_from_bound_type} [opts.bounds] - The bounds\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncListItemInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_list_item.query_result_order} [opts.order] - The order\n   * @param {string} [opts.from] - The from\n   * @param {sync_list_item.query_from_bound_type} [opts.bounds] - The bounds\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'From': _.get(opts, 'from'),\n      'Bounds': _.get(opts, 'bounds'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListItemPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncListItemInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListItemPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_list_item\n   *\n   * @function get\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {string} index - The index\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemContext}\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.get = function get(index) {\n    return new SyncListItemContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      index\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncListItemListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncListItemListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListItemPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemPage\n *\n * @param {Sync} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncListItemSolution} solution - Path solution\n *\n * @returns SyncListItemPage\n */\n/* jshint ignore:end */\nSyncListItemPage = function SyncListItemPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncListItemPage.prototype, Page.prototype);\nSyncListItemPage.prototype.constructor = SyncListItemPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncListItemInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemPage#\n *\n * @param {SyncListItemPayload} payload - Payload response from the API\n *\n * @returns SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncListItemInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.listSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListItemPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListItemPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListItemContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemInstance\n *\n * @property {number} index - The index\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} listSid - The list_sid\n * @property {string} url - The url\n * @property {string} revision - The revision\n * @property {object} data - The data\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} createdBy - The created_by\n *\n * @param {Sync} version - Version of the resource\n * @param {SyncListItemPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} listSid - The list_sid\n * @param {integer} index - The index\n */\n/* jshint ignore:end */\nSyncListItemInstance = function SyncListItemInstance(version, payload,\n                                                      serviceSid, listSid,\n                                                      index) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.index = deserialize.integer(payload.index); // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.listSid = payload.list_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, listSid: listSid, index: index || this.index, };\n};\n\nObject.defineProperty(SyncListItemInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncListItemContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.listSid,\n          this._solution.index\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListItemInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListItemInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListItemInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemInstance#\n *\n * @param {object} opts - Options for request\n * @param {object} opts.data - The data\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListItemInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListItemInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListItemContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemContext\n *\n * @param {Sync} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} listSid - The list_sid\n * @param {integer} index - The index\n */\n/* jshint ignore:end */\nSyncListItemContext = function SyncListItemContext(version, serviceSid, listSid,\n                                                    index) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, listSid: listSid, index: index, };\n  this._uri = `/Services/${serviceSid}/Lists/${listSid}/Items/${index}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListItemInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListItemInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      this._solution.index\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListItemInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListItemInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemContext#\n *\n * @param {object} opts - Options for request\n * @param {object} opts.data - The data\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['data'])) {\n    throw new Error('Required parameter \"opts[\\'data\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Data': serialize.object(_.get(opts, 'data'))});\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListItemInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      this._solution.index\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListItemContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncListItemContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncListItemList: SyncListItemList,\n  SyncListItemPage: SyncListItemPage,\n  SyncListItemInstance: SyncListItemInstance,\n  SyncListItemContext: SyncListItemContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SyncListPermissionList;\nvar SyncListPermissionPage;\nvar SyncListPermissionInstance;\nvar SyncListPermissionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPermissionList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionList\n *\n * @param {Twilio.Preview.Sync} version - Version of the resource\n * @param {string} serviceSid - Sync Service Instance SID.\n * @param {string} listSid - Sync List SID.\n */\n/* jshint ignore:end */\nSyncListPermissionList = function SyncListPermissionList(version, serviceSid,\n                                                          listSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncListPermissions\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionContext}\n   */\n  /* jshint ignore:end */\n  function SyncListPermissionListInstance(sid) {\n    return SyncListPermissionListInstance.get(sid);\n  }\n\n  SyncListPermissionListInstance._version = version;\n  // Path Solution\n  SyncListPermissionListInstance._solution = {serviceSid: serviceSid, listSid: listSid};\n  SyncListPermissionListInstance._uri = `/Services/${serviceSid}/Lists/${listSid}/Permissions`;\n  /* jshint ignore:start */\n  /**\n   * Streams SyncListPermissionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncListPermissionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncListPermissionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncListPermissionInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_list_permission\n   *\n   * @function get\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {string} identity -\n   *          Identity of the user to whom the Sync List Permission applies.\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionContext}\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.get = function get(identity) {\n    return new SyncListPermissionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      identity\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncListPermissionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncListPermissionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPermissionPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionPage\n *\n * @param {Sync} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncListPermissionSolution} solution - Path solution\n *\n * @returns SyncListPermissionPage\n */\n/* jshint ignore:end */\nSyncListPermissionPage = function SyncListPermissionPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncListPermissionPage.prototype, Page.prototype);\nSyncListPermissionPage.prototype.constructor = SyncListPermissionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncListPermissionInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionPage#\n *\n * @param {SyncListPermissionPayload} payload - Payload response from the API\n *\n * @returns SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncListPermissionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.listSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListPermissionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListPermissionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPermissionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionInstance\n *\n * @property {string} accountSid - Twilio Account SID.\n * @property {string} serviceSid - Sync Service Instance SID.\n * @property {string} listSid - Sync List SID.\n * @property {string} identity -\n *          Identity of the user to whom the Sync List Permission applies.\n * @property {boolean} read - Read access.\n * @property {boolean} write - Write access.\n * @property {boolean} manage - Manage access.\n * @property {string} url - URL of this Sync List Permission.\n *\n * @param {Sync} version - Version of the resource\n * @param {SyncListPermissionPayload} payload - The instance payload\n * @param {sid} serviceSid - Sync Service Instance SID.\n * @param {sid} listSid - Sync List SID.\n * @param {string} identity -\n *          Identity of the user to whom the Sync List Permission applies.\n */\n/* jshint ignore:end */\nSyncListPermissionInstance = function SyncListPermissionInstance(version,\n    payload, serviceSid, listSid, identity) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.listSid = payload.list_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.read = payload.read; // jshint ignore:line\n  this.write = payload.write; // jshint ignore:line\n  this.manage = payload.manage; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, listSid: listSid, identity: identity || this.identity, };\n};\n\nObject.defineProperty(SyncListPermissionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncListPermissionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.listSid,\n          this._solution.identity\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListPermissionInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionInstance#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access.\n * @param {boolean} opts.write - Write access.\n * @param {boolean} opts.manage - Manage access.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListPermissionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListPermissionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPermissionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionContext\n *\n * @param {Sync} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} listSid - Sync List SID or unique name.\n * @param {string} identity -\n *          Identity of the user to whom the Sync List Permission applies.\n */\n/* jshint ignore:end */\nSyncListPermissionContext = function SyncListPermissionContext(version,\n    serviceSid, listSid, identity) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, listSid: listSid, identity: identity, };\n  this._uri = `/Services/${serviceSid}/Lists/${listSid}/Permissions/${identity}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListPermissionInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionContext#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access.\n * @param {boolean} opts.write - Write access.\n * @param {boolean} opts.manage - Manage access.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['read'])) {\n    throw new Error('Required parameter \"opts[\\'read\\']\" missing.');\n  }\n  if (_.isUndefined(opts['write'])) {\n    throw new Error('Required parameter \"opts[\\'write\\']\" missing.');\n  }\n  if (_.isUndefined(opts['manage'])) {\n    throw new Error('Required parameter \"opts[\\'manage\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Read': serialize.bool(_.get(opts, 'read')),\n    'Write': serialize.bool(_.get(opts, 'write')),\n    'Manage': serialize.bool(_.get(opts, 'manage'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListPermissionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncListPermissionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncListPermissionList: SyncListPermissionList,\n  SyncListPermissionPage: SyncListPermissionPage,\n  SyncListPermissionInstance: SyncListPermissionInstance,\n  SyncListPermissionContext: SyncListPermissionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar SyncListItemList = require('./syncList/syncListItem').SyncListItemList;\nvar SyncListPermissionList = require(\n    './syncList/syncListPermission').SyncListPermissionList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SyncListList;\nvar SyncListPage;\nvar SyncListInstance;\nvar SyncListContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListList\n *\n * @param {Twilio.Preview.Sync} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nSyncListList = function SyncListList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncLists\n   * @memberof Twilio.Preview.Sync.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncListContext}\n   */\n  /* jshint ignore:end */\n  function SyncListListInstance(sid) {\n    return SyncListListInstance.get(sid);\n  }\n\n  SyncListListInstance._version = version;\n  // Path Solution\n  SyncListListInstance._solution = {serviceSid: serviceSid};\n  SyncListListInstance._uri = `/Services/${serviceSid}/Lists`;\n  /* jshint ignore:start */\n  /**\n   * create a SyncListInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] - The unique_name\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SyncListInstance\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'UniqueName': _.get(opts, 'uniqueName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SyncListInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncListInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_list\n   *\n   * @function get\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncListContext}\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.get = function get(sid) {\n    return new SyncListContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncListList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncListListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncListListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListPage\n *\n * @param {Sync} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncListSolution} solution - Path solution\n *\n * @returns SyncListPage\n */\n/* jshint ignore:end */\nSyncListPage = function SyncListPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncListPage.prototype, Page.prototype);\nSyncListPage.prototype.constructor = SyncListPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncListInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListPage#\n *\n * @param {SyncListPayload} payload - Payload response from the API\n *\n * @returns SyncListInstance\n */\n/* jshint ignore:end */\nSyncListPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncListInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListInstance\n *\n * @property {string} sid - The sid\n * @property {string} uniqueName - The unique_name\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} url - The url\n * @property {string} links - The links\n * @property {string} revision - The revision\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} createdBy - The created_by\n *\n * @param {Sync} version - Version of the resource\n * @param {SyncListPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nSyncListInstance = function SyncListInstance(version, payload, serviceSid, sid)\n                                              {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SyncListInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncListContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncListItems\n *\n * @function syncListItems\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListInstance#\n *\n * @returns {Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList}\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.syncListItems = function syncListItems() {\n  return this._proxy.syncListItems;\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncListPermissions\n *\n * @function syncListPermissions\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListInstance#\n *\n * @returns {Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionList}\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.syncListPermissions = function syncListPermissions()\n    {\n  return this._proxy.syncListPermissions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncListContext\n *\n * @property {Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListItemList} syncListItems -\n *          syncListItems resource\n * @property {Twilio.Preview.Sync.ServiceContext.SyncListContext.SyncListPermissionList} syncListPermissions -\n *          syncListPermissions resource\n *\n * @param {Sync} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nSyncListContext = function SyncListContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Lists/${sid}`;\n\n  // Dependents\n  this._syncListItems = undefined;\n  this._syncListPermissions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SyncListContext.prototype,\n  'syncListItems', {\n    get: function() {\n      if (!this._syncListItems) {\n        this._syncListItems = new SyncListItemList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._syncListItems;\n    }\n});\n\nObject.defineProperty(SyncListContext.prototype,\n  'syncListPermissions', {\n    get: function() {\n      if (!this._syncListPermissions) {\n        this._syncListPermissions = new SyncListPermissionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._syncListPermissions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncListContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncListContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncListList: SyncListList,\n  SyncListPage: SyncListPage,\n  SyncListInstance: SyncListInstance,\n  SyncListContext: SyncListContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SyncMapItemList;\nvar SyncMapItemPage;\nvar SyncMapItemInstance;\nvar SyncMapItemContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapItemList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList\n *\n * @param {Twilio.Preview.Sync} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n * @param {string} mapSid - The map_sid\n */\n/* jshint ignore:end */\nSyncMapItemList = function SyncMapItemList(version, serviceSid, mapSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncMapItems\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemContext}\n   */\n  /* jshint ignore:end */\n  function SyncMapItemListInstance(sid) {\n    return SyncMapItemListInstance.get(sid);\n  }\n\n  SyncMapItemListInstance._version = version;\n  // Path Solution\n  SyncMapItemListInstance._solution = {serviceSid: serviceSid, mapSid: mapSid};\n  SyncMapItemListInstance._uri = `/Services/${serviceSid}/Maps/${mapSid}/Items`;\n  /* jshint ignore:start */\n  /**\n   * create a SyncMapItemInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.key - The key\n   * @param {object} opts.data - The data\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SyncMapItemInstance\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['key'])) {\n      throw new Error('Required parameter \"opts[\\'key\\']\" missing.');\n    }\n    if (_.isUndefined(opts['data'])) {\n      throw new Error('Required parameter \"opts[\\'data\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Key': _.get(opts, 'key'), 'Data': serialize.object(_.get(opts, 'data'))});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapItemInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.mapSid,\n        this._solution.key\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SyncMapItemInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_map_item.query_result_order} [opts.order] - The order\n   * @param {string} [opts.from] - The from\n   * @param {sync_map_item.query_from_bound_type} [opts.bounds] - The bounds\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncMapItemInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_map_item.query_result_order} [opts.order] - The order\n   * @param {string} [opts.from] - The from\n   * @param {sync_map_item.query_from_bound_type} [opts.bounds] - The bounds\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncMapItemInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_map_item.query_result_order} [opts.order] - The order\n   * @param {string} [opts.from] - The from\n   * @param {sync_map_item.query_from_bound_type} [opts.bounds] - The bounds\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'From': _.get(opts, 'from'),\n      'Bounds': _.get(opts, 'bounds'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapItemPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncMapItemInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapItemPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_map_item\n   *\n   * @function get\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {string} key - The key\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemContext}\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.get = function get(key) {\n    return new SyncMapItemContext(this._version, this._solution.serviceSid, this._solution.mapSid, key);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncMapItemListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncMapItemListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapItemPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemPage\n *\n * @param {Sync} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncMapItemSolution} solution - Path solution\n *\n * @returns SyncMapItemPage\n */\n/* jshint ignore:end */\nSyncMapItemPage = function SyncMapItemPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncMapItemPage.prototype, Page.prototype);\nSyncMapItemPage.prototype.constructor = SyncMapItemPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncMapItemInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemPage#\n *\n * @param {SyncMapItemPayload} payload - Payload response from the API\n *\n * @returns SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncMapItemInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.mapSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapItemPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapItemPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapItemContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemInstance\n *\n * @property {string} key - The key\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} mapSid - The map_sid\n * @property {string} url - The url\n * @property {string} revision - The revision\n * @property {object} data - The data\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} createdBy - The created_by\n *\n * @param {Sync} version - Version of the resource\n * @param {SyncMapItemPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid} mapSid - The map_sid\n * @param {string} key - The key\n */\n/* jshint ignore:end */\nSyncMapItemInstance = function SyncMapItemInstance(version, payload, serviceSid,\n                                                    mapSid, key) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.key = payload.key; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.mapSid = payload.map_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, mapSid: mapSid, key: key || this.key, };\n};\n\nObject.defineProperty(SyncMapItemInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncMapItemContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.mapSid,\n          this._solution.key\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapItemInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapItemInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapItemInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemInstance#\n *\n * @param {object} opts - Options for request\n * @param {object} opts.data - The data\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapItemInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapItemInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapItemContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemContext\n *\n * @param {Sync} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} mapSid - The map_sid\n * @param {string} key - The key\n */\n/* jshint ignore:end */\nSyncMapItemContext = function SyncMapItemContext(version, serviceSid, mapSid,\n                                                  key) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, mapSid: mapSid, key: key, };\n  this._uri = `/Services/${serviceSid}/Maps/${mapSid}/Items/${key}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapItemInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapItemInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      this._solution.key\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapItemInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapItemInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemContext#\n *\n * @param {object} opts - Options for request\n * @param {object} opts.data - The data\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['data'])) {\n    throw new Error('Required parameter \"opts[\\'data\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Data': serialize.object(_.get(opts, 'data'))});\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapItemInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      this._solution.key\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapItemContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncMapItemContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncMapItemList: SyncMapItemList,\n  SyncMapItemPage: SyncMapItemPage,\n  SyncMapItemInstance: SyncMapItemInstance,\n  SyncMapItemContext: SyncMapItemContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SyncMapPermissionList;\nvar SyncMapPermissionPage;\nvar SyncMapPermissionInstance;\nvar SyncMapPermissionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPermissionList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionList\n *\n * @param {Twilio.Preview.Sync} version - Version of the resource\n * @param {string} serviceSid - Sync Service Instance SID.\n * @param {string} mapSid - Sync Map SID.\n */\n/* jshint ignore:end */\nSyncMapPermissionList = function SyncMapPermissionList(version, serviceSid,\n                                                        mapSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncMapPermissions\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionContext}\n   */\n  /* jshint ignore:end */\n  function SyncMapPermissionListInstance(sid) {\n    return SyncMapPermissionListInstance.get(sid);\n  }\n\n  SyncMapPermissionListInstance._version = version;\n  // Path Solution\n  SyncMapPermissionListInstance._solution = {serviceSid: serviceSid, mapSid: mapSid};\n  SyncMapPermissionListInstance._uri = `/Services/${serviceSid}/Maps/${mapSid}/Permissions`;\n  /* jshint ignore:start */\n  /**\n   * Streams SyncMapPermissionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncMapPermissionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncMapPermissionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncMapPermissionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_map_permission\n   *\n   * @function get\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {string} identity -\n   *          Identity of the user to whom the Sync Map Permission applies.\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionContext}\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.get = function get(identity) {\n    return new SyncMapPermissionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      identity\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncMapPermissionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncMapPermissionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPermissionPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionPage\n *\n * @param {Sync} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncMapPermissionSolution} solution - Path solution\n *\n * @returns SyncMapPermissionPage\n */\n/* jshint ignore:end */\nSyncMapPermissionPage = function SyncMapPermissionPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncMapPermissionPage.prototype, Page.prototype);\nSyncMapPermissionPage.prototype.constructor = SyncMapPermissionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncMapPermissionInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionPage#\n *\n * @param {SyncMapPermissionPayload} payload - Payload response from the API\n *\n * @returns SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncMapPermissionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.mapSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapPermissionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapPermissionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPermissionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionInstance\n *\n * @property {string} accountSid - Twilio Account SID.\n * @property {string} serviceSid - Sync Service Instance SID.\n * @property {string} mapSid - Sync Map SID.\n * @property {string} identity -\n *          Identity of the user to whom the Sync Map Permission applies.\n * @property {boolean} read - Read access.\n * @property {boolean} write - Write access.\n * @property {boolean} manage - Manage access.\n * @property {string} url - URL of this Sync Map Permission.\n *\n * @param {Sync} version - Version of the resource\n * @param {SyncMapPermissionPayload} payload - The instance payload\n * @param {sid} serviceSid - Sync Service Instance SID.\n * @param {sid} mapSid - Sync Map SID.\n * @param {string} identity -\n *          Identity of the user to whom the Sync Map Permission applies.\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance = function SyncMapPermissionInstance(version, payload,\n    serviceSid, mapSid, identity) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.mapSid = payload.map_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.read = payload.read; // jshint ignore:line\n  this.write = payload.write; // jshint ignore:line\n  this.manage = payload.manage; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, mapSid: mapSid, identity: identity || this.identity, };\n};\n\nObject.defineProperty(SyncMapPermissionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncMapPermissionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.mapSid,\n          this._solution.identity\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapPermissionInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionInstance#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access.\n * @param {boolean} opts.write - Write access.\n * @param {boolean} opts.manage - Manage access.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapPermissionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPermissionContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionContext\n *\n * @param {Sync} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} mapSid - Sync Map SID or unique name.\n * @param {string} identity -\n *          Identity of the user to whom the Sync Map Permission applies.\n */\n/* jshint ignore:end */\nSyncMapPermissionContext = function SyncMapPermissionContext(version,\n    serviceSid, mapSid, identity) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, mapSid: mapSid, identity: identity, };\n  this._uri = `/Services/${serviceSid}/Maps/${mapSid}/Permissions/${identity}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapPermissionInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionContext#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access.\n * @param {boolean} opts.write - Write access.\n * @param {boolean} opts.manage - Manage access.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['read'])) {\n    throw new Error('Required parameter \"opts[\\'read\\']\" missing.');\n  }\n  if (_.isUndefined(opts['write'])) {\n    throw new Error('Required parameter \"opts[\\'write\\']\" missing.');\n  }\n  if (_.isUndefined(opts['manage'])) {\n    throw new Error('Required parameter \"opts[\\'manage\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Read': serialize.bool(_.get(opts, 'read')),\n    'Write': serialize.bool(_.get(opts, 'write')),\n    'Manage': serialize.bool(_.get(opts, 'manage'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapPermissionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncMapPermissionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncMapPermissionList: SyncMapPermissionList,\n  SyncMapPermissionPage: SyncMapPermissionPage,\n  SyncMapPermissionInstance: SyncMapPermissionInstance,\n  SyncMapPermissionContext: SyncMapPermissionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar SyncMapItemList = require('./syncMap/syncMapItem').SyncMapItemList;\nvar SyncMapPermissionList = require(\n    './syncMap/syncMapPermission').SyncMapPermissionList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SyncMapList;\nvar SyncMapPage;\nvar SyncMapInstance;\nvar SyncMapContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapList\n *\n * @param {Twilio.Preview.Sync} version - Version of the resource\n * @param {string} serviceSid - The service_sid\n */\n/* jshint ignore:end */\nSyncMapList = function SyncMapList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncMaps\n   * @memberof Twilio.Preview.Sync.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncMapContext}\n   */\n  /* jshint ignore:end */\n  function SyncMapListInstance(sid) {\n    return SyncMapListInstance.get(sid);\n  }\n\n  SyncMapListInstance._version = version;\n  // Path Solution\n  SyncMapListInstance._solution = {serviceSid: serviceSid};\n  SyncMapListInstance._uri = `/Services/${serviceSid}/Maps`;\n  /* jshint ignore:start */\n  /**\n   * create a SyncMapInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] - The unique_name\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SyncMapInstance\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'UniqueName': _.get(opts, 'uniqueName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SyncMapInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncMapInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncMapInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncMapInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_map\n   *\n   * @function get\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext.SyncMapContext}\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.get = function get(sid) {\n    return new SyncMapContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncMapListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncMapListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapPage\n *\n * @param {Sync} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncMapSolution} solution - Path solution\n *\n * @returns SyncMapPage\n */\n/* jshint ignore:end */\nSyncMapPage = function SyncMapPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncMapPage.prototype, Page.prototype);\nSyncMapPage.prototype.constructor = SyncMapPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncMapInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapPage#\n *\n * @param {SyncMapPayload} payload - Payload response from the API\n *\n * @returns SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncMapInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapInstance\n *\n * @property {string} sid - The sid\n * @property {string} uniqueName - The unique_name\n * @property {string} accountSid - The account_sid\n * @property {string} serviceSid - The service_sid\n * @property {string} url - The url\n * @property {string} links - The links\n * @property {string} revision - The revision\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} createdBy - The created_by\n *\n * @param {Sync} version - Version of the resource\n * @param {SyncMapPayload} payload - The instance payload\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nSyncMapInstance = function SyncMapInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SyncMapInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncMapContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncMapItems\n *\n * @function syncMapItems\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapInstance#\n *\n * @returns {Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList}\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.syncMapItems = function syncMapItems() {\n  return this._proxy.syncMapItems;\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncMapPermissions\n *\n * @function syncMapPermissions\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapInstance#\n *\n * @returns {Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionList}\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.syncMapPermissions = function syncMapPermissions() {\n  return this._proxy.syncMapPermissions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext.SyncMapContext\n *\n * @property {Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapItemList} syncMapItems -\n *          syncMapItems resource\n * @property {Twilio.Preview.Sync.ServiceContext.SyncMapContext.SyncMapPermissionList} syncMapPermissions -\n *          syncMapPermissions resource\n *\n * @param {Sync} version - Version of the resource\n * @param {sid} serviceSid - The service_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nSyncMapContext = function SyncMapContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Maps/${sid}`;\n\n  // Dependents\n  this._syncMapItems = undefined;\n  this._syncMapPermissions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SyncMapContext.prototype,\n  'syncMapItems', {\n    get: function() {\n      if (!this._syncMapItems) {\n        this._syncMapItems = new SyncMapItemList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._syncMapItems;\n    }\n});\n\nObject.defineProperty(SyncMapContext.prototype,\n  'syncMapPermissions', {\n    get: function() {\n      if (!this._syncMapPermissions) {\n        this._syncMapPermissions = new SyncMapPermissionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._syncMapPermissions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext.SyncMapContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncMapContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncMapList: SyncMapList,\n  SyncMapPage: SyncMapPage,\n  SyncMapInstance: SyncMapInstance,\n  SyncMapContext: SyncMapContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DocumentList = require('./service/document').DocumentList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar SyncListList = require('./service/syncList').SyncListList;\nvar SyncMapList = require('./service/syncMap').SyncMapList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceList\n *\n * @param {Twilio.Preview.Sync} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Preview.Sync#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Sync.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - The friendly_name\n   * @param {string} [opts.webhookUrl] - The webhook_url\n   * @param {boolean} [opts.reachabilityWebhooksEnabled] -\n   *          The reachability_webhooks_enabled\n   * @param {boolean} [opts.aclEnabled] - The acl_enabled\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'WebhookUrl': _.get(opts, 'webhookUrl'),\n      'ReachabilityWebhooksEnabled': serialize.bool(_.get(opts, 'reachabilityWebhooksEnabled')),\n      'AclEnabled': serialize.bool(_.get(opts, 'aclEnabled'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Sync.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Sync.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Sync.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Sync.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Preview.Sync.ServiceList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Sync.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Sync.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServicePage\n *\n * @param {Sync} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Sync.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} friendlyName - The friendly_name\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} url - The url\n * @property {string} webhookUrl - The webhook_url\n * @property {boolean} reachabilityWebhooksEnabled -\n *          The reachability_webhooks_enabled\n * @property {boolean} aclEnabled - The acl_enabled\n * @property {string} links - The links\n *\n * @param {Sync} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.reachabilityWebhooksEnabled = payload.reachability_webhooks_enabled; // jshint ignore:line\n  this.aclEnabled = payload.acl_enabled; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.webhookUrl] - The webhook_url\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {boolean} [opts.reachabilityWebhooksEnabled] -\n *          The reachability_webhooks_enabled\n * @param {boolean} [opts.aclEnabled] - The acl_enabled\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the documents\n *\n * @function documents\n * @memberof Twilio.Preview.Sync.ServiceInstance#\n *\n * @returns {Twilio.Preview.Sync.ServiceContext.DocumentList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.documents = function documents() {\n  return this._proxy.documents;\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncLists\n *\n * @function syncLists\n * @memberof Twilio.Preview.Sync.ServiceInstance#\n *\n * @returns {Twilio.Preview.Sync.ServiceContext.SyncListList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.syncLists = function syncLists() {\n  return this._proxy.syncLists;\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncMaps\n *\n * @function syncMaps\n * @memberof Twilio.Preview.Sync.ServiceInstance#\n *\n * @returns {Twilio.Preview.Sync.ServiceContext.SyncMapList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.syncMaps = function syncMaps() {\n  return this._proxy.syncMaps;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Sync.ServiceContext\n *\n * @property {Twilio.Preview.Sync.ServiceContext.DocumentList} documents -\n *          documents resource\n * @property {Twilio.Preview.Sync.ServiceContext.SyncListList} syncLists -\n *          syncLists resource\n * @property {Twilio.Preview.Sync.ServiceContext.SyncMapList} syncMaps -\n *          syncMaps resource\n *\n * @param {Sync} version - Version of the resource\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._documents = undefined;\n  this._syncLists = undefined;\n  this._syncMaps = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Sync.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Sync.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Preview.Sync.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.webhookUrl] - The webhook_url\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {boolean} [opts.reachabilityWebhooksEnabled] -\n *          The reachability_webhooks_enabled\n * @param {boolean} [opts.aclEnabled] - The acl_enabled\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'WebhookUrl': _.get(opts, 'webhookUrl'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'ReachabilityWebhooksEnabled': serialize.bool(_.get(opts, 'reachabilityWebhooksEnabled')),\n    'AclEnabled': serialize.bool(_.get(opts, 'aclEnabled'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'documents', {\n    get: function() {\n      if (!this._documents) {\n        this._documents = new DocumentList(this._version, this._solution.sid);\n      }\n      return this._documents;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'syncLists', {\n    get: function() {\n      if (!this._syncLists) {\n        this._syncLists = new SyncListList(this._version, this._solution.sid);\n      }\n      return this._syncLists;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'syncMaps', {\n    get: function() {\n      if (!this._syncMaps) {\n        this._syncMaps = new SyncMapList(this._version, this._solution.sid);\n      }\n      return this._syncMaps;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Sync.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar ServiceList = require('./sync/service').ServiceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the Sync version of Preview\n *\n * @constructor Twilio.Preview.Sync\n *\n * @property {Twilio.Preview.Sync.ServiceList} services - services resource\n *\n * @param {Twilio.Preview} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction Sync(domain) {\n  Version.prototype.constructor.call(this, domain, 'Sync');\n\n  // Resources\n  this._services = undefined;\n}\n\n_.extend(Sync.prototype, Version.prototype);\nSync.prototype.constructor = Sync;\n\nObject.defineProperty(Sync.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nmodule.exports = Sync;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ChannelList;\nvar ChannelPage;\nvar ChannelInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelList\n *\n * @param {Twilio.Preview.TrustedComms} version - Version of the resource\n * @param {string} brandedChannelSid - Branded Channel Sid.\n */\n/* jshint ignore:end */\nChannelList = function ChannelList(version, brandedChannelSid) {\n  /* jshint ignore:start */\n  /**\n   * @function channels\n   * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelContext}\n   */\n  /* jshint ignore:end */\n  function ChannelListInstance(sid) {\n    return ChannelListInstance.get(sid);\n  }\n\n  ChannelListInstance._version = version;\n  // Path Solution\n  ChannelListInstance._solution = {brandedChannelSid: brandedChannelSid};\n  ChannelListInstance._uri = `/BrandedChannels/${brandedChannelSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * create a ChannelInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.phoneNumberSid - Phone Number Sid to be branded.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ChannelInstance\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['phoneNumberSid'])) {\n      throw new Error('Required parameter \"opts[\\'phoneNumberSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'PhoneNumberSid': _.get(opts, 'phoneNumberSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChannelInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ChannelListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelPage\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ChannelSolution} solution - Path solution\n *\n * @returns ChannelPage\n */\n/* jshint ignore:end */\nChannelPage = function ChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ChannelPage.prototype, Page.prototype);\nChannelPage.prototype.constructor = ChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelPage#\n *\n * @param {ChannelPayload} payload - Payload response from the API\n *\n * @returns ChannelInstance\n */\n/* jshint ignore:end */\nChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new ChannelInstance(this._version, payload, this._solution.brandedChannelSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChannelContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelInstance\n *\n * @property {string} accountSid - Account Sid.\n * @property {string} businessSid - Business Sid.\n * @property {string} brandSid - Brand Sid.\n * @property {string} brandedChannelSid - Branded Channel Sid.\n * @property {string} phoneNumberSid - Phone Number Sid to be branded.\n * @property {string} phoneNumber - Twilio number to assign to the Branded Channel\n * @property {string} url - The URL of this resource.\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {ChannelPayload} payload - The instance payload\n * @param {sid} brandedChannelSid - Branded Channel Sid.\n */\n/* jshint ignore:end */\nChannelInstance = function ChannelInstance(version, payload, brandedChannelSid)\n                                            {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.businessSid = payload.business_sid; // jshint ignore:line\n  this.brandSid = payload.brand_sid; // jshint ignore:line\n  this.brandedChannelSid = payload.branded_channel_sid; // jshint ignore:line\n  this.phoneNumberSid = payload.phone_number_sid; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {brandedChannelSid: brandedChannelSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ChannelList: ChannelList,\n  ChannelPage: ChannelPage,\n  ChannelInstance: ChannelInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ChannelList = require('./brandedChannel/channel').ChannelList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar BrandedChannelList;\nvar BrandedChannelPage;\nvar BrandedChannelInstance;\nvar BrandedChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandedChannelList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandedChannelList\n *\n * @param {Twilio.Preview.TrustedComms} version - Version of the resource\n */\n/* jshint ignore:end */\nBrandedChannelList = function BrandedChannelList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function brandedChannels\n   * @memberof Twilio.Preview.TrustedComms#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.TrustedComms.BrandedChannelContext}\n   */\n  /* jshint ignore:end */\n  function BrandedChannelListInstance(sid) {\n    return BrandedChannelListInstance.get(sid);\n  }\n\n  BrandedChannelListInstance._version = version;\n  // Path Solution\n  BrandedChannelListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a branded_channel\n   *\n   * @function get\n   * @memberof Twilio.Preview.TrustedComms.BrandedChannelList#\n   *\n   * @param {string} sid - Branded Channel Sid.\n   *\n   * @returns {Twilio.Preview.TrustedComms.BrandedChannelContext}\n   */\n  /* jshint ignore:end */\n  BrandedChannelListInstance.get = function get(sid) {\n    return new BrandedChannelContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.TrustedComms.BrandedChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BrandedChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BrandedChannelListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BrandedChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandedChannelPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandedChannelPage\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BrandedChannelSolution} solution - Path solution\n *\n * @returns BrandedChannelPage\n */\n/* jshint ignore:end */\nBrandedChannelPage = function BrandedChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BrandedChannelPage.prototype, Page.prototype);\nBrandedChannelPage.prototype.constructor = BrandedChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BrandedChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelPage#\n *\n * @param {BrandedChannelPayload} payload - Payload response from the API\n *\n * @returns BrandedChannelInstance\n */\n/* jshint ignore:end */\nBrandedChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new BrandedChannelInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandedChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBrandedChannelPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandedChannelContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandedChannelInstance\n *\n * @property {string} accountSid - Account Sid.\n * @property {string} businessSid - Business Sid.\n * @property {string} brandSid - Brand Sid.\n * @property {string} sid - Branded Channel Sid.\n * @property {string} links - Nested resource URLs.\n * @property {string} url - The URL of this resource.\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {BrandedChannelPayload} payload - The instance payload\n * @param {sid} sid - Branded Channel Sid.\n */\n/* jshint ignore:end */\nBrandedChannelInstance = function BrandedChannelInstance(version, payload, sid)\n                                                          {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.businessSid = payload.business_sid; // jshint ignore:line\n  this.brandSid = payload.brand_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(BrandedChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BrandedChannelContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BrandedChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandedChannelInstance\n */\n/* jshint ignore:end */\nBrandedChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the channels\n *\n * @function channels\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelInstance#\n *\n * @returns {Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelList}\n */\n/* jshint ignore:end */\nBrandedChannelInstance.prototype.channels = function channels() {\n  return this._proxy.channels;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandedChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBrandedChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandedChannelContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandedChannelContext\n *\n * @property {Twilio.Preview.TrustedComms.BrandedChannelContext.ChannelList} channels -\n *          channels resource\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {sid} sid - Branded Channel Sid.\n */\n/* jshint ignore:end */\nBrandedChannelContext = function BrandedChannelContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/BrandedChannels/${sid}`;\n\n  // Dependents\n  this._channels = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BrandedChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandedChannelInstance\n */\n/* jshint ignore:end */\nBrandedChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BrandedChannelInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(BrandedChannelContext.prototype,\n  'channels', {\n    get: function() {\n      if (!this._channels) {\n        this._channels = new ChannelList(this._version, this._solution.sid);\n      }\n      return this._channels;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.BrandedChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandedChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBrandedChannelContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BrandedChannelList: BrandedChannelList,\n  BrandedChannelPage: BrandedChannelPage,\n  BrandedChannelInstance: BrandedChannelInstance,\n  BrandedChannelContext: BrandedChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar BrandsInformationList;\nvar BrandsInformationPage;\nvar BrandsInformationInstance;\nvar BrandsInformationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandsInformationList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandsInformationList\n *\n * @param {Twilio.Preview.TrustedComms} version - Version of the resource\n */\n/* jshint ignore:end */\nBrandsInformationList = function BrandsInformationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function brandsInformation\n   * @memberof Twilio.Preview.TrustedComms#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.TrustedComms.BrandsInformationContext}\n   */\n  /* jshint ignore:end */\n  function BrandsInformationListInstance(sid) {\n    return BrandsInformationListInstance.get(sid);\n  }\n\n  BrandsInformationListInstance._version = version;\n  // Path Solution\n  BrandsInformationListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a brands_information\n   *\n   * @function get\n   * @memberof Twilio.Preview.TrustedComms.BrandsInformationList#\n   *\n   * @returns {Twilio.Preview.TrustedComms.BrandsInformationContext}\n   */\n  /* jshint ignore:end */\n  BrandsInformationListInstance.get = function get() {\n    return new BrandsInformationContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.TrustedComms.BrandsInformationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BrandsInformationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BrandsInformationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BrandsInformationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandsInformationPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandsInformationPage\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BrandsInformationSolution} solution - Path solution\n *\n * @returns BrandsInformationPage\n */\n/* jshint ignore:end */\nBrandsInformationPage = function BrandsInformationPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BrandsInformationPage.prototype, Page.prototype);\nBrandsInformationPage.prototype.constructor = BrandsInformationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BrandsInformationInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.TrustedComms.BrandsInformationPage#\n *\n * @param {BrandsInformationPayload} payload - Payload response from the API\n *\n * @returns BrandsInformationInstance\n */\n/* jshint ignore:end */\nBrandsInformationPage.prototype.getInstance = function getInstance(payload) {\n  return new BrandsInformationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.BrandsInformationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandsInformationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBrandsInformationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandsInformationContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandsInformationInstance\n *\n * @property {Date} updateTime - Creation time of the information retrieved\n * @property {string} fileLink - The URL to the brands information\n * @property {string} fileLinkTtlInSeconds - How long will be the `file_link` valid\n * @property {string} url - The URL of this resource\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {BrandsInformationPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nBrandsInformationInstance = function BrandsInformationInstance(version, payload)\n    {\n  this._version = version;\n\n  // Marshaled Properties\n  this.updateTime = deserialize.iso8601DateTime(payload.update_time); // jshint ignore:line\n  this.fileLink = payload.file_link; // jshint ignore:line\n  this.fileLinkTtlInSeconds = payload.file_link_ttl_in_seconds; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(BrandsInformationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BrandsInformationContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BrandsInformationInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.TrustedComms.BrandsInformationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifNoneMatch] - Standard `If-None-Match` HTTP header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandsInformationInstance\n */\n/* jshint ignore:end */\nBrandsInformationInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.BrandsInformationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandsInformationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBrandsInformationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BrandsInformationContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.BrandsInformationContext\n *\n * @param {TrustedComms} version - Version of the resource\n */\n/* jshint ignore:end */\nBrandsInformationContext = function BrandsInformationContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/BrandsInformation`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BrandsInformationInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.TrustedComms.BrandsInformationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifNoneMatch] - Standard `If-None-Match` HTTP header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BrandsInformationInstance\n */\n/* jshint ignore:end */\nBrandsInformationContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'If-None-Match': _.get(opts, 'ifNoneMatch')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BrandsInformationInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.BrandsInformationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBrandsInformationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBrandsInformationContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BrandsInformationList: BrandsInformationList,\n  BrandsInformationPage: BrandsInformationPage,\n  BrandsInformationInstance: BrandsInformationInstance,\n  BrandsInformationContext: BrandsInformationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CpsList;\nvar CpsPage;\nvar CpsInstance;\nvar CpsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CpsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.CpsList\n *\n * @param {Twilio.Preview.TrustedComms} version - Version of the resource\n */\n/* jshint ignore:end */\nCpsList = function CpsList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function cps\n   * @memberof Twilio.Preview.TrustedComms#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.TrustedComms.CpsContext}\n   */\n  /* jshint ignore:end */\n  function CpsListInstance(sid) {\n    return CpsListInstance.get(sid);\n  }\n\n  CpsListInstance._version = version;\n  // Path Solution\n  CpsListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a cps\n   *\n   * @function get\n   * @memberof Twilio.Preview.TrustedComms.CpsList#\n   *\n   * @returns {Twilio.Preview.TrustedComms.CpsContext}\n   */\n  /* jshint ignore:end */\n  CpsListInstance.get = function get() {\n    return new CpsContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.TrustedComms.CpsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CpsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CpsListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CpsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CpsPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.CpsPage\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CpsSolution} solution - Path solution\n *\n * @returns CpsPage\n */\n/* jshint ignore:end */\nCpsPage = function CpsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CpsPage.prototype, Page.prototype);\nCpsPage.prototype.constructor = CpsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CpsInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.TrustedComms.CpsPage#\n *\n * @param {CpsPayload} payload - Payload response from the API\n *\n * @returns CpsInstance\n */\n/* jshint ignore:end */\nCpsPage.prototype.getInstance = function getInstance(payload) {\n  return new CpsInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.CpsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCpsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCpsPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CpsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.CpsInstance\n *\n * @property {string} cpsUrl - CPS URL of the phone number.\n * @property {string} phoneNumber - Phone number passed.\n * @property {string} url - The URL of this resource.\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {CpsPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nCpsInstance = function CpsInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.cpsUrl = payload.cps_url; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(CpsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CpsContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CpsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.TrustedComms.CpsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.xXcnamSensitivePhoneNumber] -\n *          Phone number to retrieve CPS.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CpsInstance\n */\n/* jshint ignore:end */\nCpsInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.CpsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCpsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCpsInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CpsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.CpsContext\n *\n * @param {TrustedComms} version - Version of the resource\n */\n/* jshint ignore:end */\nCpsContext = function CpsContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/CPS`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CpsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.TrustedComms.CpsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.xXcnamSensitivePhoneNumber] -\n *          Phone number to retrieve CPS.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CpsInstance\n */\n/* jshint ignore:end */\nCpsContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({\n    'X-Xcnam-Sensitive-Phone-Number': _.get(opts, 'xXcnamSensitivePhoneNumber')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CpsInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.CpsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCpsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCpsContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CpsList: CpsList,\n  CpsPage: CpsPage,\n  CpsInstance: CpsInstance,\n  CpsContext: CpsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CurrentCallList;\nvar CurrentCallPage;\nvar CurrentCallInstance;\nvar CurrentCallContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CurrentCallList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.CurrentCallList\n *\n * @param {Twilio.Preview.TrustedComms} version - Version of the resource\n */\n/* jshint ignore:end */\nCurrentCallList = function CurrentCallList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function currentCalls\n   * @memberof Twilio.Preview.TrustedComms#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.TrustedComms.CurrentCallContext}\n   */\n  /* jshint ignore:end */\n  function CurrentCallListInstance(sid) {\n    return CurrentCallListInstance.get(sid);\n  }\n\n  CurrentCallListInstance._version = version;\n  // Path Solution\n  CurrentCallListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a current_call\n   *\n   * @function get\n   * @memberof Twilio.Preview.TrustedComms.CurrentCallList#\n   *\n   * @returns {Twilio.Preview.TrustedComms.CurrentCallContext}\n   */\n  /* jshint ignore:end */\n  CurrentCallListInstance.get = function get() {\n    return new CurrentCallContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.TrustedComms.CurrentCallList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CurrentCallListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CurrentCallListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CurrentCallListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CurrentCallPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.CurrentCallPage\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CurrentCallSolution} solution - Path solution\n *\n * @returns CurrentCallPage\n */\n/* jshint ignore:end */\nCurrentCallPage = function CurrentCallPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CurrentCallPage.prototype, Page.prototype);\nCurrentCallPage.prototype.constructor = CurrentCallPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CurrentCallInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.TrustedComms.CurrentCallPage#\n *\n * @param {CurrentCallPayload} payload - Payload response from the API\n *\n * @returns CurrentCallInstance\n */\n/* jshint ignore:end */\nCurrentCallPage.prototype.getInstance = function getInstance(payload) {\n  return new CurrentCallInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.CurrentCallPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCurrentCallPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCurrentCallPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CurrentCallContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.CurrentCallInstance\n *\n * @property {string} bgColor - Background color of the current phone call\n * @property {string} caller - Caller name of the current phone call\n * @property {Date} createdAt - The date this current phone call was created\n * @property {string} fontColor - Font color of the current phone call\n * @property {string} from - The originating phone number\n * @property {string} logo - Logo URL of the caller\n * @property {string} manager - The name of the CPS organization\n * @property {string} reason - The business reason for this current phone call\n * @property {string} shieldImg -\n *          Shield image URL that serves as authenticity proof of the current phone call\n * @property {string} sid -\n *          A string that uniquely identifies this current branded phone call.\n * @property {string} status - The status of the current phone call\n * @property {string} to - The terminating phone number\n * @property {string} url - The URL of this resource.\n * @property {string} useCase - The use case for the current phone call\n *\n * @param {TrustedComms} version - Version of the resource\n * @param {CurrentCallPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nCurrentCallInstance = function CurrentCallInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.bgColor = payload.bg_color; // jshint ignore:line\n  this.caller = payload.caller; // jshint ignore:line\n  this.createdAt = deserialize.iso8601DateTime(payload.created_at); // jshint ignore:line\n  this.fontColor = payload.font_color; // jshint ignore:line\n  this.from = payload.from; // jshint ignore:line\n  this.logo = payload.logo; // jshint ignore:line\n  this.manager = payload.manager; // jshint ignore:line\n  this.reason = payload.reason; // jshint ignore:line\n  this.shieldImg = payload.shield_img; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.useCase = payload.use_case; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(CurrentCallInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CurrentCallContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CurrentCallInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.TrustedComms.CurrentCallInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.xXcnamSensitivePhoneNumberFrom] -\n *          The originating Phone Number\n * @param {string} [opts.xXcnamSensitivePhoneNumberTo] -\n *          The terminating Phone Number\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CurrentCallInstance\n */\n/* jshint ignore:end */\nCurrentCallInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.CurrentCallInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCurrentCallInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCurrentCallInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CurrentCallContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.TrustedComms.CurrentCallContext\n *\n * @param {TrustedComms} version - Version of the resource\n */\n/* jshint ignore:end */\nCurrentCallContext = function CurrentCallContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/CurrentCall`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CurrentCallInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.TrustedComms.CurrentCallContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.xXcnamSensitivePhoneNumberFrom] -\n *          The originating Phone Number\n * @param {string} [opts.xXcnamSensitivePhoneNumberTo] -\n *          The terminating Phone Number\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CurrentCallInstance\n */\n/* jshint ignore:end */\nCurrentCallContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({\n    'X-Xcnam-Sensitive-Phone-Number-From': _.get(opts, 'xXcnamSensitivePhoneNumberFrom'),\n    'X-Xcnam-Sensitive-Phone-Number-To': _.get(opts, 'xXcnamSensitivePhoneNumberTo')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CurrentCallInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.TrustedComms.CurrentCallContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCurrentCallContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCurrentCallContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CurrentCallList: CurrentCallList,\n  CurrentCallPage: CurrentCallPage,\n  CurrentCallInstance: CurrentCallInstance,\n  CurrentCallContext: CurrentCallContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar BrandedChannelList = require(\n    './trusted_comms/brandedChannel').BrandedChannelList;\nvar BrandsInformationList = require(\n    './trusted_comms/brandsInformation').BrandsInformationList;\nvar CpsList = require('./trusted_comms/cps').CpsList;\nvar CurrentCallList = require('./trusted_comms/currentCall').CurrentCallList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustedComms version of Preview\n *\n * @constructor Twilio.Preview.TrustedComms\n *\n * @property {Twilio.Preview.TrustedComms.BrandedChannelList} brandedChannels -\n *          brandedChannels resource\n * @property {Twilio.Preview.TrustedComms.BrandsInformationList} brandsInformation -\n *          brandsInformation resource\n * @property {Twilio.Preview.TrustedComms.CpsList} cps - cps resource\n * @property {Twilio.Preview.TrustedComms.CurrentCallList} currentCalls -\n *          currentCalls resource\n *\n * @param {Twilio.Preview} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction TrustedComms(domain) {\n  Version.prototype.constructor.call(this, domain, 'TrustedComms');\n\n  // Resources\n  this._brandedChannels = undefined;\n  this._brandsInformation = undefined;\n  this._cps = undefined;\n  this._currentCalls = undefined;\n}\n\n_.extend(TrustedComms.prototype, Version.prototype);\nTrustedComms.prototype.constructor = TrustedComms;\n\nObject.defineProperty(TrustedComms.prototype,\n  'brandedChannels', {\n    get: function() {\n      this._brandedChannels = this._brandedChannels || new BrandedChannelList(this);\n      return this._brandedChannels;\n    }\n});\n\nObject.defineProperty(TrustedComms.prototype,\n  'brandsInformation', {\n    get: function() {\n      this._brandsInformation = this._brandsInformation || new BrandsInformationList(this);\n      return this._brandsInformation;\n    }\n});\n\nObject.defineProperty(TrustedComms.prototype,\n  'cps', {\n    get: function() {\n      this._cps = this._cps || new CpsList(this);\n      return this._cps;\n    }\n});\n\nObject.defineProperty(TrustedComms.prototype,\n  'currentCalls', {\n    get: function() {\n      this._currentCalls = this._currentCalls || new CurrentCallList(this);\n      return this._currentCalls;\n    }\n});\n\nmodule.exports = TrustedComms;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AssistantFallbackActionsList;\nvar AssistantFallbackActionsPage;\nvar AssistantFallbackActionsInstance;\nvar AssistantFallbackActionsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantFallbackActionsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The assistant_sid\n */\n/* jshint ignore:end */\nAssistantFallbackActionsList = function AssistantFallbackActionsList(version,\n    assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function assistantFallbackActions\n   * @memberof Twilio.Preview.Understand.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsContext}\n   */\n  /* jshint ignore:end */\n  function AssistantFallbackActionsListInstance(sid) {\n    return AssistantFallbackActionsListInstance.get(sid);\n  }\n\n  AssistantFallbackActionsListInstance._version = version;\n  // Path Solution\n  AssistantFallbackActionsListInstance._solution = {assistantSid: assistantSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a assistant_fallback_actions\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsList#\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsContext}\n   */\n  /* jshint ignore:end */\n  AssistantFallbackActionsListInstance.get = function get() {\n    return new AssistantFallbackActionsContext(this._version, this._solution.assistantSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AssistantFallbackActionsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AssistantFallbackActionsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AssistantFallbackActionsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantFallbackActionsPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AssistantFallbackActionsSolution} solution - Path solution\n *\n * @returns AssistantFallbackActionsPage\n */\n/* jshint ignore:end */\nAssistantFallbackActionsPage = function AssistantFallbackActionsPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AssistantFallbackActionsPage.prototype, Page.prototype);\nAssistantFallbackActionsPage.prototype.constructor = AssistantFallbackActionsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AssistantFallbackActionsInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsPage#\n *\n * @param {AssistantFallbackActionsPayload} payload - Payload response from the API\n *\n * @returns AssistantFallbackActionsInstance\n */\n/* jshint ignore:end */\nAssistantFallbackActionsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new AssistantFallbackActionsInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantFallbackActionsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssistantFallbackActionsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantFallbackActionsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsInstance\n *\n * @property {string} accountSid - The account_sid\n * @property {string} assistantSid - The assistant_sid\n * @property {string} url - The url\n * @property {object} data - The data\n *\n * @param {Understand} version - Version of the resource\n * @param {AssistantFallbackActionsPayload} payload - The instance payload\n * @param {sid} assistantSid - The assistant_sid\n */\n/* jshint ignore:end */\nAssistantFallbackActionsInstance = function\n    AssistantFallbackActionsInstance(version, payload, assistantSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, };\n};\n\nObject.defineProperty(AssistantFallbackActionsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AssistantFallbackActionsContext(this._version, this._solution.assistantSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AssistantFallbackActionsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantFallbackActionsInstance\n */\n/* jshint ignore:end */\nAssistantFallbackActionsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AssistantFallbackActionsInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.fallbackActions] - The fallback_actions\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantFallbackActionsInstance\n */\n/* jshint ignore:end */\nAssistantFallbackActionsInstance.prototype.update = function update(opts,\n    callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantFallbackActionsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssistantFallbackActionsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantFallbackActionsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The assistant_sid\n */\n/* jshint ignore:end */\nAssistantFallbackActionsContext = function\n    AssistantFallbackActionsContext(version, assistantSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, };\n  this._uri = `/Assistants/${assistantSid}/FallbackActions`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AssistantFallbackActionsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantFallbackActionsInstance\n */\n/* jshint ignore:end */\nAssistantFallbackActionsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssistantFallbackActionsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AssistantFallbackActionsInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.fallbackActions] - The fallback_actions\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantFallbackActionsInstance\n */\n/* jshint ignore:end */\nAssistantFallbackActionsContext.prototype.update = function update(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'FallbackActions': serialize.object(_.get(opts, 'fallbackActions'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssistantFallbackActionsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantFallbackActionsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAssistantFallbackActionsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AssistantFallbackActionsList: AssistantFallbackActionsList,\n  AssistantFallbackActionsPage: AssistantFallbackActionsPage,\n  AssistantFallbackActionsInstance: AssistantFallbackActionsInstance,\n  AssistantFallbackActionsContext: AssistantFallbackActionsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AssistantInitiationActionsList;\nvar AssistantInitiationActionsPage;\nvar AssistantInitiationActionsInstance;\nvar AssistantInitiationActionsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantInitiationActionsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The assistant_sid\n */\n/* jshint ignore:end */\nAssistantInitiationActionsList = function\n    AssistantInitiationActionsList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function assistantInitiationActions\n   * @memberof Twilio.Preview.Understand.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsContext}\n   */\n  /* jshint ignore:end */\n  function AssistantInitiationActionsListInstance(sid) {\n    return AssistantInitiationActionsListInstance.get(sid);\n  }\n\n  AssistantInitiationActionsListInstance._version = version;\n  // Path Solution\n  AssistantInitiationActionsListInstance._solution = {assistantSid: assistantSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a assistant_initiation_actions\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsList#\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsContext}\n   */\n  /* jshint ignore:end */\n  AssistantInitiationActionsListInstance.get = function get() {\n    return new AssistantInitiationActionsContext(this._version, this._solution.assistantSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AssistantInitiationActionsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AssistantInitiationActionsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AssistantInitiationActionsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantInitiationActionsPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AssistantInitiationActionsSolution} solution - Path solution\n *\n * @returns AssistantInitiationActionsPage\n */\n/* jshint ignore:end */\nAssistantInitiationActionsPage = function\n    AssistantInitiationActionsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AssistantInitiationActionsPage.prototype, Page.prototype);\nAssistantInitiationActionsPage.prototype.constructor = AssistantInitiationActionsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AssistantInitiationActionsInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsPage#\n *\n * @param {AssistantInitiationActionsPayload} payload -\n *          Payload response from the API\n *\n * @returns AssistantInitiationActionsInstance\n */\n/* jshint ignore:end */\nAssistantInitiationActionsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new AssistantInitiationActionsInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantInitiationActionsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssistantInitiationActionsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantInitiationActionsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsInstance\n *\n * @property {string} accountSid - The account_sid\n * @property {string} assistantSid - The assistant_sid\n * @property {string} url - The url\n * @property {object} data - The data\n *\n * @param {Understand} version - Version of the resource\n * @param {AssistantInitiationActionsPayload} payload - The instance payload\n * @param {sid} assistantSid - The assistant_sid\n */\n/* jshint ignore:end */\nAssistantInitiationActionsInstance = function\n    AssistantInitiationActionsInstance(version, payload, assistantSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, };\n};\n\nObject.defineProperty(AssistantInitiationActionsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AssistantInitiationActionsContext(this._version, this._solution.assistantSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AssistantInitiationActionsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInitiationActionsInstance\n */\n/* jshint ignore:end */\nAssistantInitiationActionsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AssistantInitiationActionsInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.initiationActions] - The initiation_actions\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInitiationActionsInstance\n */\n/* jshint ignore:end */\nAssistantInitiationActionsInstance.prototype.update = function update(opts,\n    callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantInitiationActionsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssistantInitiationActionsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantInitiationActionsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The assistant_sid\n */\n/* jshint ignore:end */\nAssistantInitiationActionsContext = function\n    AssistantInitiationActionsContext(version, assistantSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, };\n  this._uri = `/Assistants/${assistantSid}/InitiationActions`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AssistantInitiationActionsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInitiationActionsInstance\n */\n/* jshint ignore:end */\nAssistantInitiationActionsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssistantInitiationActionsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AssistantInitiationActionsInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.initiationActions] - The initiation_actions\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInitiationActionsInstance\n */\n/* jshint ignore:end */\nAssistantInitiationActionsContext.prototype.update = function update(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'InitiationActions': serialize.object(_.get(opts, 'initiationActions'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssistantInitiationActionsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantInitiationActionsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAssistantInitiationActionsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AssistantInitiationActionsList: AssistantInitiationActionsList,\n  AssistantInitiationActionsPage: AssistantInitiationActionsPage,\n  AssistantInitiationActionsInstance: AssistantInitiationActionsInstance,\n  AssistantInitiationActionsContext: AssistantInitiationActionsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DialogueList;\nvar DialoguePage;\nvar DialogueInstance;\nvar DialogueContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DialogueList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.DialogueList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the parent Assistant.\n */\n/* jshint ignore:end */\nDialogueList = function DialogueList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function dialogues\n   * @memberof Twilio.Preview.Understand.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.DialogueContext}\n   */\n  /* jshint ignore:end */\n  function DialogueListInstance(sid) {\n    return DialogueListInstance.get(sid);\n  }\n\n  DialogueListInstance._version = version;\n  // Path Solution\n  DialogueListInstance._solution = {assistantSid: assistantSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a dialogue\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.DialogueList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.DialogueContext}\n   */\n  /* jshint ignore:end */\n  DialogueListInstance.get = function get(sid) {\n    return new DialogueContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.DialogueList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DialogueListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DialogueListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DialogueListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DialoguePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.DialoguePage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DialogueSolution} solution - Path solution\n *\n * @returns DialoguePage\n */\n/* jshint ignore:end */\nDialoguePage = function DialoguePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DialoguePage.prototype, Page.prototype);\nDialoguePage.prototype.constructor = DialoguePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DialogueInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.DialoguePage#\n *\n * @param {DialoguePayload} payload - Payload response from the API\n *\n * @returns DialogueInstance\n */\n/* jshint ignore:end */\nDialoguePage.prototype.getInstance = function getInstance(payload) {\n  return new DialogueInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.DialoguePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDialoguePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDialoguePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DialogueContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.DialogueInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Field.\n * @property {string} assistantSid - The unique ID of the parent Assistant.\n * @property {string} sid - The unique ID of the Dialogue\n * @property {object} data - The dialogue memory object as json\n * @property {string} url - The url\n *\n * @param {Understand} version - Version of the resource\n * @param {DialoguePayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the parent Assistant.\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nDialogueInstance = function DialogueInstance(version, payload, assistantSid,\n                                              sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(DialogueInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DialogueContext(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DialogueInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.DialogueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DialogueInstance\n */\n/* jshint ignore:end */\nDialogueInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.DialogueInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDialogueInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDialogueInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DialogueContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.DialogueContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The assistant_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nDialogueContext = function DialogueContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Dialogues/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DialogueInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.DialogueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DialogueInstance\n */\n/* jshint ignore:end */\nDialogueContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DialogueInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.DialogueContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDialogueContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDialogueContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DialogueList: DialogueList,\n  DialoguePage: DialoguePage,\n  DialogueInstance: DialogueInstance,\n  DialogueContext: DialogueContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar FieldValueList;\nvar FieldValuePage;\nvar FieldValueInstance;\nvar FieldValueContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldValueList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the Assistant.\n * @param {string} fieldTypeSid -\n *          The unique ID of the Field Type associated with this Field Value.\n */\n/* jshint ignore:end */\nFieldValueList = function FieldValueList(version, assistantSid, fieldTypeSid) {\n  /* jshint ignore:start */\n  /**\n   * @function fieldValues\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueContext}\n   */\n  /* jshint ignore:end */\n  function FieldValueListInstance(sid) {\n    return FieldValueListInstance.get(sid);\n  }\n\n  FieldValueListInstance._version = version;\n  // Path Solution\n  FieldValueListInstance._solution = {assistantSid: assistantSid, fieldTypeSid: fieldTypeSid};\n  FieldValueListInstance._uri = `/Assistants/${assistantSid}/FieldTypes/${fieldTypeSid}/FieldValues`;\n  /* jshint ignore:start */\n  /**\n   * Streams FieldValueInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          An ISO language-country string of the value. For example: en-US\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FieldValueInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          An ISO language-country string of the value. For example: en-US\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FieldValueInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] -\n   *          An ISO language-country string of the value. For example: en-US\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldValuePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FieldValueInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldValuePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a FieldValueInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.language - An ISO language-country string of the value.\n   * @param {string} opts.value -\n   *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n   * @param {string} [opts.synonymOf] -\n   *          A value that indicates this field value is a synonym of. Empty if the value is not a synonym.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FieldValueInstance\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['language'])) {\n      throw new Error('Required parameter \"opts[\\'language\\']\" missing.');\n    }\n    if (_.isUndefined(opts['value'])) {\n      throw new Error('Required parameter \"opts[\\'value\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'Value': _.get(opts, 'value'),\n      'SynonymOf': _.get(opts, 'synonymOf')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldValueInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.fieldTypeSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a field_value\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueContext}\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.get = function get(sid) {\n    return new FieldValueContext(\n      this._version,\n      this._solution.assistantSid,\n      this._solution.fieldTypeSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FieldValueListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FieldValueListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FieldValueListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldValuePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValuePage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FieldValueSolution} solution - Path solution\n *\n * @returns FieldValuePage\n */\n/* jshint ignore:end */\nFieldValuePage = function FieldValuePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FieldValuePage.prototype, Page.prototype);\nFieldValuePage.prototype.constructor = FieldValuePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FieldValueInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValuePage#\n *\n * @param {FieldValuePayload} payload - Payload response from the API\n *\n * @returns FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValuePage.prototype.getInstance = function getInstance(payload) {\n  return new FieldValueInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.fieldTypeSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValuePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldValuePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldValuePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldValueContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Field Value.\n * @property {Date} dateCreated - The date that this resource was created\n * @property {Date} dateUpdated - The date that this resource was last updated\n * @property {string} fieldTypeSid -\n *          The unique ID of the Field Type associated with this Field Value.\n * @property {string} language - An ISO language-country string of the value.\n * @property {string} assistantSid - The unique ID of the Assistant.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} value - The Field Value itself.\n * @property {string} url - The url\n * @property {string} synonymOf -\n *          A value that indicates this field value is a synonym of. Empty if the value is not a synonym.\n *\n * @param {Understand} version - Version of the resource\n * @param {FieldValuePayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the Assistant.\n * @param {sid} fieldTypeSid -\n *          The unique ID of the Field Type associated with this Field Value.\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nFieldValueInstance = function FieldValueInstance(version, payload, assistantSid,\n                                                  fieldTypeSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.fieldTypeSid = payload.field_type_sid; // jshint ignore:line\n  this.language = payload.language; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.value = payload.value; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.synonymOf = payload.synonym_of; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, fieldTypeSid: fieldTypeSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FieldValueInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FieldValueContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.fieldTypeSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FieldValueInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValueInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldValueInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValueInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldValueInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldValueInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldValueContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The assistant_sid\n * @param {sid_like} fieldTypeSid - The field_type_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nFieldValueContext = function FieldValueContext(version, assistantSid,\n                                                fieldTypeSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, fieldTypeSid: fieldTypeSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/FieldTypes/${fieldTypeSid}/FieldValues/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FieldValueInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValueContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FieldValueInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.fieldTypeSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldValueInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldValueInstance\n */\n/* jshint ignore:end */\nFieldValueContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldValueContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFieldValueContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FieldValueList: FieldValueList,\n  FieldValuePage: FieldValuePage,\n  FieldValueInstance: FieldValueInstance,\n  FieldValueContext: FieldValueContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar FieldValueList = require('./fieldType/fieldValue').FieldValueList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar FieldTypeList;\nvar FieldTypePage;\nvar FieldTypeInstance;\nvar FieldTypeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldTypeList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.FieldTypeList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the Assistant.\n */\n/* jshint ignore:end */\nFieldTypeList = function FieldTypeList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function fieldTypes\n   * @memberof Twilio.Preview.Understand.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.FieldTypeContext}\n   */\n  /* jshint ignore:end */\n  function FieldTypeListInstance(sid) {\n    return FieldTypeListInstance.get(sid);\n  }\n\n  FieldTypeListInstance._version = version;\n  // Path Solution\n  FieldTypeListInstance._solution = {assistantSid: assistantSid};\n  FieldTypeListInstance._uri = `/Assistants/${assistantSid}/FieldTypes`;\n  /* jshint ignore:start */\n  /**\n   * Streams FieldTypeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FieldTypeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FieldTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FieldTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a FieldTypeInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.uniqueName -\n   *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n   * @param {string} [opts.friendlyName] -\n   *          A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FieldTypeInstance\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'FriendlyName': _.get(opts, 'friendlyName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldTypeInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a field_type\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.FieldTypeContext}\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.get = function get(sid) {\n    return new FieldTypeContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FieldTypeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FieldTypeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FieldTypeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldTypePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.FieldTypePage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FieldTypeSolution} solution - Path solution\n *\n * @returns FieldTypePage\n */\n/* jshint ignore:end */\nFieldTypePage = function FieldTypePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FieldTypePage.prototype, Page.prototype);\nFieldTypePage.prototype.constructor = FieldTypePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FieldTypeInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypePage#\n *\n * @param {FieldTypePayload} payload - Payload response from the API\n *\n * @returns FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypePage.prototype.getInstance = function getInstance(payload) {\n  return new FieldTypeInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldTypePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldTypePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldTypeContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.FieldTypeInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Field Type.\n * @property {Date} dateCreated - The date that this resource was created\n * @property {Date} dateUpdated - The date that this resource was last updated\n * @property {string} friendlyName -\n *          A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.\n * @property {string} links - The links\n * @property {string} assistantSid - The unique ID of the Assistant.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} uniqueName -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @property {string} url - The url\n *\n * @param {Understand} version - Version of the resource\n * @param {FieldTypePayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the Assistant.\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nFieldTypeInstance = function FieldTypeInstance(version, payload, assistantSid,\n                                                sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FieldTypeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FieldTypeContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FieldTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FieldTypeInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.\n * @param {string} [opts.uniqueName] -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldTypeInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the fieldValues\n *\n * @function fieldValues\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList}\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.fieldValues = function fieldValues() {\n  return this._proxy.fieldValues;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldTypeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldTypeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldTypeContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.FieldTypeContext\n *\n * @property {Twilio.Preview.Understand.AssistantContext.FieldTypeContext.FieldValueList} fieldValues -\n *          fieldValues resource\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The assistant_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nFieldTypeContext = function FieldTypeContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/FieldTypes/${sid}`;\n\n  // Dependents\n  this._fieldValues = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FieldTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FieldTypeInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FieldTypeInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.\n * @param {string} [opts.uniqueName] -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UniqueName': _.get(opts, 'uniqueName')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FieldTypeInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldTypeInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldTypeInstance\n */\n/* jshint ignore:end */\nFieldTypeContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(FieldTypeContext.prototype,\n  'fieldValues', {\n    get: function() {\n      if (!this._fieldValues) {\n        this._fieldValues = new FieldValueList(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n      return this._fieldValues;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.FieldTypeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldTypeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFieldTypeContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FieldTypeList: FieldTypeList,\n  FieldTypePage: FieldTypePage,\n  FieldTypeInstance: FieldTypeInstance,\n  FieldTypeContext: FieldTypeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ModelBuildList;\nvar ModelBuildPage;\nvar ModelBuildInstance;\nvar ModelBuildContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ModelBuildList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.ModelBuildList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the parent Assistant.\n */\n/* jshint ignore:end */\nModelBuildList = function ModelBuildList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function modelBuilds\n   * @memberof Twilio.Preview.Understand.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.ModelBuildContext}\n   */\n  /* jshint ignore:end */\n  function ModelBuildListInstance(sid) {\n    return ModelBuildListInstance.get(sid);\n  }\n\n  ModelBuildListInstance._version = version;\n  // Path Solution\n  ModelBuildListInstance._solution = {assistantSid: assistantSid};\n  ModelBuildListInstance._uri = `/Assistants/${assistantSid}/ModelBuilds`;\n  /* jshint ignore:start */\n  /**\n   * Streams ModelBuildInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ModelBuildInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ModelBuildInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ModelBuildPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ModelBuildInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ModelBuildPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ModelBuildInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.statusCallback] - The status_callback\n   * @param {string} [opts.uniqueName] -\n   *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ModelBuildInstance\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'UniqueName': _.get(opts, 'uniqueName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ModelBuildInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a model_build\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.ModelBuildContext}\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.get = function get(sid) {\n    return new ModelBuildContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ModelBuildListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ModelBuildListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ModelBuildListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ModelBuildPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.ModelBuildPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ModelBuildSolution} solution - Path solution\n *\n * @returns ModelBuildPage\n */\n/* jshint ignore:end */\nModelBuildPage = function ModelBuildPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ModelBuildPage.prototype, Page.prototype);\nModelBuildPage.prototype.constructor = ModelBuildPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ModelBuildInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildPage#\n *\n * @param {ModelBuildPayload} payload - Payload response from the API\n *\n * @returns ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildPage.prototype.getInstance = function getInstance(payload) {\n  return new ModelBuildInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nModelBuildPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nModelBuildPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ModelBuildContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.ModelBuildInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Model Build.\n * @property {Date} dateCreated - The date that this resource was created\n * @property {Date} dateUpdated - The date that this resource was last updated\n * @property {string} assistantSid - The unique ID of the parent Assistant.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {model_build.status} status -\n *          A string that described the model build status. The values can be: enqueued, building, completed, failed\n * @property {string} uniqueName -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @property {string} url - The url\n * @property {number} buildDuration -\n *          The time in seconds it took to build the model.\n * @property {number} errorCode - The error_code\n *\n * @param {Understand} version - Version of the resource\n * @param {ModelBuildPayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the parent Assistant.\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nModelBuildInstance = function ModelBuildInstance(version, payload, assistantSid,\n                                                  sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.buildDuration = deserialize.integer(payload.build_duration); // jshint ignore:line\n  this.errorCode = deserialize.integer(payload.error_code); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ModelBuildInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ModelBuildContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ModelBuildInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ModelBuildInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ModelBuildInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nModelBuildInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nModelBuildInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ModelBuildContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.ModelBuildContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The assistant_sid\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nModelBuildContext = function ModelBuildContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/ModelBuilds/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ModelBuildInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ModelBuildInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ModelBuildInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'UniqueName': _.get(opts, 'uniqueName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ModelBuildInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ModelBuildInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ModelBuildInstance\n */\n/* jshint ignore:end */\nModelBuildContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.ModelBuildContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nModelBuildContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nModelBuildContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ModelBuildList: ModelBuildList,\n  ModelBuildPage: ModelBuildPage,\n  ModelBuildInstance: ModelBuildInstance,\n  ModelBuildContext: ModelBuildContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar QueryList;\nvar QueryPage;\nvar QueryInstance;\nvar QueryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the QueryList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.QueryList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the parent Assistant.\n */\n/* jshint ignore:end */\nQueryList = function QueryList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function queries\n   * @memberof Twilio.Preview.Understand.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.QueryContext}\n   */\n  /* jshint ignore:end */\n  function QueryListInstance(sid) {\n    return QueryListInstance.get(sid);\n  }\n\n  QueryListInstance._version = version;\n  // Path Solution\n  QueryListInstance._solution = {assistantSid: assistantSid};\n  QueryListInstance._uri = `/Assistants/${assistantSid}/Queries`;\n  /* jshint ignore:start */\n  /**\n   * Streams QueryInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Understand.AssistantContext.QueryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] - An ISO language-country string of the sample.\n   * @param {string} [opts.modelBuild] -\n   *          The Model Build Sid or unique name of the Model Build to be queried.\n   * @param {string} [opts.status] -\n   *          A string that described the query status. The values can be: pending_review, reviewed, discarded\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  QueryListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists QueryInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Understand.AssistantContext.QueryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] - An ISO language-country string of the sample.\n   * @param {string} [opts.modelBuild] -\n   *          The Model Build Sid or unique name of the Model Build to be queried.\n   * @param {string} [opts.status] -\n   *          A string that described the query status. The values can be: pending_review, reviewed, discarded\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  QueryListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of QueryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Understand.AssistantContext.QueryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] - An ISO language-country string of the sample.\n   * @param {string} [opts.modelBuild] -\n   *          The Model Build Sid or unique name of the Model Build to be queried.\n   * @param {string} [opts.status] -\n   *          A string that described the query status. The values can be: pending_review, reviewed, discarded\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  QueryListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'ModelBuild': _.get(opts, 'modelBuild'),\n      'Status': _.get(opts, 'status'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new QueryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of QueryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Understand.AssistantContext.QueryList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  QueryListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new QueryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a QueryInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Understand.AssistantContext.QueryList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.language - An ISO language-country string of the sample.\n   * @param {string} opts.query -\n   *          A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long.\n   * @param {string} [opts.tasks] -\n   *          Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated task-unique-name-1, task-unique-name-2\n   * @param {string} [opts.modelBuild] -\n   *          The Model Build Sid or unique name of the Model Build to be queried.\n   * @param {string} [opts.field] -\n   *          Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format task-unique-name-1:field-unique-name\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed QueryInstance\n   */\n  /* jshint ignore:end */\n  QueryListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['language'])) {\n      throw new Error('Required parameter \"opts[\\'language\\']\" missing.');\n    }\n    if (_.isUndefined(opts['query'])) {\n      throw new Error('Required parameter \"opts[\\'query\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'Query': _.get(opts, 'query'),\n      'Tasks': _.get(opts, 'tasks'),\n      'ModelBuild': _.get(opts, 'modelBuild'),\n      'Field': _.get(opts, 'field')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new QueryInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a query\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.QueryList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.QueryContext}\n   */\n  /* jshint ignore:end */\n  QueryListInstance.get = function get(sid) {\n    return new QueryContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.QueryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  QueryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  QueryListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return QueryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the QueryPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.QueryPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {QuerySolution} solution - Path solution\n *\n * @returns QueryPage\n */\n/* jshint ignore:end */\nQueryPage = function QueryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(QueryPage.prototype, Page.prototype);\nQueryPage.prototype.constructor = QueryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of QueryInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryPage#\n *\n * @param {QueryPayload} payload - Payload response from the API\n *\n * @returns QueryInstance\n */\n/* jshint ignore:end */\nQueryPage.prototype.getInstance = function getInstance(payload) {\n  return new QueryInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nQueryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nQueryPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the QueryContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.QueryInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Query.\n * @property {Date} dateCreated - The date that this resource was created\n * @property {Date} dateUpdated - The date that this resource was last updated\n * @property {object} results -\n *          The natural language analysis results which include the Task recognized, the confidence score and a list of identified Fields.\n * @property {string} language - An ISO language-country string of the sample.\n * @property {string} modelBuildSid - The unique ID of the Model Build queried.\n * @property {string} query - The end-user's natural language input.\n * @property {string} sampleSid -\n *          An optional reference to the Sample created from this query.\n * @property {string} assistantSid - The unique ID of the parent Assistant.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} status -\n *          A string that described the query status. The values can be: pending_review, reviewed, discarded\n * @property {string} url - The url\n * @property {string} sourceChannel -\n *          The communication channel where this end-user input came from\n *\n * @param {Understand} version - Version of the resource\n * @param {QueryPayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the parent Assistant.\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nQueryInstance = function QueryInstance(version, payload, assistantSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.results = payload.results; // jshint ignore:line\n  this.language = payload.language; // jshint ignore:line\n  this.modelBuildSid = payload.model_build_sid; // jshint ignore:line\n  this.query = payload.query; // jshint ignore:line\n  this.sampleSid = payload.sample_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.sourceChannel = payload.source_channel; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(QueryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new QueryContext(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a QueryInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a QueryInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.sampleSid] -\n *          An optional reference to the Sample created from this query.\n * @param {string} [opts.status] -\n *          A string that described the query status. The values can be: pending_review, reviewed, discarded\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a QueryInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nQueryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nQueryInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the QueryContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.QueryContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The unique ID of the Assistant.\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nQueryContext = function QueryContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Queries/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a QueryInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new QueryInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a QueryInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.sampleSid] -\n *          An optional reference to the Sample created from this query.\n * @param {string} [opts.status] -\n *          A string that described the query status. The values can be: pending_review, reviewed, discarded\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'SampleSid': _.get(opts, 'sampleSid'), 'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new QueryInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a QueryInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed QueryInstance\n */\n/* jshint ignore:end */\nQueryContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.QueryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nQueryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nQueryContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  QueryList: QueryList,\n  QueryPage: QueryPage,\n  QueryInstance: QueryInstance,\n  QueryContext: QueryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar StyleSheetList;\nvar StyleSheetPage;\nvar StyleSheetInstance;\nvar StyleSheetContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the StyleSheetList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.StyleSheetList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the Assistant\n */\n/* jshint ignore:end */\nStyleSheetList = function StyleSheetList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function styleSheet\n   * @memberof Twilio.Preview.Understand.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.StyleSheetContext}\n   */\n  /* jshint ignore:end */\n  function StyleSheetListInstance(sid) {\n    return StyleSheetListInstance.get(sid);\n  }\n\n  StyleSheetListInstance._version = version;\n  // Path Solution\n  StyleSheetListInstance._solution = {assistantSid: assistantSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a style_sheet\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetList#\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.StyleSheetContext}\n   */\n  /* jshint ignore:end */\n  StyleSheetListInstance.get = function get() {\n    return new StyleSheetContext(this._version, this._solution.assistantSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  StyleSheetListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  StyleSheetListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return StyleSheetListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StyleSheetPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.StyleSheetPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {StyleSheetSolution} solution - Path solution\n *\n * @returns StyleSheetPage\n */\n/* jshint ignore:end */\nStyleSheetPage = function StyleSheetPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(StyleSheetPage.prototype, Page.prototype);\nStyleSheetPage.prototype.constructor = StyleSheetPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of StyleSheetInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetPage#\n *\n * @param {StyleSheetPayload} payload - Payload response from the API\n *\n * @returns StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetPage.prototype.getInstance = function getInstance(payload) {\n  return new StyleSheetInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStyleSheetPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStyleSheetPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StyleSheetContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.StyleSheetInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Assistant\n * @property {string} assistantSid - The unique ID of the Assistant\n * @property {string} url - The url\n * @property {object} data - The JSON style sheet object\n *\n * @param {Understand} version - Version of the resource\n * @param {StyleSheetPayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the Assistant\n */\n/* jshint ignore:end */\nStyleSheetInstance = function StyleSheetInstance(version, payload, assistantSid)\n                                                  {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, };\n};\n\nObject.defineProperty(StyleSheetInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new StyleSheetContext(this._version, this._solution.assistantSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a StyleSheetInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a StyleSheetInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.styleSheet] - The JSON Style sheet string\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStyleSheetInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStyleSheetInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StyleSheetContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.StyleSheetContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The unique ID of the Assistant\n */\n/* jshint ignore:end */\nStyleSheetContext = function StyleSheetContext(version, assistantSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, };\n  this._uri = `/Assistants/${assistantSid}/StyleSheet`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a StyleSheetInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new StyleSheetInstance(this._version, payload, this._solution.assistantSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a StyleSheetInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.styleSheet] - The JSON Style sheet string\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StyleSheetInstance\n */\n/* jshint ignore:end */\nStyleSheetContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'StyleSheet': serialize.object(_.get(opts, 'styleSheet'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new StyleSheetInstance(this._version, payload, this._solution.assistantSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.StyleSheetContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStyleSheetContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nStyleSheetContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  StyleSheetList: StyleSheetList,\n  StyleSheetPage: StyleSheetPage,\n  StyleSheetInstance: StyleSheetInstance,\n  StyleSheetContext: StyleSheetContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar FieldList;\nvar FieldPage;\nvar FieldInstance;\nvar FieldContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the parent Assistant.\n * @param {string} taskSid - The unique ID of the Task associated with this Field.\n */\n/* jshint ignore:end */\nFieldList = function FieldList(version, assistantSid, taskSid) {\n  /* jshint ignore:start */\n  /**\n   * @function fields\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.FieldContext}\n   */\n  /* jshint ignore:end */\n  function FieldListInstance(sid) {\n    return FieldListInstance.get(sid);\n  }\n\n  FieldListInstance._version = version;\n  // Path Solution\n  FieldListInstance._solution = {assistantSid: assistantSid, taskSid: taskSid};\n  FieldListInstance._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Fields`;\n  /* jshint ignore:start */\n  /**\n   * Streams FieldInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FieldListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FieldInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FieldInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FieldInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FieldListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a FieldInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.fieldType -\n   *          The unique name or sid of the FieldType. It can be any Built-in Field Type or the unique_name or sid of a custom Field Type.\n   * @param {string} opts.uniqueName -\n   *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FieldInstance\n   */\n  /* jshint ignore:end */\n  FieldListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['fieldType'])) {\n      throw new Error('Required parameter \"opts[\\'fieldType\\']\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FieldType': _.get(opts, 'fieldType'),\n      'UniqueName': _.get(opts, 'uniqueName')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FieldInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.taskSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a field\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.FieldContext}\n   */\n  /* jshint ignore:end */\n  FieldListInstance.get = function get(sid) {\n    return new FieldContext(this._version, this._solution.assistantSid, this._solution.taskSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FieldListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FieldListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FieldListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.FieldPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FieldSolution} solution - Path solution\n *\n * @returns FieldPage\n */\n/* jshint ignore:end */\nFieldPage = function FieldPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FieldPage.prototype, Page.prototype);\nFieldPage.prototype.constructor = FieldPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FieldInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldPage#\n *\n * @param {FieldPayload} payload - Payload response from the API\n *\n * @returns FieldInstance\n */\n/* jshint ignore:end */\nFieldPage.prototype.getInstance = function getInstance(payload) {\n  return new FieldInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.taskSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.FieldInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Field.\n * @property {Date} dateCreated - The date that this resource was created\n * @property {Date} dateUpdated - The date that this resource was last updated\n * @property {string} fieldType -\n *          The Field Type of this field. It can be any Built-in Field Type or unique_name or the Field Type sid of a custom Field Type.\n * @property {string} taskSid -\n *          The unique ID of the Task associated with this Field.\n * @property {string} assistantSid - The unique ID of the parent Assistant.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} uniqueName -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @property {string} url - The url\n *\n * @param {Understand} version - Version of the resource\n * @param {FieldPayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the parent Assistant.\n * @param {sid} taskSid - The unique ID of the Task associated with this Field.\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nFieldInstance = function FieldInstance(version, payload, assistantSid, taskSid,\n                                        sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.fieldType = payload.field_type; // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FieldInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FieldContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.taskSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FieldInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldInstance\n */\n/* jshint ignore:end */\nFieldInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldInstance\n */\n/* jshint ignore:end */\nFieldInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFieldInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FieldContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.FieldContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The unique ID of the Assistant.\n * @param {sid_like} taskSid -\n *          The unique ID of the Task associated with this Field.\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nFieldContext = function FieldContext(version, assistantSid, taskSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Fields/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FieldInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldInstance\n */\n/* jshint ignore:end */\nFieldContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FieldInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FieldInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FieldInstance\n */\n/* jshint ignore:end */\nFieldContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.FieldContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFieldContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFieldContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FieldList: FieldList,\n  FieldPage: FieldPage,\n  FieldInstance: FieldInstance,\n  FieldContext: FieldContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SampleList;\nvar SamplePage;\nvar SampleInstance;\nvar SampleContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SampleList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the Assistant.\n * @param {string} taskSid - The unique ID of the Task associated with this Sample.\n */\n/* jshint ignore:end */\nSampleList = function SampleList(version, assistantSid, taskSid) {\n  /* jshint ignore:start */\n  /**\n   * @function samples\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.SampleContext}\n   */\n  /* jshint ignore:end */\n  function SampleListInstance(sid) {\n    return SampleListInstance.get(sid);\n  }\n\n  SampleListInstance._version = version;\n  // Path Solution\n  SampleListInstance._solution = {assistantSid: assistantSid, taskSid: taskSid};\n  SampleListInstance._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Samples`;\n  /* jshint ignore:start */\n  /**\n   * Streams SampleInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] - An ISO language-country string of the sample.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SampleListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SampleInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] - An ISO language-country string of the sample.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SampleListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SampleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.language] - An ISO language-country string of the sample.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SampleListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SamplePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SampleInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SampleListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SamplePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a SampleInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.language - An ISO language-country string of the sample.\n   * @param {string} opts.taggedText -\n   *          The text example of how end-users may express this task. The sample may contain Field tag blocks.\n   * @param {string} [opts.sourceChannel] -\n   *          The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SampleInstance\n   */\n  /* jshint ignore:end */\n  SampleListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['language'])) {\n      throw new Error('Required parameter \"opts[\\'language\\']\" missing.');\n    }\n    if (_.isUndefined(opts['taggedText'])) {\n      throw new Error('Required parameter \"opts[\\'taggedText\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Language': _.get(opts, 'language'),\n      'TaggedText': _.get(opts, 'taggedText'),\n      'SourceChannel': _.get(opts, 'sourceChannel')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SampleInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.taskSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sample\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.SampleContext}\n   */\n  /* jshint ignore:end */\n  SampleListInstance.get = function get(sid) {\n    return new SampleContext(this._version, this._solution.assistantSid, this._solution.taskSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SampleListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SampleListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SampleListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SamplePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.SamplePage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SampleSolution} solution - Path solution\n *\n * @returns SamplePage\n */\n/* jshint ignore:end */\nSamplePage = function SamplePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SamplePage.prototype, Page.prototype);\nSamplePage.prototype.constructor = SamplePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SampleInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SamplePage#\n *\n * @param {SamplePayload} payload - Payload response from the API\n *\n * @returns SampleInstance\n */\n/* jshint ignore:end */\nSamplePage.prototype.getInstance = function getInstance(payload) {\n  return new SampleInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.taskSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SamplePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSamplePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSamplePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SampleContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.SampleInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Sample.\n * @property {Date} dateCreated - The date that this resource was created\n * @property {Date} dateUpdated - The date that this resource was last updated\n * @property {string} taskSid -\n *          The unique ID of the Task associated with this Sample.\n * @property {string} language - An ISO language-country string of the sample.\n * @property {string} assistantSid - The unique ID of the Assistant.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} taggedText -\n *          The text example of how end-users may express this task. The sample may contain Field tag blocks.\n * @property {string} url - The url\n * @property {string} sourceChannel -\n *          The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null\n *\n * @param {Understand} version - Version of the resource\n * @param {SamplePayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the Assistant.\n * @param {sid} taskSid - The unique ID of the Task associated with this Sample.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nSampleInstance = function SampleInstance(version, payload, assistantSid,\n                                          taskSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.language = payload.language; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.taggedText = payload.tagged_text; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.sourceChannel = payload.source_channel; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SampleInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SampleContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.taskSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SampleInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SampleInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.language] - An ISO language-country string of the sample.\n * @param {string} [opts.taggedText] -\n *          The text example of how end-users may express this task. The sample may contain Field tag blocks.\n * @param {string} [opts.sourceChannel] -\n *          The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SampleInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSampleInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSampleInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SampleContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.SampleContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The unique ID of the Assistant.\n * @param {sid_like} taskSid -\n *          The unique ID of the Task associated with this Sample.\n * @param {sid} sid - A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nSampleContext = function SampleContext(version, assistantSid, taskSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Samples/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SampleInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SampleInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SampleInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.language] - An ISO language-country string of the sample.\n * @param {string} [opts.taggedText] -\n *          The text example of how end-users may express this task. The sample may contain Field tag blocks.\n * @param {string} [opts.sourceChannel] -\n *          The communication channel the sample was captured. It can be: voice, sms, chat, alexa, google-assistant, or slack. If not included the value will be null\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Language': _.get(opts, 'language'),\n    'TaggedText': _.get(opts, 'taggedText'),\n    'SourceChannel': _.get(opts, 'sourceChannel')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SampleInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SampleInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SampleInstance\n */\n/* jshint ignore:end */\nSampleContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.SampleContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSampleContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSampleContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SampleList: SampleList,\n  SamplePage: SamplePage,\n  SampleInstance: SampleInstance,\n  SampleContext: SampleContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TaskActionsList;\nvar TaskActionsPage;\nvar TaskActionsInstance;\nvar TaskActionsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskActionsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the parent Assistant.\n * @param {string} taskSid - The unique ID of the Task.\n */\n/* jshint ignore:end */\nTaskActionsList = function TaskActionsList(version, assistantSid, taskSid) {\n  /* jshint ignore:start */\n  /**\n   * @function taskActions\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsContext}\n   */\n  /* jshint ignore:end */\n  function TaskActionsListInstance(sid) {\n    return TaskActionsListInstance.get(sid);\n  }\n\n  TaskActionsListInstance._version = version;\n  // Path Solution\n  TaskActionsListInstance._solution = {assistantSid: assistantSid, taskSid: taskSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a task_actions\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsList#\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsContext}\n   */\n  /* jshint ignore:end */\n  TaskActionsListInstance.get = function get() {\n    return new TaskActionsContext(this._version, this._solution.assistantSid, this._solution.taskSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskActionsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskActionsListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskActionsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskActionsPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskActionsSolution} solution - Path solution\n *\n * @returns TaskActionsPage\n */\n/* jshint ignore:end */\nTaskActionsPage = function TaskActionsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskActionsPage.prototype, Page.prototype);\nTaskActionsPage.prototype.constructor = TaskActionsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskActionsInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsPage#\n *\n * @param {TaskActionsPayload} payload - Payload response from the API\n *\n * @returns TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskActionsInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.taskSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskActionsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskActionsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskActionsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Field.\n * @property {string} assistantSid - The unique ID of the parent Assistant.\n * @property {string} taskSid - The unique ID of the Task.\n * @property {string} url - The url\n * @property {object} data - The data\n *\n * @param {Understand} version - Version of the resource\n * @param {TaskActionsPayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the parent Assistant.\n * @param {sid} taskSid - The unique ID of the Task.\n */\n/* jshint ignore:end */\nTaskActionsInstance = function TaskActionsInstance(version, payload,\n                                                    assistantSid, taskSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, };\n};\n\nObject.defineProperty(TaskActionsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskActionsContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.taskSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskActionsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskActionsInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.actions] -\n *          The JSON actions that instruct the Assistant how to perform this task.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskActionsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskActionsInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskActionsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The unique ID of the parent Assistant.\n * @param {sid_like} taskSid - The unique ID of the Task.\n */\n/* jshint ignore:end */\nTaskActionsContext = function TaskActionsContext(version, assistantSid, taskSid)\n                                                  {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Actions`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskActionsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskActionsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskActionsInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.actions] -\n *          The JSON actions that instruct the Assistant how to perform this task.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskActionsInstance\n */\n/* jshint ignore:end */\nTaskActionsContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Actions': serialize.object(_.get(opts, 'actions'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskActionsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskActionsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskActionsContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskActionsList: TaskActionsList,\n  TaskActionsPage: TaskActionsPage,\n  TaskActionsInstance: TaskActionsInstance,\n  TaskActionsContext: TaskActionsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TaskStatisticsList;\nvar TaskStatisticsPage;\nvar TaskStatisticsInstance;\nvar TaskStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskStatisticsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the parent Assistant.\n * @param {string} taskSid - The unique ID of the Task associated with this Field.\n */\n/* jshint ignore:end */\nTaskStatisticsList = function TaskStatisticsList(version, assistantSid, taskSid)\n                                                  {\n  /* jshint ignore:start */\n  /**\n   * @function statistics\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function TaskStatisticsListInstance(sid) {\n    return TaskStatisticsListInstance.get(sid);\n  }\n\n  TaskStatisticsListInstance._version = version;\n  // Path Solution\n  TaskStatisticsListInstance._solution = {assistantSid: assistantSid, taskSid: taskSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a task_statistics\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsList#\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsContext}\n   */\n  /* jshint ignore:end */\n  TaskStatisticsListInstance.get = function get() {\n    return new TaskStatisticsContext(\n      this._version,\n      this._solution.assistantSid,\n      this._solution.taskSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskStatisticsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskStatisticsPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskStatisticsSolution} solution - Path solution\n *\n * @returns TaskStatisticsPage\n */\n/* jshint ignore:end */\nTaskStatisticsPage = function TaskStatisticsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskStatisticsPage.prototype, Page.prototype);\nTaskStatisticsPage.prototype.constructor = TaskStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsPage#\n *\n * @param {TaskStatisticsPayload} payload - Payload response from the API\n *\n * @returns TaskStatisticsInstance\n */\n/* jshint ignore:end */\nTaskStatisticsPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.assistantSid,\n    this._solution.taskSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskStatisticsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskStatisticsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Field.\n * @property {string} assistantSid - The unique ID of the parent Assistant.\n * @property {string} taskSid -\n *          The unique ID of the Task associated with this Field.\n * @property {number} samplesCount -\n *          The total number of Samples associated with this Task.\n * @property {number} fieldsCount -\n *          The total number of Fields associated with this Task.\n * @property {string} url - The url\n *\n * @param {Understand} version - Version of the resource\n * @param {TaskStatisticsPayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the parent Assistant.\n * @param {sid} taskSid - The unique ID of the Task associated with this Field.\n */\n/* jshint ignore:end */\nTaskStatisticsInstance = function TaskStatisticsInstance(version, payload,\n                                                          assistantSid, taskSid)\n                                                          {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.samplesCount = deserialize.integer(payload.samples_count); // jshint ignore:line\n  this.fieldsCount = deserialize.integer(payload.fields_count); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, };\n};\n\nObject.defineProperty(TaskStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskStatisticsContext(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.taskSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskStatisticsInstance\n */\n/* jshint ignore:end */\nTaskStatisticsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskStatisticsInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskStatisticsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsContext\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The unique ID of the parent Assistant.\n * @param {sid_like} taskSid -\n *          The unique ID of the Task associated with this Field.\n */\n/* jshint ignore:end */\nTaskStatisticsContext = function TaskStatisticsContext(version, assistantSid,\n                                                        taskSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, taskSid: taskSid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${taskSid}/Statistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskStatisticsInstance\n */\n/* jshint ignore:end */\nTaskStatisticsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.taskSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskStatisticsContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskStatisticsList: TaskStatisticsList,\n  TaskStatisticsPage: TaskStatisticsPage,\n  TaskStatisticsInstance: TaskStatisticsInstance,\n  TaskStatisticsContext: TaskStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar FieldList = require('./task/field').FieldList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar SampleList = require('./task/sample').SampleList;\nvar TaskActionsList = require('./task/taskActions').TaskActionsList;\nvar TaskStatisticsList = require('./task/taskStatistics').TaskStatisticsList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TaskList;\nvar TaskPage;\nvar TaskInstance;\nvar TaskContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n * @param {string} assistantSid - The unique ID of the Assistant.\n */\n/* jshint ignore:end */\nTaskList = function TaskList(version, assistantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function tasks\n   * @memberof Twilio.Preview.Understand.AssistantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext}\n   */\n  /* jshint ignore:end */\n  function TaskListInstance(sid) {\n    return TaskListInstance.get(sid);\n  }\n\n  TaskListInstance._version = version;\n  // Path Solution\n  TaskListInstance._solution = {assistantSid: assistantSid};\n  TaskListInstance._uri = `/Assistants/${assistantSid}/Tasks`;\n  /* jshint ignore:start */\n  /**\n   * Streams TaskInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TaskListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TaskInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TaskInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TaskInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a TaskInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.uniqueName -\n   *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n   * @param {string} [opts.friendlyName] -\n   *          A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.\n   * @param {object} [opts.actions] -\n   *          A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.\n   * @param {string} [opts.actionsUrl] -\n   *          User-provided HTTP endpoint where from the assistant fetches actions\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TaskInstance\n   */\n  /* jshint ignore:end */\n  TaskListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Actions': serialize.object(_.get(opts, 'actions')),\n      'ActionsUrl': _.get(opts, 'actionsUrl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskInstance(\n        this._version,\n        payload,\n        this._solution.assistantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a task\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext}\n   */\n  /* jshint ignore:end */\n  TaskListInstance.get = function get(sid) {\n    return new TaskContext(this._version, this._solution.assistantSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantContext.TaskList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskSolution} solution - Path solution\n *\n * @returns TaskPage\n */\n/* jshint ignore:end */\nTaskPage = function TaskPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskPage.prototype, Page.prototype);\nTaskPage.prototype.constructor = TaskPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskPage#\n *\n * @param {TaskPayload} payload - Payload response from the API\n *\n * @returns TaskInstance\n */\n/* jshint ignore:end */\nTaskPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskInstance(this._version, payload, this._solution.assistantSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Task.\n * @property {Date} dateCreated - The date that this resource was created\n * @property {Date} dateUpdated - The date that this resource was last updated\n * @property {string} friendlyName -\n *          A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.\n * @property {string} links - The links\n * @property {string} assistantSid - The unique ID of the Assistant.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} uniqueName -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @property {string} actionsUrl -\n *          User-provided HTTP endpoint where from the assistant fetches actions\n * @property {string} url - The url\n *\n * @param {Understand} version - Version of the resource\n * @param {TaskPayload} payload - The instance payload\n * @param {sid} assistantSid - The unique ID of the Assistant.\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nTaskInstance = function TaskInstance(version, payload, assistantSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.assistantSid = payload.assistant_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.actionsUrl = payload.actions_url; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {assistantSid: assistantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TaskInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskContext(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.\n * @param {string} [opts.uniqueName] -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @param {object} [opts.actions] -\n *          A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.\n * @param {string} [opts.actionsUrl] -\n *          User-provided HTTP endpoint where from the assistant fetches actions\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the fields\n *\n * @function fields\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList}\n */\n/* jshint ignore:end */\nTaskInstance.prototype.fields = function fields() {\n  return this._proxy.fields;\n};\n\n/* jshint ignore:start */\n/**\n * Access the samples\n *\n * @function samples\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList}\n */\n/* jshint ignore:end */\nTaskInstance.prototype.samples = function samples() {\n  return this._proxy.samples;\n};\n\n/* jshint ignore:start */\n/**\n * Access the taskActions\n *\n * @function taskActions\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsList}\n */\n/* jshint ignore:end */\nTaskInstance.prototype.taskActions = function taskActions() {\n  return this._proxy.taskActions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the statistics\n *\n * @function statistics\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsList}\n */\n/* jshint ignore:end */\nTaskInstance.prototype.statistics = function statistics() {\n  return this._proxy.statistics;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext.TaskContext\n *\n * @property {Twilio.Preview.Understand.AssistantContext.TaskContext.FieldList} fields -\n *          fields resource\n * @property {Twilio.Preview.Understand.AssistantContext.TaskContext.SampleList} samples -\n *          samples resource\n * @property {Twilio.Preview.Understand.AssistantContext.TaskContext.TaskActionsList} taskActions -\n *          taskActions resource\n * @property {Twilio.Preview.Understand.AssistantContext.TaskContext.TaskStatisticsList} statistics -\n *          statistics resource\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} assistantSid - The unique ID of the Assistant.\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nTaskContext = function TaskContext(version, assistantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {assistantSid: assistantSid, sid: sid, };\n  this._uri = `/Assistants/${assistantSid}/Tasks/${sid}`;\n\n  // Dependents\n  this._fields = undefined;\n  this._samples = undefined;\n  this._taskActions = undefined;\n  this._statistics = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.\n * @param {string} [opts.uniqueName] -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @param {object} [opts.actions] -\n *          A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.\n * @param {string} [opts.actionsUrl] -\n *          User-provided HTTP endpoint where from the assistant fetches actions\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'Actions': serialize.object(_.get(opts, 'actions')),\n    'ActionsUrl': _.get(opts, 'actionsUrl')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskInstance(\n      this._version,\n      payload,\n      this._solution.assistantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(TaskContext.prototype,\n  'fields', {\n    get: function() {\n      if (!this._fields) {\n        this._fields = new FieldList(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n      return this._fields;\n    }\n});\n\nObject.defineProperty(TaskContext.prototype,\n  'samples', {\n    get: function() {\n      if (!this._samples) {\n        this._samples = new SampleList(this._version, this._solution.assistantSid, this._solution.sid);\n      }\n      return this._samples;\n    }\n});\n\nObject.defineProperty(TaskContext.prototype,\n  'taskActions', {\n    get: function() {\n      if (!this._taskActions) {\n        this._taskActions = new TaskActionsList(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n      return this._taskActions;\n    }\n});\n\nObject.defineProperty(TaskContext.prototype,\n  'statistics', {\n    get: function() {\n      if (!this._statistics) {\n        this._statistics = new TaskStatisticsList(\n          this._version,\n          this._solution.assistantSid,\n          this._solution.sid\n        );\n      }\n      return this._statistics;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext.TaskContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskList: TaskList,\n  TaskPage: TaskPage,\n  TaskInstance: TaskInstance,\n  TaskContext: TaskContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AssistantFallbackActionsList = require(\n    './assistant/assistantFallbackActions').AssistantFallbackActionsList;\nvar AssistantInitiationActionsList = require(\n    './assistant/assistantInitiationActions').AssistantInitiationActionsList;\nvar DialogueList = require('./assistant/dialogue').DialogueList;\nvar FieldTypeList = require('./assistant/fieldType').FieldTypeList;\nvar ModelBuildList = require('./assistant/modelBuild').ModelBuildList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar QueryList = require('./assistant/query').QueryList;\nvar StyleSheetList = require('./assistant/styleSheet').StyleSheetList;\nvar TaskList = require('./assistant/task').TaskList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar AssistantList;\nvar AssistantPage;\nvar AssistantInstance;\nvar AssistantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantList\n *\n * @param {Twilio.Preview.Understand} version - Version of the resource\n */\n/* jshint ignore:end */\nAssistantList = function AssistantList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function assistants\n   * @memberof Twilio.Preview.Understand#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext}\n   */\n  /* jshint ignore:end */\n  function AssistantListInstance(sid) {\n    return AssistantListInstance.get(sid);\n  }\n\n  AssistantListInstance._version = version;\n  // Path Solution\n  AssistantListInstance._solution = {};\n  AssistantListInstance._uri = `/Assistants`;\n  /* jshint ignore:start */\n  /**\n   * Streams AssistantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Understand.AssistantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AssistantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Understand.AssistantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AssistantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Understand.AssistantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssistantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AssistantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Understand.AssistantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssistantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a AssistantInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Understand.AssistantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          A text description for the Assistant. It is non-unique and can up to 255 characters long.\n   * @param {boolean} [opts.logQueries] -\n   *          A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.\n   * @param {string} [opts.uniqueName] -\n   *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n   * @param {string} [opts.callbackUrl] -\n   *          A user-provided URL to send event callbacks to.\n   * @param {string} [opts.callbackEvents] -\n   *          Space-separated list of callback events that will trigger callbacks.\n   * @param {object} [opts.fallbackActions] -\n   *          The JSON actions to be executed when the user's input is not recognized as matching any Task.\n   * @param {object} [opts.initiationActions] -\n   *          The JSON actions to be executed on inbound phone calls when the Assistant has to say something first.\n   * @param {object} [opts.styleSheet] -\n   *          The JSON object that holds the style sheet for the assistant\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AssistantInstance\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'LogQueries': serialize.bool(_.get(opts, 'logQueries')),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'CallbackUrl': _.get(opts, 'callbackUrl'),\n      'CallbackEvents': _.get(opts, 'callbackEvents'),\n      'FallbackActions': serialize.object(_.get(opts, 'fallbackActions')),\n      'InitiationActions': serialize.object(_.get(opts, 'initiationActions')),\n      'StyleSheet': serialize.object(_.get(opts, 'styleSheet'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssistantInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a assistant\n   *\n   * @function get\n   * @memberof Twilio.Preview.Understand.AssistantList#\n   *\n   * @param {string} sid -\n   *          A 34 character string that uniquely identifies this resource.\n   *\n   * @returns {Twilio.Preview.Understand.AssistantContext}\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.get = function get(sid) {\n    return new AssistantContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Understand.AssistantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AssistantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AssistantListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AssistantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantPage\n *\n * @param {Understand} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AssistantSolution} solution - Path solution\n *\n * @returns AssistantPage\n */\n/* jshint ignore:end */\nAssistantPage = function AssistantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AssistantPage.prototype, Page.prototype);\nAssistantPage.prototype.constructor = AssistantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AssistantInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Understand.AssistantPage#\n *\n * @param {AssistantPayload} payload - Payload response from the API\n *\n * @returns AssistantInstance\n */\n/* jshint ignore:end */\nAssistantPage.prototype.getInstance = function getInstance(payload) {\n  return new AssistantInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssistantPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantInstance\n *\n * @property {string} accountSid -\n *          The unique ID of the Account that created this Assistant.\n * @property {Date} dateCreated - The date that this resource was created\n * @property {Date} dateUpdated - The date that this resource was last updated\n * @property {string} friendlyName -\n *          A text description for the Assistant. It is non-unique and can up to 255 characters long.\n * @property {string} latestModelBuildSid -\n *          The unique ID (Sid) of the latest model build. Null if no model has been built.\n * @property {string} links - The links\n * @property {boolean} logQueries -\n *          A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter.\n * @property {string} sid -\n *          A 34 character string that uniquely identifies this resource.\n * @property {string} uniqueName -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. You can use the unique name in the URL path. Unique up to 64 characters long.\n * @property {string} url - The url\n * @property {string} callbackUrl - A user-provided URL to send event callbacks to.\n * @property {string} callbackEvents -\n *          Space-separated list of callback events that will trigger callbacks.\n *\n * @param {Understand} version - Version of the resource\n * @param {AssistantPayload} payload - The instance payload\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nAssistantInstance = function AssistantInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.latestModelBuildSid = payload.latest_model_build_sid; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.logQueries = payload.log_queries; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.callbackUrl = payload.callback_url; // jshint ignore:line\n  this.callbackEvents = payload.callback_events; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(AssistantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AssistantContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AssistantInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AssistantInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A text description for the Assistant. It is non-unique and can up to 255 characters long.\n * @param {boolean} [opts.logQueries] -\n *          A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.\n * @param {string} [opts.uniqueName] -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @param {string} [opts.callbackUrl] -\n *          A user-provided URL to send event callbacks to.\n * @param {string} [opts.callbackEvents] -\n *          Space-separated list of callback events that will trigger callbacks.\n * @param {object} [opts.fallbackActions] -\n *          The JSON actions to be executed when the user's input is not recognized as matching any Task.\n * @param {object} [opts.initiationActions] -\n *          The JSON actions to be executed on inbound phone calls when the Assistant has to say something first.\n * @param {object} [opts.styleSheet] -\n *          The JSON object that holds the style sheet for the assistant\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AssistantInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the fieldTypes\n *\n * @function fieldTypes\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.FieldTypeList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.fieldTypes = function fieldTypes() {\n  return this._proxy.fieldTypes;\n};\n\n/* jshint ignore:start */\n/**\n * Access the tasks\n *\n * @function tasks\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.TaskList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.tasks = function tasks() {\n  return this._proxy.tasks;\n};\n\n/* jshint ignore:start */\n/**\n * Access the modelBuilds\n *\n * @function modelBuilds\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.ModelBuildList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.modelBuilds = function modelBuilds() {\n  return this._proxy.modelBuilds;\n};\n\n/* jshint ignore:start */\n/**\n * Access the queries\n *\n * @function queries\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.QueryList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.queries = function queries() {\n  return this._proxy.queries;\n};\n\n/* jshint ignore:start */\n/**\n * Access the assistantFallbackActions\n *\n * @function assistantFallbackActions\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.assistantFallbackActions = function\n    assistantFallbackActions() {\n  return this._proxy.assistantFallbackActions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the assistantInitiationActions\n *\n * @function assistantInitiationActions\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.assistantInitiationActions = function\n    assistantInitiationActions() {\n  return this._proxy.assistantInitiationActions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the dialogues\n *\n * @function dialogues\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.DialogueList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.dialogues = function dialogues() {\n  return this._proxy.dialogues;\n};\n\n/* jshint ignore:start */\n/**\n * Access the styleSheet\n *\n * @function styleSheet\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @returns {Twilio.Preview.Understand.AssistantContext.StyleSheetList}\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.styleSheet = function styleSheet() {\n  return this._proxy.styleSheet;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssistantInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssistantContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Understand.AssistantContext\n *\n * @property {Twilio.Preview.Understand.AssistantContext.FieldTypeList} fieldTypes -\n *          fieldTypes resource\n * @property {Twilio.Preview.Understand.AssistantContext.TaskList} tasks -\n *          tasks resource\n * @property {Twilio.Preview.Understand.AssistantContext.ModelBuildList} modelBuilds -\n *          modelBuilds resource\n * @property {Twilio.Preview.Understand.AssistantContext.QueryList} queries -\n *          queries resource\n * @property {Twilio.Preview.Understand.AssistantContext.AssistantFallbackActionsList} assistantFallbackActions -\n *          assistantFallbackActions resource\n * @property {Twilio.Preview.Understand.AssistantContext.AssistantInitiationActionsList} assistantInitiationActions -\n *          assistantInitiationActions resource\n * @property {Twilio.Preview.Understand.AssistantContext.DialogueList} dialogues -\n *          dialogues resource\n * @property {Twilio.Preview.Understand.AssistantContext.StyleSheetList} styleSheet -\n *          styleSheet resource\n *\n * @param {Understand} version - Version of the resource\n * @param {sid_like} sid -\n *          A 34 character string that uniquely identifies this resource.\n */\n/* jshint ignore:end */\nAssistantContext = function AssistantContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Assistants/${sid}`;\n\n  // Dependents\n  this._fieldTypes = undefined;\n  this._tasks = undefined;\n  this._modelBuilds = undefined;\n  this._queries = undefined;\n  this._assistantFallbackActions = undefined;\n  this._assistantInitiationActions = undefined;\n  this._dialogues = undefined;\n  this._styleSheet = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AssistantInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Understand.AssistantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssistantInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AssistantInstance\n *\n * @function update\n * @memberof Twilio.Preview.Understand.AssistantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A text description for the Assistant. It is non-unique and can up to 255 characters long.\n * @param {boolean} [opts.logQueries] -\n *          A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.\n * @param {string} [opts.uniqueName] -\n *          A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.\n * @param {string} [opts.callbackUrl] -\n *          A user-provided URL to send event callbacks to.\n * @param {string} [opts.callbackEvents] -\n *          Space-separated list of callback events that will trigger callbacks.\n * @param {object} [opts.fallbackActions] -\n *          The JSON actions to be executed when the user's input is not recognized as matching any Task.\n * @param {object} [opts.initiationActions] -\n *          The JSON actions to be executed on inbound phone calls when the Assistant has to say something first.\n * @param {object} [opts.styleSheet] -\n *          The JSON object that holds the style sheet for the assistant\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'LogQueries': serialize.bool(_.get(opts, 'logQueries')),\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'CallbackUrl': _.get(opts, 'callbackUrl'),\n    'CallbackEvents': _.get(opts, 'callbackEvents'),\n    'FallbackActions': serialize.object(_.get(opts, 'fallbackActions')),\n    'InitiationActions': serialize.object(_.get(opts, 'initiationActions')),\n    'StyleSheet': serialize.object(_.get(opts, 'styleSheet'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssistantInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AssistantInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Understand.AssistantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssistantInstance\n */\n/* jshint ignore:end */\nAssistantContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AssistantContext.prototype,\n  'fieldTypes', {\n    get: function() {\n      if (!this._fieldTypes) {\n        this._fieldTypes = new FieldTypeList(this._version, this._solution.sid);\n      }\n      return this._fieldTypes;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'tasks', {\n    get: function() {\n      if (!this._tasks) {\n        this._tasks = new TaskList(this._version, this._solution.sid);\n      }\n      return this._tasks;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'modelBuilds', {\n    get: function() {\n      if (!this._modelBuilds) {\n        this._modelBuilds = new ModelBuildList(this._version, this._solution.sid);\n      }\n      return this._modelBuilds;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'queries', {\n    get: function() {\n      if (!this._queries) {\n        this._queries = new QueryList(this._version, this._solution.sid);\n      }\n      return this._queries;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'assistantFallbackActions', {\n    get: function() {\n      if (!this._assistantFallbackActions) {\n        this._assistantFallbackActions = new AssistantFallbackActionsList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._assistantFallbackActions;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'assistantInitiationActions', {\n    get: function() {\n      if (!this._assistantInitiationActions) {\n        this._assistantInitiationActions = new AssistantInitiationActionsList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._assistantInitiationActions;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'dialogues', {\n    get: function() {\n      if (!this._dialogues) {\n        this._dialogues = new DialogueList(this._version, this._solution.sid);\n      }\n      return this._dialogues;\n    }\n});\n\nObject.defineProperty(AssistantContext.prototype,\n  'styleSheet', {\n    get: function() {\n      if (!this._styleSheet) {\n        this._styleSheet = new StyleSheetList(this._version, this._solution.sid);\n      }\n      return this._styleSheet;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Understand.AssistantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssistantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAssistantContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AssistantList: AssistantList,\n  AssistantPage: AssistantPage,\n  AssistantInstance: AssistantInstance,\n  AssistantContext: AssistantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar AssistantList = require('./understand/assistant').AssistantList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the Understand version of Preview\n *\n * @constructor Twilio.Preview.Understand\n *\n * @property {Twilio.Preview.Understand.AssistantList} assistants -\n *          assistants resource\n *\n * @param {Twilio.Preview} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction Understand(domain) {\n  Version.prototype.constructor.call(this, domain, 'understand');\n\n  // Resources\n  this._assistants = undefined;\n}\n\n_.extend(Understand.prototype, Version.prototype);\nUnderstand.prototype.constructor = Understand;\n\nObject.defineProperty(Understand.prototype,\n  'assistants', {\n    get: function() {\n      this._assistants = this._assistants || new AssistantList(this);\n      return this._assistants;\n    }\n});\n\nmodule.exports = Understand;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CommandList;\nvar CommandPage;\nvar CommandInstance;\nvar CommandContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CommandList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.CommandList\n *\n * @param {Twilio.Preview.Wireless} version - Version of the resource\n */\n/* jshint ignore:end */\nCommandList = function CommandList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function commands\n   * @memberof Twilio.Preview.Wireless#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Wireless.CommandContext}\n   */\n  /* jshint ignore:end */\n  function CommandListInstance(sid) {\n    return CommandListInstance.get(sid);\n  }\n\n  CommandListInstance._version = version;\n  // Path Solution\n  CommandListInstance._solution = {};\n  CommandListInstance._uri = `/Commands`;\n  /* jshint ignore:start */\n  /**\n   * Streams CommandInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Wireless.CommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.device] - The device\n   * @param {string} [opts.sim] - The sim\n   * @param {string} [opts.status] - The status\n   * @param {string} [opts.direction] - The direction\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CommandListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CommandInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Wireless.CommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.device] - The device\n   * @param {string} [opts.sim] - The sim\n   * @param {string} [opts.status] - The status\n   * @param {string} [opts.direction] - The direction\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CommandListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CommandInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Wireless.CommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.device] - The device\n   * @param {string} [opts.sim] - The sim\n   * @param {string} [opts.status] - The status\n   * @param {string} [opts.direction] - The direction\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CommandListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Device': _.get(opts, 'device'),\n      'Sim': _.get(opts, 'sim'),\n      'Status': _.get(opts, 'status'),\n      'Direction': _.get(opts, 'direction'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CommandPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CommandInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Wireless.CommandList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CommandListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CommandPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CommandInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Wireless.CommandList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.command - The command\n   * @param {string} [opts.device] - The device\n   * @param {string} [opts.sim] - The sim\n   * @param {string} [opts.callbackMethod] - The callback_method\n   * @param {string} [opts.callbackUrl] - The callback_url\n   * @param {string} [opts.commandMode] - The command_mode\n   * @param {string} [opts.includeSid] - The include_sid\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CommandInstance\n   */\n  /* jshint ignore:end */\n  CommandListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['command'])) {\n      throw new Error('Required parameter \"opts[\\'command\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Command': _.get(opts, 'command'),\n      'Device': _.get(opts, 'device'),\n      'Sim': _.get(opts, 'sim'),\n      'CallbackMethod': _.get(opts, 'callbackMethod'),\n      'CallbackUrl': _.get(opts, 'callbackUrl'),\n      'CommandMode': _.get(opts, 'commandMode'),\n      'IncludeSid': _.get(opts, 'includeSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CommandInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a command\n   *\n   * @function get\n   * @memberof Twilio.Preview.Wireless.CommandList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Wireless.CommandContext}\n   */\n  /* jshint ignore:end */\n  CommandListInstance.get = function get(sid) {\n    return new CommandContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Wireless.CommandList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CommandListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CommandListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CommandListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CommandPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.CommandPage\n *\n * @param {Wireless} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CommandSolution} solution - Path solution\n *\n * @returns CommandPage\n */\n/* jshint ignore:end */\nCommandPage = function CommandPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CommandPage.prototype, Page.prototype);\nCommandPage.prototype.constructor = CommandPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CommandInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Wireless.CommandPage#\n *\n * @param {CommandPayload} payload - Payload response from the API\n *\n * @returns CommandInstance\n */\n/* jshint ignore:end */\nCommandPage.prototype.getInstance = function getInstance(payload) {\n  return new CommandInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.CommandPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCommandPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCommandPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CommandContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.CommandInstance\n *\n * @property {string} sid - The sid\n * @property {string} accountSid - The account_sid\n * @property {string} deviceSid - The device_sid\n * @property {string} simSid - The sim_sid\n * @property {string} command - The command\n * @property {string} commandMode - The command_mode\n * @property {string} status - The status\n * @property {string} direction - The direction\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} url - The url\n *\n * @param {Wireless} version - Version of the resource\n * @param {CommandPayload} payload - The instance payload\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nCommandInstance = function CommandInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.deviceSid = payload.device_sid; // jshint ignore:line\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.command = payload.command; // jshint ignore:line\n  this.commandMode = payload.command_mode; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.direction = payload.direction; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CommandInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CommandContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CommandInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Wireless.CommandInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CommandInstance\n */\n/* jshint ignore:end */\nCommandInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.CommandInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCommandInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCommandInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CommandContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.CommandContext\n *\n * @param {Wireless} version - Version of the resource\n * @param {sid} sid - The sid\n */\n/* jshint ignore:end */\nCommandContext = function CommandContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Commands/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CommandInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Wireless.CommandContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CommandInstance\n */\n/* jshint ignore:end */\nCommandContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CommandInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.CommandContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCommandContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCommandContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CommandList: CommandList,\n  CommandPage: CommandPage,\n  CommandInstance: CommandInstance,\n  CommandContext: CommandContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar RatePlanList;\nvar RatePlanPage;\nvar RatePlanInstance;\nvar RatePlanContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RatePlanList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.RatePlanList\n *\n * @param {Twilio.Preview.Wireless} version - Version of the resource\n */\n/* jshint ignore:end */\nRatePlanList = function RatePlanList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function ratePlans\n   * @memberof Twilio.Preview.Wireless#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Wireless.RatePlanContext}\n   */\n  /* jshint ignore:end */\n  function RatePlanListInstance(sid) {\n    return RatePlanListInstance.get(sid);\n  }\n\n  RatePlanListInstance._version = version;\n  // Path Solution\n  RatePlanListInstance._solution = {};\n  RatePlanListInstance._uri = `/RatePlans`;\n  /* jshint ignore:start */\n  /**\n   * Streams RatePlanInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Wireless.RatePlanList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RatePlanInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Wireless.RatePlanList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RatePlanInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Wireless.RatePlanList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RatePlanPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RatePlanInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Wireless.RatePlanList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RatePlanPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a RatePlanInstance\n   *\n   * @function create\n   * @memberof Twilio.Preview.Wireless.RatePlanList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] - The unique_name\n   * @param {string} [opts.friendlyName] - The friendly_name\n   * @param {boolean} [opts.dataEnabled] - The data_enabled\n   * @param {number} [opts.dataLimit] - The data_limit\n   * @param {string} [opts.dataMetering] - The data_metering\n   * @param {boolean} [opts.messagingEnabled] - The messaging_enabled\n   * @param {boolean} [opts.voiceEnabled] - The voice_enabled\n   * @param {boolean} [opts.commandsEnabled] - The commands_enabled\n   * @param {boolean} [opts.nationalRoamingEnabled] - The national_roaming_enabled\n   * @param {string|list} [opts.internationalRoaming] - The international_roaming\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RatePlanInstance\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'DataEnabled': serialize.bool(_.get(opts, 'dataEnabled')),\n      'DataLimit': _.get(opts, 'dataLimit'),\n      'DataMetering': _.get(opts, 'dataMetering'),\n      'MessagingEnabled': serialize.bool(_.get(opts, 'messagingEnabled')),\n      'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')),\n      'CommandsEnabled': serialize.bool(_.get(opts, 'commandsEnabled')),\n      'NationalRoamingEnabled': serialize.bool(_.get(opts, 'nationalRoamingEnabled')),\n      'InternationalRoaming': serialize.map(_.get(opts, 'internationalRoaming'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RatePlanInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a rate_plan\n   *\n   * @function get\n   * @memberof Twilio.Preview.Wireless.RatePlanList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Wireless.RatePlanContext}\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.get = function get(sid) {\n    return new RatePlanContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Wireless.RatePlanList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RatePlanListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RatePlanListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RatePlanPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.RatePlanPage\n *\n * @param {Wireless} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RatePlanSolution} solution - Path solution\n *\n * @returns RatePlanPage\n */\n/* jshint ignore:end */\nRatePlanPage = function RatePlanPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RatePlanPage.prototype, Page.prototype);\nRatePlanPage.prototype.constructor = RatePlanPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RatePlanInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Wireless.RatePlanPage#\n *\n * @param {RatePlanPayload} payload - Payload response from the API\n *\n * @returns RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanPage.prototype.getInstance = function getInstance(payload) {\n  return new RatePlanInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.RatePlanPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRatePlanPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRatePlanPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RatePlanContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.RatePlanInstance\n *\n * @property {string} sid - The sid\n * @property {string} uniqueName - The unique_name\n * @property {string} accountSid - The account_sid\n * @property {string} friendlyName - The friendly_name\n * @property {boolean} dataEnabled - The data_enabled\n * @property {string} dataMetering - The data_metering\n * @property {number} dataLimit - The data_limit\n * @property {boolean} messagingEnabled - The messaging_enabled\n * @property {boolean} voiceEnabled - The voice_enabled\n * @property {boolean} nationalRoamingEnabled - The national_roaming_enabled\n * @property {string} internationalRoaming - The international_roaming\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} url - The url\n *\n * @param {Wireless} version - Version of the resource\n * @param {RatePlanPayload} payload - The instance payload\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nRatePlanInstance = function RatePlanInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dataEnabled = payload.data_enabled; // jshint ignore:line\n  this.dataMetering = payload.data_metering; // jshint ignore:line\n  this.dataLimit = deserialize.integer(payload.data_limit); // jshint ignore:line\n  this.messagingEnabled = payload.messaging_enabled; // jshint ignore:line\n  this.voiceEnabled = payload.voice_enabled; // jshint ignore:line\n  this.nationalRoamingEnabled = payload.national_roaming_enabled; // jshint ignore:line\n  this.internationalRoaming = payload.international_roaming; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(RatePlanInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RatePlanContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RatePlanInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Wireless.RatePlanInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a RatePlanInstance\n *\n * @function update\n * @memberof Twilio.Preview.Wireless.RatePlanInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] - The unique_name\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RatePlanInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Wireless.RatePlanInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.RatePlanInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRatePlanInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRatePlanInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RatePlanContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.RatePlanContext\n *\n * @param {Wireless} version - Version of the resource\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nRatePlanContext = function RatePlanContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/RatePlans/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RatePlanInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Wireless.RatePlanContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RatePlanInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a RatePlanInstance\n *\n * @function update\n * @memberof Twilio.Preview.Wireless.RatePlanContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] - The unique_name\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'FriendlyName': _.get(opts, 'friendlyName')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RatePlanInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RatePlanInstance\n *\n * @function remove\n * @memberof Twilio.Preview.Wireless.RatePlanContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.RatePlanContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRatePlanContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRatePlanContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RatePlanList: RatePlanList,\n  RatePlanPage: RatePlanPage,\n  RatePlanInstance: RatePlanInstance,\n  RatePlanContext: RatePlanContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UsageList;\nvar UsagePage;\nvar UsageInstance;\nvar UsageContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.SimContext.UsageList\n *\n * @param {Twilio.Preview.Wireless} version - Version of the resource\n * @param {string} simSid - The sim_sid\n */\n/* jshint ignore:end */\nUsageList = function UsageList(version, simSid) {\n  /* jshint ignore:start */\n  /**\n   * @function usage\n   * @memberof Twilio.Preview.Wireless.SimContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Wireless.SimContext.UsageContext}\n   */\n  /* jshint ignore:end */\n  function UsageListInstance(sid) {\n    return UsageListInstance.get(sid);\n  }\n\n  UsageListInstance._version = version;\n  // Path Solution\n  UsageListInstance._solution = {simSid: simSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a usage\n   *\n   * @function get\n   * @memberof Twilio.Preview.Wireless.SimContext.UsageList#\n   *\n   * @returns {Twilio.Preview.Wireless.SimContext.UsageContext}\n   */\n  /* jshint ignore:end */\n  UsageListInstance.get = function get() {\n    return new UsageContext(this._version, this._solution.simSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Wireless.SimContext.UsageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UsageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UsageListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UsageListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsagePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.SimContext.UsagePage\n *\n * @param {Wireless} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UsageSolution} solution - Path solution\n *\n * @returns UsagePage\n */\n/* jshint ignore:end */\nUsagePage = function UsagePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UsagePage.prototype, Page.prototype);\nUsagePage.prototype.constructor = UsagePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UsageInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Wireless.SimContext.UsagePage#\n *\n * @param {UsagePayload} payload - Payload response from the API\n *\n * @returns UsageInstance\n */\n/* jshint ignore:end */\nUsagePage.prototype.getInstance = function getInstance(payload) {\n  return new UsageInstance(this._version, payload, this._solution.simSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.SimContext.UsagePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsagePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsagePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.SimContext.UsageInstance\n *\n * @property {string} simSid - The sim_sid\n * @property {string} simUniqueName - The sim_unique_name\n * @property {string} accountSid - The account_sid\n * @property {object} period - The period\n * @property {object} commandsUsage - The commands_usage\n * @property {object} commandsCosts - The commands_costs\n * @property {object} dataUsage - The data_usage\n * @property {object} dataCosts - The data_costs\n * @property {string} url - The url\n *\n * @param {Wireless} version - Version of the resource\n * @param {UsagePayload} payload - The instance payload\n * @param {sid} simSid - The sim_sid\n */\n/* jshint ignore:end */\nUsageInstance = function UsageInstance(version, payload, simSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.simUniqueName = payload.sim_unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.period = payload.period; // jshint ignore:line\n  this.commandsUsage = payload.commands_usage; // jshint ignore:line\n  this.commandsCosts = payload.commands_costs; // jshint ignore:line\n  this.dataUsage = payload.data_usage; // jshint ignore:line\n  this.dataCosts = payload.data_costs; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {simSid: simSid, };\n};\n\nObject.defineProperty(UsageInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new UsageContext(this._version, this._solution.simSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a UsageInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Wireless.SimContext.UsageInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.end] - The end\n * @param {string} [opts.start] - The start\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UsageInstance\n */\n/* jshint ignore:end */\nUsageInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.SimContext.UsageInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsageInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsageInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.SimContext.UsageContext\n *\n * @param {Wireless} version - Version of the resource\n * @param {sid_like} simSid - The sim_sid\n */\n/* jshint ignore:end */\nUsageContext = function UsageContext(version, simSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {simSid: simSid, };\n  this._uri = `/Sims/${simSid}/Usage`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a UsageInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Wireless.SimContext.UsageContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.end] - The end\n * @param {string} [opts.start] - The start\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed UsageInstance\n */\n/* jshint ignore:end */\nUsageContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'End': _.get(opts, 'end'), 'Start': _.get(opts, 'start')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new UsageInstance(this._version, payload, this._solution.simSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.SimContext.UsageContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsageContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nUsageContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UsageList: UsageList,\n  UsagePage: UsagePage,\n  UsageInstance: UsageInstance,\n  UsageContext: UsageContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar UsageList = require('./sim/usage').UsageList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SimList;\nvar SimPage;\nvar SimInstance;\nvar SimContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SimList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.SimList\n *\n * @param {Twilio.Preview.Wireless} version - Version of the resource\n */\n/* jshint ignore:end */\nSimList = function SimList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function sims\n   * @memberof Twilio.Preview.Wireless#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Preview.Wireless.SimContext}\n   */\n  /* jshint ignore:end */\n  function SimListInstance(sid) {\n    return SimListInstance.get(sid);\n  }\n\n  SimListInstance._version = version;\n  // Path Solution\n  SimListInstance._solution = {};\n  SimListInstance._uri = `/Sims`;\n  /* jshint ignore:start */\n  /**\n   * Streams SimInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Preview.Wireless.SimList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.status] - The status\n   * @param {string} [opts.iccid] - The iccid\n   * @param {string} [opts.ratePlan] - The rate_plan\n   * @param {string} [opts.eId] - The e_id\n   * @param {string} [opts.simRegistrationCode] - The sim_registration_code\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SimListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SimInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Preview.Wireless.SimList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.status] - The status\n   * @param {string} [opts.iccid] - The iccid\n   * @param {string} [opts.ratePlan] - The rate_plan\n   * @param {string} [opts.eId] - The e_id\n   * @param {string} [opts.simRegistrationCode] - The sim_registration_code\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SimListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SimInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Preview.Wireless.SimList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.status] - The status\n   * @param {string} [opts.iccid] - The iccid\n   * @param {string} [opts.ratePlan] - The rate_plan\n   * @param {string} [opts.eId] - The e_id\n   * @param {string} [opts.simRegistrationCode] - The sim_registration_code\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SimListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'Iccid': _.get(opts, 'iccid'),\n      'RatePlan': _.get(opts, 'ratePlan'),\n      'EId': _.get(opts, 'eId'),\n      'SimRegistrationCode': _.get(opts, 'simRegistrationCode'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SimPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SimInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Preview.Wireless.SimList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SimListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SimPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sim\n   *\n   * @function get\n   * @memberof Twilio.Preview.Wireless.SimList#\n   *\n   * @param {string} sid - The sid\n   *\n   * @returns {Twilio.Preview.Wireless.SimContext}\n   */\n  /* jshint ignore:end */\n  SimListInstance.get = function get(sid) {\n    return new SimContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Preview.Wireless.SimList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SimListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SimListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SimListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SimPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.SimPage\n *\n * @param {Wireless} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SimSolution} solution - Path solution\n *\n * @returns SimPage\n */\n/* jshint ignore:end */\nSimPage = function SimPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SimPage.prototype, Page.prototype);\nSimPage.prototype.constructor = SimPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SimInstance\n *\n * @function getInstance\n * @memberof Twilio.Preview.Wireless.SimPage#\n *\n * @param {SimPayload} payload - Payload response from the API\n *\n * @returns SimInstance\n */\n/* jshint ignore:end */\nSimPage.prototype.getInstance = function getInstance(payload) {\n  return new SimInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.SimPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSimPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSimPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SimContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.SimInstance\n *\n * @property {string} sid - The sid\n * @property {string} uniqueName - The unique_name\n * @property {string} accountSid - The account_sid\n * @property {string} ratePlanSid - The rate_plan_sid\n * @property {string} friendlyName - The friendly_name\n * @property {string} iccid - The iccid\n * @property {string} eId - The e_id\n * @property {string} status - The status\n * @property {string} commandsCallbackUrl - The commands_callback_url\n * @property {string} commandsCallbackMethod - The commands_callback_method\n * @property {string} smsFallbackMethod - The sms_fallback_method\n * @property {string} smsFallbackUrl - The sms_fallback_url\n * @property {string} smsMethod - The sms_method\n * @property {string} smsUrl - The sms_url\n * @property {string} voiceFallbackMethod - The voice_fallback_method\n * @property {string} voiceFallbackUrl - The voice_fallback_url\n * @property {string} voiceMethod - The voice_method\n * @property {string} voiceUrl - The voice_url\n * @property {Date} dateCreated - The date_created\n * @property {Date} dateUpdated - The date_updated\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {Wireless} version - Version of the resource\n * @param {SimPayload} payload - The instance payload\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nSimInstance = function SimInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.ratePlanSid = payload.rate_plan_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.iccid = payload.iccid; // jshint ignore:line\n  this.eId = payload.e_id; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.commandsCallbackUrl = payload.commands_callback_url; // jshint ignore:line\n  this.commandsCallbackMethod = payload.commands_callback_method; // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SimInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SimContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SimInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Wireless.SimInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SimInstance\n *\n * @function update\n * @memberof Twilio.Preview.Wireless.SimInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] - The unique_name\n * @param {string} [opts.callbackMethod] - The callback_method\n * @param {string} [opts.callbackUrl] - The callback_url\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.ratePlan] - The rate_plan\n * @param {string} [opts.status] - The status\n * @param {string} [opts.commandsCallbackMethod] - The commands_callback_method\n * @param {string} [opts.commandsCallbackUrl] - The commands_callback_url\n * @param {string} [opts.smsFallbackMethod] - The sms_fallback_method\n * @param {string} [opts.smsFallbackUrl] - The sms_fallback_url\n * @param {string} [opts.smsMethod] - The sms_method\n * @param {string} [opts.smsUrl] - The sms_url\n * @param {string} [opts.voiceFallbackMethod] - The voice_fallback_method\n * @param {string} [opts.voiceFallbackUrl] - The voice_fallback_url\n * @param {string} [opts.voiceMethod] - The voice_method\n * @param {string} [opts.voiceUrl] - The voice_url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the usage\n *\n * @function usage\n * @memberof Twilio.Preview.Wireless.SimInstance#\n *\n * @returns {Twilio.Preview.Wireless.SimContext.UsageList}\n */\n/* jshint ignore:end */\nSimInstance.prototype.usage = function usage() {\n  return this._proxy.usage;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.SimInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSimInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSimInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SimContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Preview.Wireless.SimContext\n *\n * @property {Twilio.Preview.Wireless.SimContext.UsageList} usage - usage resource\n *\n * @param {Wireless} version - Version of the resource\n * @param {sid_like} sid - The sid\n */\n/* jshint ignore:end */\nSimContext = function SimContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Sims/${sid}`;\n\n  // Dependents\n  this._usage = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SimInstance\n *\n * @function fetch\n * @memberof Twilio.Preview.Wireless.SimContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SimInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SimInstance\n *\n * @function update\n * @memberof Twilio.Preview.Wireless.SimContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] - The unique_name\n * @param {string} [opts.callbackMethod] - The callback_method\n * @param {string} [opts.callbackUrl] - The callback_url\n * @param {string} [opts.friendlyName] - The friendly_name\n * @param {string} [opts.ratePlan] - The rate_plan\n * @param {string} [opts.status] - The status\n * @param {string} [opts.commandsCallbackMethod] - The commands_callback_method\n * @param {string} [opts.commandsCallbackUrl] - The commands_callback_url\n * @param {string} [opts.smsFallbackMethod] - The sms_fallback_method\n * @param {string} [opts.smsFallbackUrl] - The sms_fallback_url\n * @param {string} [opts.smsMethod] - The sms_method\n * @param {string} [opts.smsUrl] - The sms_url\n * @param {string} [opts.voiceFallbackMethod] - The voice_fallback_method\n * @param {string} [opts.voiceFallbackUrl] - The voice_fallback_url\n * @param {string} [opts.voiceMethod] - The voice_method\n * @param {string} [opts.voiceUrl] - The voice_url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'CallbackMethod': _.get(opts, 'callbackMethod'),\n    'CallbackUrl': _.get(opts, 'callbackUrl'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'RatePlan': _.get(opts, 'ratePlan'),\n    'Status': _.get(opts, 'status'),\n    'CommandsCallbackMethod': _.get(opts, 'commandsCallbackMethod'),\n    'CommandsCallbackUrl': _.get(opts, 'commandsCallbackUrl'),\n    'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n    'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n    'SmsMethod': _.get(opts, 'smsMethod'),\n    'SmsUrl': _.get(opts, 'smsUrl'),\n    'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n    'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n    'VoiceMethod': _.get(opts, 'voiceMethod'),\n    'VoiceUrl': _.get(opts, 'voiceUrl')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SimInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SimContext.prototype,\n  'usage', {\n    get: function() {\n      if (!this._usage) {\n        this._usage = new UsageList(this._version, this._solution.sid);\n      }\n      return this._usage;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Preview.Wireless.SimContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSimContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSimContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SimList: SimList,\n  SimPage: SimPage,\n  SimInstance: SimInstance,\n  SimContext: SimContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CommandList = require('./wireless/command').CommandList;\nvar RatePlanList = require('./wireless/ratePlan').RatePlanList;\nvar SimList = require('./wireless/sim').SimList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the Wireless version of Preview\n *\n * @constructor Twilio.Preview.Wireless\n *\n * @property {Twilio.Preview.Wireless.CommandList} commands - commands resource\n * @property {Twilio.Preview.Wireless.RatePlanList} ratePlans - ratePlans resource\n * @property {Twilio.Preview.Wireless.SimList} sims - sims resource\n *\n * @param {Twilio.Preview} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction Wireless(domain) {\n  Version.prototype.constructor.call(this, domain, 'wireless');\n\n  // Resources\n  this._commands = undefined;\n  this._ratePlans = undefined;\n  this._sims = undefined;\n}\n\n_.extend(Wireless.prototype, Version.prototype);\nWireless.prototype.constructor = Wireless;\n\nObject.defineProperty(Wireless.prototype,\n  'commands', {\n    get: function() {\n      this._commands = this._commands || new CommandList(this);\n      return this._commands;\n    }\n});\n\nObject.defineProperty(Wireless.prototype,\n  'ratePlans', {\n    get: function() {\n      this._ratePlans = this._ratePlans || new RatePlanList(this);\n      return this._ratePlans;\n    }\n});\n\nObject.defineProperty(Wireless.prototype,\n  'sims', {\n    get: function() {\n      this._sims = this._sims || new SimList(this);\n      return this._sims;\n    }\n});\n\nmodule.exports = Wireless;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar BulkExports = require('./preview/BulkExports');  /* jshint ignore:line */\nvar DeployedDevices = require(\n    './preview/DeployedDevices');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar HostedNumbers = require(\n    './preview/HostedNumbers');  /* jshint ignore:line */\nvar Marketplace = require('./preview/Marketplace');  /* jshint ignore:line */\nvar Sync = require('./preview/Sync');  /* jshint ignore:line */\nvar TrustedComms = require('./preview/TrustedComms');  /* jshint ignore:line */\nvar Understand = require('./preview/Understand');  /* jshint ignore:line */\nvar Wireless = require('./preview/Wireless');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize preview domain\n *\n * @constructor Twilio.Preview\n *\n * @property {Twilio.Preview.BulkExports} bulk_exports - bulk_exports version\n * @property {Twilio.Preview.DeployedDevices} deployed_devices -\n *          deployed_devices version\n * @property {Twilio.Preview.HostedNumbers} hosted_numbers - hosted_numbers version\n * @property {Twilio.Preview.Marketplace} marketplace - marketplace version\n * @property {Twilio.Preview.Sync} sync - sync version\n * @property {Twilio.Preview.Understand} understand - understand version\n * @property {Twilio.Preview.Wireless} wireless - wireless version\n * @property {Twilio.Preview.TrustedComms} trusted_comms - trusted_comms version\n * @property {Twilio.Preview.BulkExports.ExportList} exports - exports resource\n * @property {Twilio.Preview.BulkExports.ExportConfigurationList} exportConfiguration -\n *          exportConfiguration resource\n * @property {Twilio.Preview.DeployedDevices.FleetList} fleets - fleets resource\n * @property {Twilio.Preview.HostedNumbers.AuthorizationDocumentList} authorizationDocuments -\n *          authorizationDocuments resource\n * @property {Twilio.Preview.HostedNumbers.HostedNumberOrderList} hostedNumberOrders -\n *          hostedNumberOrders resource\n * @property {Twilio.Preview.Marketplace.AvailableAddOnList} availableAddOns -\n *          availableAddOns resource\n * @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -\n *          installedAddOns resource\n * @property {Twilio.Preview.Sync.ServiceList} services - services resource\n * @property {Twilio.Preview.Understand.AssistantList} assistants -\n *          assistants resource\n * @property {Twilio.Preview.Wireless.CommandList} commands - commands resource\n * @property {Twilio.Preview.Wireless.RatePlanList} ratePlans - ratePlans resource\n * @property {Twilio.Preview.Wireless.SimList} sims - sims resource\n * @property {Twilio.Preview.TrustedComms.BrandedChannelList} brandedChannels -\n *          brandedChannels resource\n * @property {Twilio.Preview.TrustedComms.BrandsInformationList} brandsInformation -\n *          brandsInformation resource\n * @property {Twilio.Preview.TrustedComms.CpsList} cps - cps resource\n * @property {Twilio.Preview.TrustedComms.CurrentCallList} currentCalls -\n *          currentCalls resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Preview(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://preview.twilio.com');\n\n  // Versions\n  this._bulk_exports = undefined;\n  this._deployed_devices = undefined;\n  this._hosted_numbers = undefined;\n  this._marketplace = undefined;\n  this._sync = undefined;\n  this._understand = undefined;\n  this._wireless = undefined;\n  this._trusted_comms = undefined;\n}\n\n_.extend(Preview.prototype, Domain.prototype);\nPreview.prototype.constructor = Preview;\n\nObject.defineProperty(Preview.prototype,\n  'bulk_exports', {\n    get: function() {\n      this._bulk_exports = this._bulk_exports || new BulkExports(this);\n      return this._bulk_exports;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'deployed_devices', {\n    get: function() {\n      this._deployed_devices = this._deployed_devices || new DeployedDevices(this);\n      return this._deployed_devices;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'hosted_numbers', {\n    get: function() {\n      this._hosted_numbers = this._hosted_numbers || new HostedNumbers(this);\n      return this._hosted_numbers;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'marketplace', {\n    get: function() {\n      this._marketplace = this._marketplace || new Marketplace(this);\n      return this._marketplace;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'sync', {\n    get: function() {\n      this._sync = this._sync || new Sync(this);\n      return this._sync;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'understand', {\n    get: function() {\n      this._understand = this._understand || new Understand(this);\n      return this._understand;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'wireless', {\n    get: function() {\n      this._wireless = this._wireless || new Wireless(this);\n      return this._wireless;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'trusted_comms', {\n    get: function() {\n      this._trusted_comms = this._trusted_comms || new TrustedComms(this);\n      return this._trusted_comms;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'exports', {\n    get: function() {\n      return this.bulk_exports.exports;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'exportConfiguration', {\n    get: function() {\n      return this.bulk_exports.exportConfiguration;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'fleets', {\n    get: function() {\n      return this.deployed_devices.fleets;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'authorizationDocuments', {\n    get: function() {\n      return this.hosted_numbers.authorizationDocuments;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'hostedNumberOrders', {\n    get: function() {\n      return this.hosted_numbers.hostedNumberOrders;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'availableAddOns', {\n    get: function() {\n      return this.marketplace.availableAddOns;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'installedAddOns', {\n    get: function() {\n      return this.marketplace.installedAddOns;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'services', {\n    get: function() {\n      return this.sync.services;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'assistants', {\n    get: function() {\n      return this.understand.assistants;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'commands', {\n    get: function() {\n      return this.wireless.commands;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'ratePlans', {\n    get: function() {\n      return this.wireless.ratePlans;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'sims', {\n    get: function() {\n      return this.wireless.sims;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'brandedChannels', {\n    get: function() {\n      return this.trusted_comms.brandedChannels;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'brandsInformation', {\n    get: function() {\n      return this.trusted_comms.brandsInformation;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'cps', {\n    get: function() {\n      return this.trusted_comms.cps;\n    }\n});\n\nObject.defineProperty(Preview.prototype,\n  'currentCalls', {\n    get: function() {\n      return this.trusted_comms.currentCalls;\n    }\n});\n\nmodule.exports = Preview;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CountryList;\nvar CountryPage;\nvar CountryInstance;\nvar CountryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryList\n *\n * @constructor Twilio.Pricing.V1.MessagingContext.CountryList\n *\n * @param {Twilio.Pricing.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCountryList = function CountryList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function countries\n   * @memberof Twilio.Pricing.V1.MessagingContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V1.MessagingContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  function CountryListInstance(sid) {\n    return CountryListInstance.get(sid);\n  }\n\n  CountryListInstance._version = version;\n  // Path Solution\n  CountryListInstance._solution = {};\n  CountryListInstance._uri = `/Messaging/Countries`;\n  /* jshint ignore:start */\n  /**\n   * Streams CountryInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Pricing.V1.MessagingContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CountryListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CountryInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Pricing.V1.MessagingContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Pricing.V1.MessagingContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Pricing.V1.MessagingContext.CountryList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a country\n   *\n   * @function get\n   * @memberof Twilio.Pricing.V1.MessagingContext.CountryList#\n   *\n   * @param {string} isoCountry - The ISO country code\n   *\n   * @returns {Twilio.Pricing.V1.MessagingContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  CountryListInstance.get = function get(isoCountry) {\n    return new CountryContext(this._version, isoCountry);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V1.MessagingContext.CountryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CountryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CountryListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CountryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryPage\n *\n * @constructor Twilio.Pricing.V1.MessagingContext.CountryPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CountrySolution} solution - Path solution\n *\n * @returns CountryPage\n */\n/* jshint ignore:end */\nCountryPage = function CountryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CountryPage.prototype, Page.prototype);\nCountryPage.prototype.constructor = CountryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CountryInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V1.MessagingContext.CountryPage#\n *\n * @param {CountryPayload} payload - Payload response from the API\n *\n * @returns CountryInstance\n */\n/* jshint ignore:end */\nCountryPage.prototype.getInstance = function getInstance(payload) {\n  return new CountryInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.MessagingContext.CountryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V1.MessagingContext.CountryInstance\n *\n * @property {string} country - The name of the country\n * @property {string} isoCountry - The ISO country code\n * @property {string} outboundSmsPrices - The list of OutboundSMSPrice records\n * @property {string} inboundSmsPrices - The list of InboundPrice records\n * @property {string} priceUnit -\n *          The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {CountryPayload} payload - The instance payload\n * @param {iso_country_code} isoCountry - The ISO country code\n */\n/* jshint ignore:end */\nCountryInstance = function CountryInstance(version, payload, isoCountry) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.country = payload.country; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.outboundSmsPrices = payload.outbound_sms_prices; // jshint ignore:line\n  this.inboundSmsPrices = payload.inbound_sms_prices; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {isoCountry: isoCountry || this.isoCountry, };\n};\n\nObject.defineProperty(CountryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CountryContext(this._version, this._solution.isoCountry);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V1.MessagingContext.CountryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.MessagingContext.CountryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V1.MessagingContext.CountryContext\n *\n * @param {V1} version - Version of the resource\n * @param {iso_country_code} isoCountry - The ISO country code\n */\n/* jshint ignore:end */\nCountryContext = function CountryContext(version, isoCountry) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {isoCountry: isoCountry, };\n  this._uri = `/Messaging/Countries/${isoCountry}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V1.MessagingContext.CountryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CountryInstance(this._version, payload, this._solution.isoCountry));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.MessagingContext.CountryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCountryContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CountryList: CountryList,\n  CountryPage: CountryPage,\n  CountryInstance: CountryInstance,\n  CountryContext: CountryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CountryList = require('./messaging/country').CountryList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\n\nvar MessagingList;\nvar MessagingPage;\nvar MessagingInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagingList\n *\n * @constructor Twilio.Pricing.V1.MessagingList\n *\n * @param {Twilio.Pricing.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nMessagingList = function MessagingList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function messaging\n   * @memberof Twilio.Pricing.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V1.MessagingContext}\n   */\n  /* jshint ignore:end */\n  function MessagingListInstance(sid) {\n    return MessagingListInstance.get(sid);\n  }\n\n  MessagingListInstance._version = version;\n  // Path Solution\n  MessagingListInstance._solution = {};\n\n  // Components\n  MessagingListInstance._countries = undefined;\n\n  Object.defineProperty(MessagingListInstance,\n    'countries', {\n      get: function countries() {\n        if (!this._countries) {\n          this._countries = new CountryList(this._version);\n        }\n\n        return this._countries;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V1.MessagingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessagingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessagingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessagingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagingPage\n *\n * @constructor Twilio.Pricing.V1.MessagingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessagingSolution} solution - Path solution\n *\n * @returns MessagingPage\n */\n/* jshint ignore:end */\nMessagingPage = function MessagingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessagingPage.prototype, Page.prototype);\nMessagingPage.prototype.constructor = MessagingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessagingInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V1.MessagingPage#\n *\n * @param {MessagingPayload} payload - Payload response from the API\n *\n * @returns MessagingInstance\n */\n/* jshint ignore:end */\nMessagingPage.prototype.getInstance = function getInstance(payload) {\n  return new MessagingInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.MessagingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagingPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagingContext\n *\n * @constructor Twilio.Pricing.V1.MessagingInstance\n *\n * @property {string} name - The name\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {MessagingPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nMessagingInstance = function MessagingInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.name = payload.name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.MessagingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessagingList: MessagingList,\n  MessagingPage: MessagingPage,\n  MessagingInstance: MessagingInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CountryList;\nvar CountryPage;\nvar CountryInstance;\nvar CountryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryList\n *\n * @constructor Twilio.Pricing.V1.PhoneNumberContext.CountryList\n *\n * @param {Twilio.Pricing.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCountryList = function CountryList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function countries\n   * @memberof Twilio.Pricing.V1.PhoneNumberContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V1.PhoneNumberContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  function CountryListInstance(sid) {\n    return CountryListInstance.get(sid);\n  }\n\n  CountryListInstance._version = version;\n  // Path Solution\n  CountryListInstance._solution = {};\n  CountryListInstance._uri = `/PhoneNumbers/Countries`;\n  /* jshint ignore:start */\n  /**\n   * Streams CountryInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CountryListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CountryInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a country\n   *\n   * @function get\n   * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryList#\n   *\n   * @param {string} isoCountry - The ISO country code\n   *\n   * @returns {Twilio.Pricing.V1.PhoneNumberContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  CountryListInstance.get = function get(isoCountry) {\n    return new CountryContext(this._version, isoCountry);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CountryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CountryListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CountryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryPage\n *\n * @constructor Twilio.Pricing.V1.PhoneNumberContext.CountryPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CountrySolution} solution - Path solution\n *\n * @returns CountryPage\n */\n/* jshint ignore:end */\nCountryPage = function CountryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CountryPage.prototype, Page.prototype);\nCountryPage.prototype.constructor = CountryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CountryInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryPage#\n *\n * @param {CountryPayload} payload - Payload response from the API\n *\n * @returns CountryInstance\n */\n/* jshint ignore:end */\nCountryPage.prototype.getInstance = function getInstance(payload) {\n  return new CountryInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V1.PhoneNumberContext.CountryInstance\n *\n * @property {string} country - The name of the country\n * @property {string} isoCountry - The ISO country code\n * @property {string} phoneNumberPrices - The list of PhoneNumberPrices records\n * @property {string} priceUnit -\n *          The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {CountryPayload} payload - The instance payload\n * @param {iso_country_code} isoCountry - The ISO country code\n */\n/* jshint ignore:end */\nCountryInstance = function CountryInstance(version, payload, isoCountry) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.country = payload.country; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.phoneNumberPrices = payload.phone_number_prices; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {isoCountry: isoCountry || this.isoCountry, };\n};\n\nObject.defineProperty(CountryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CountryContext(this._version, this._solution.isoCountry);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V1.PhoneNumberContext.CountryContext\n *\n * @param {V1} version - Version of the resource\n * @param {iso_country_code} isoCountry - The ISO country code\n */\n/* jshint ignore:end */\nCountryContext = function CountryContext(version, isoCountry) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {isoCountry: isoCountry, };\n  this._uri = `/PhoneNumbers/Countries/${isoCountry}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CountryInstance(this._version, payload, this._solution.isoCountry));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.PhoneNumberContext.CountryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCountryContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CountryList: CountryList,\n  CountryPage: CountryPage,\n  CountryInstance: CountryInstance,\n  CountryContext: CountryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CountryList = require('./phoneNumber/country').CountryList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\n\nvar PhoneNumberList;\nvar PhoneNumberPage;\nvar PhoneNumberInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberList\n *\n * @constructor Twilio.Pricing.V1.PhoneNumberList\n *\n * @param {Twilio.Pricing.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nPhoneNumberList = function PhoneNumberList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function phoneNumbers\n   * @memberof Twilio.Pricing.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V1.PhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  function PhoneNumberListInstance(sid) {\n    return PhoneNumberListInstance.get(sid);\n  }\n\n  PhoneNumberListInstance._version = version;\n  // Path Solution\n  PhoneNumberListInstance._solution = {};\n\n  // Components\n  PhoneNumberListInstance._countries = undefined;\n\n  Object.defineProperty(PhoneNumberListInstance,\n    'countries', {\n      get: function countries() {\n        if (!this._countries) {\n          this._countries = new CountryList(this._version);\n        }\n\n        return this._countries;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V1.PhoneNumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PhoneNumberListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PhoneNumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberPage\n *\n * @constructor Twilio.Pricing.V1.PhoneNumberPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PhoneNumberSolution} solution - Path solution\n *\n * @returns PhoneNumberPage\n */\n/* jshint ignore:end */\nPhoneNumberPage = function PhoneNumberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PhoneNumberPage.prototype, Page.prototype);\nPhoneNumberPage.prototype.constructor = PhoneNumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PhoneNumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V1.PhoneNumberPage#\n *\n * @param {PhoneNumberPayload} payload - Payload response from the API\n *\n * @returns PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new PhoneNumberInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.PhoneNumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberContext\n *\n * @constructor Twilio.Pricing.V1.PhoneNumberInstance\n *\n * @property {string} name - The name\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {PhoneNumberPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nPhoneNumberInstance = function PhoneNumberInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.name = payload.name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.PhoneNumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PhoneNumberList: PhoneNumberList,\n  PhoneNumberPage: PhoneNumberPage,\n  PhoneNumberInstance: PhoneNumberInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CountryList;\nvar CountryPage;\nvar CountryInstance;\nvar CountryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryList\n *\n * @constructor Twilio.Pricing.V1.VoiceContext.CountryList\n *\n * @param {Twilio.Pricing.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCountryList = function CountryList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function countries\n   * @memberof Twilio.Pricing.V1.VoiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V1.VoiceContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  function CountryListInstance(sid) {\n    return CountryListInstance.get(sid);\n  }\n\n  CountryListInstance._version = version;\n  // Path Solution\n  CountryListInstance._solution = {};\n  CountryListInstance._uri = `/Voice/Countries`;\n  /* jshint ignore:start */\n  /**\n   * Streams CountryInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Pricing.V1.VoiceContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CountryListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CountryInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Pricing.V1.VoiceContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Pricing.V1.VoiceContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Pricing.V1.VoiceContext.CountryList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a country\n   *\n   * @function get\n   * @memberof Twilio.Pricing.V1.VoiceContext.CountryList#\n   *\n   * @param {string} isoCountry - The ISO country code\n   *\n   * @returns {Twilio.Pricing.V1.VoiceContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  CountryListInstance.get = function get(isoCountry) {\n    return new CountryContext(this._version, isoCountry);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V1.VoiceContext.CountryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CountryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CountryListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CountryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryPage\n *\n * @constructor Twilio.Pricing.V1.VoiceContext.CountryPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CountrySolution} solution - Path solution\n *\n * @returns CountryPage\n */\n/* jshint ignore:end */\nCountryPage = function CountryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CountryPage.prototype, Page.prototype);\nCountryPage.prototype.constructor = CountryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CountryInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V1.VoiceContext.CountryPage#\n *\n * @param {CountryPayload} payload - Payload response from the API\n *\n * @returns CountryInstance\n */\n/* jshint ignore:end */\nCountryPage.prototype.getInstance = function getInstance(payload) {\n  return new CountryInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.VoiceContext.CountryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V1.VoiceContext.CountryInstance\n *\n * @property {string} country - The name of the country\n * @property {string} isoCountry - The ISO country code\n * @property {string} outboundPrefixPrices -\n *          The list of OutboundPrefixPrice records\n * @property {string} inboundCallPrices - The list of InboundCallPrice records\n * @property {string} priceUnit -\n *          The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {CountryPayload} payload - The instance payload\n * @param {iso_country_code} isoCountry - The ISO country code\n */\n/* jshint ignore:end */\nCountryInstance = function CountryInstance(version, payload, isoCountry) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.country = payload.country; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.outboundPrefixPrices = payload.outbound_prefix_prices; // jshint ignore:line\n  this.inboundCallPrices = payload.inbound_call_prices; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {isoCountry: isoCountry || this.isoCountry, };\n};\n\nObject.defineProperty(CountryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CountryContext(this._version, this._solution.isoCountry);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V1.VoiceContext.CountryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.VoiceContext.CountryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V1.VoiceContext.CountryContext\n *\n * @param {V1} version - Version of the resource\n * @param {iso_country_code} isoCountry - The ISO country code\n */\n/* jshint ignore:end */\nCountryContext = function CountryContext(version, isoCountry) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {isoCountry: isoCountry, };\n  this._uri = `/Voice/Countries/${isoCountry}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V1.VoiceContext.CountryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CountryInstance(this._version, payload, this._solution.isoCountry));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.VoiceContext.CountryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCountryContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CountryList: CountryList,\n  CountryPage: CountryPage,\n  CountryInstance: CountryInstance,\n  CountryContext: CountryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar NumberList;\nvar NumberPage;\nvar NumberInstance;\nvar NumberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberList\n *\n * @constructor Twilio.Pricing.V1.VoiceContext.NumberList\n *\n * @param {Twilio.Pricing.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nNumberList = function NumberList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function numbers\n   * @memberof Twilio.Pricing.V1.VoiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V1.VoiceContext.NumberContext}\n   */\n  /* jshint ignore:end */\n  function NumberListInstance(sid) {\n    return NumberListInstance.get(sid);\n  }\n\n  NumberListInstance._version = version;\n  // Path Solution\n  NumberListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a number\n   *\n   * @function get\n   * @memberof Twilio.Pricing.V1.VoiceContext.NumberList#\n   *\n   * @param {string} number - The phone number to fetch\n   *\n   * @returns {Twilio.Pricing.V1.VoiceContext.NumberContext}\n   */\n  /* jshint ignore:end */\n  NumberListInstance.get = function get(number) {\n    return new NumberContext(this._version, number);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V1.VoiceContext.NumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NumberListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberPage\n *\n * @constructor Twilio.Pricing.V1.VoiceContext.NumberPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NumberSolution} solution - Path solution\n *\n * @returns NumberPage\n */\n/* jshint ignore:end */\nNumberPage = function NumberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NumberPage.prototype, Page.prototype);\nNumberPage.prototype.constructor = NumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V1.VoiceContext.NumberPage#\n *\n * @param {NumberPayload} payload - Payload response from the API\n *\n * @returns NumberInstance\n */\n/* jshint ignore:end */\nNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new NumberInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.VoiceContext.NumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNumberPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberContext\n *\n * @constructor Twilio.Pricing.V1.VoiceContext.NumberInstance\n *\n * @property {string} number - The phone number\n * @property {string} country - The name of the country\n * @property {string} isoCountry - The ISO country code\n * @property {string} outboundCallPrice - The OutboundCallPrice record\n * @property {string} inboundCallPrice - The InboundCallPrice record\n * @property {string} priceUnit -\n *          The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {NumberPayload} payload - The instance payload\n * @param {phone_number} number - The phone number to fetch\n */\n/* jshint ignore:end */\nNumberInstance = function NumberInstance(version, payload, number) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.number = payload.number; // jshint ignore:line\n  this.country = payload.country; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.outboundCallPrice = payload.outbound_call_price; // jshint ignore:line\n  this.inboundCallPrice = payload.inbound_call_price; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {number: number || this.number, };\n};\n\nObject.defineProperty(NumberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new NumberContext(this._version, this._solution.number);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a NumberInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V1.VoiceContext.NumberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NumberInstance\n */\n/* jshint ignore:end */\nNumberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.VoiceContext.NumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNumberInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberContext\n *\n * @constructor Twilio.Pricing.V1.VoiceContext.NumberContext\n *\n * @param {V1} version - Version of the resource\n * @param {phone_number} number - The phone number to fetch\n */\n/* jshint ignore:end */\nNumberContext = function NumberContext(version, number) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {number: number, };\n  this._uri = `/Voice/Numbers/${number}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NumberInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V1.VoiceContext.NumberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NumberInstance\n */\n/* jshint ignore:end */\nNumberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NumberInstance(this._version, payload, this._solution.number));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.VoiceContext.NumberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNumberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nNumberContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NumberList: NumberList,\n  NumberPage: NumberPage,\n  NumberInstance: NumberInstance,\n  NumberContext: NumberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CountryList = require('./voice/country').CountryList;\nvar NumberList = require('./voice/number').NumberList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\n\nvar VoiceList;\nvar VoicePage;\nvar VoiceInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the VoiceList\n *\n * @constructor Twilio.Pricing.V1.VoiceList\n *\n * @param {Twilio.Pricing.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nVoiceList = function VoiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function voice\n   * @memberof Twilio.Pricing.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V1.VoiceContext}\n   */\n  /* jshint ignore:end */\n  function VoiceListInstance(sid) {\n    return VoiceListInstance.get(sid);\n  }\n\n  VoiceListInstance._version = version;\n  // Path Solution\n  VoiceListInstance._solution = {};\n\n  // Components\n  VoiceListInstance._numbers = undefined;\n  VoiceListInstance._countries = undefined;\n\n  Object.defineProperty(VoiceListInstance,\n    'numbers', {\n      get: function numbers() {\n        if (!this._numbers) {\n          this._numbers = new NumberList(this._version);\n        }\n\n        return this._numbers;\n      }\n  });\n\n  Object.defineProperty(VoiceListInstance,\n    'countries', {\n      get: function countries() {\n        if (!this._countries) {\n          this._countries = new CountryList(this._version);\n        }\n\n        return this._countries;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V1.VoiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  VoiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  VoiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return VoiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VoicePage\n *\n * @constructor Twilio.Pricing.V1.VoicePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {VoiceSolution} solution - Path solution\n *\n * @returns VoicePage\n */\n/* jshint ignore:end */\nVoicePage = function VoicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(VoicePage.prototype, Page.prototype);\nVoicePage.prototype.constructor = VoicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of VoiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V1.VoicePage#\n *\n * @param {VoicePayload} payload - Payload response from the API\n *\n * @returns VoiceInstance\n */\n/* jshint ignore:end */\nVoicePage.prototype.getInstance = function getInstance(payload) {\n  return new VoiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.VoicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVoicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVoicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VoiceContext\n *\n * @constructor Twilio.Pricing.V1.VoiceInstance\n *\n * @property {string} name - The name\n * @property {string} url - The url\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {VoicePayload} payload - The instance payload\n */\n/* jshint ignore:end */\nVoiceInstance = function VoiceInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.name = payload.name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V1.VoiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVoiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVoiceInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  VoiceList: VoiceList,\n  VoicePage: VoicePage,\n  VoiceInstance: VoiceInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar MessagingList = require('./v1/messaging').MessagingList;\nvar PhoneNumberList = require('./v1/phoneNumber').PhoneNumberList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\nvar VoiceList = require('./v1/voice').VoiceList;\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Pricing\n *\n * @constructor Twilio.Pricing.V1\n *\n * @property {Twilio.Pricing.V1.MessagingList} messaging - messaging resource\n * @property {Twilio.Pricing.V1.PhoneNumberList} phoneNumbers -\n *          phoneNumbers resource\n * @property {Twilio.Pricing.V1.VoiceList} voice - voice resource\n *\n * @param {Twilio.Pricing} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._messaging = undefined;\n  this._phoneNumbers = undefined;\n  this._voice = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'messaging', {\n    get: function() {\n      this._messaging = this._messaging || new MessagingList(this);\n      return this._messaging;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'phoneNumbers', {\n    get: function() {\n      this._phoneNumbers = this._phoneNumbers || new PhoneNumberList(this);\n      return this._phoneNumbers;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'voice', {\n    get: function() {\n      this._voice = this._voice || new VoiceList(this);\n      return this._voice;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CountryList;\nvar CountryPage;\nvar CountryInstance;\nvar CountryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryList\n *\n * @constructor Twilio.Pricing.V2.CountryList\n *\n * @param {Twilio.Pricing.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nCountryList = function CountryList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function countries\n   * @memberof Twilio.Pricing.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V2.CountryContext}\n   */\n  /* jshint ignore:end */\n  function CountryListInstance(sid) {\n    return CountryListInstance.get(sid);\n  }\n\n  CountryListInstance._version = version;\n  // Path Solution\n  CountryListInstance._solution = {};\n  CountryListInstance._uri = `/Trunking/Countries`;\n  /* jshint ignore:start */\n  /**\n   * Streams CountryInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Pricing.V2.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CountryListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CountryInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Pricing.V2.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Pricing.V2.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Pricing.V2.CountryList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a country\n   *\n   * @function get\n   * @memberof Twilio.Pricing.V2.CountryList#\n   *\n   * @param {string} isoCountry -\n   *          The ISO country code of the pricing information to fetch\n   *\n   * @returns {Twilio.Pricing.V2.CountryContext}\n   */\n  /* jshint ignore:end */\n  CountryListInstance.get = function get(isoCountry) {\n    return new CountryContext(this._version, isoCountry);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V2.CountryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CountryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CountryListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CountryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryPage\n *\n * @constructor Twilio.Pricing.V2.CountryPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CountrySolution} solution - Path solution\n *\n * @returns CountryPage\n */\n/* jshint ignore:end */\nCountryPage = function CountryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CountryPage.prototype, Page.prototype);\nCountryPage.prototype.constructor = CountryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CountryInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V2.CountryPage#\n *\n * @param {CountryPayload} payload - Payload response from the API\n *\n * @returns CountryInstance\n */\n/* jshint ignore:end */\nCountryPage.prototype.getInstance = function getInstance(payload) {\n  return new CountryInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.CountryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V2.CountryInstance\n *\n * @property {string} country - The name of the country\n * @property {string} isoCountry - The ISO country code\n * @property {string} terminatingPrefixPrices -\n *          The list of TerminatingPrefixPrice records\n * @property {string} originatingCallPrices -\n *          The list of OriginatingCallPrice records\n * @property {string} priceUnit -\n *          The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V2} version - Version of the resource\n * @param {CountryPayload} payload - The instance payload\n * @param {iso_country_code} isoCountry -\n *          The ISO country code of the pricing information to fetch\n */\n/* jshint ignore:end */\nCountryInstance = function CountryInstance(version, payload, isoCountry) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.country = payload.country; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.terminatingPrefixPrices = payload.terminating_prefix_prices; // jshint ignore:line\n  this.originatingCallPrices = payload.originating_call_prices; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {isoCountry: isoCountry || this.isoCountry, };\n};\n\nObject.defineProperty(CountryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CountryContext(this._version, this._solution.isoCountry);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V2.CountryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.CountryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V2.CountryContext\n *\n * @param {V2} version - Version of the resource\n * @param {iso_country_code} isoCountry -\n *          The ISO country code of the pricing information to fetch\n */\n/* jshint ignore:end */\nCountryContext = function CountryContext(version, isoCountry) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {isoCountry: isoCountry, };\n  this._uri = `/Trunking/Countries/${isoCountry}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V2.CountryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CountryInstance(this._version, payload, this._solution.isoCountry));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.CountryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCountryContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CountryList: CountryList,\n  CountryPage: CountryPage,\n  CountryInstance: CountryInstance,\n  CountryContext: CountryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar NumberList;\nvar NumberPage;\nvar NumberInstance;\nvar NumberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberList\n *\n * @constructor Twilio.Pricing.V2.NumberList\n *\n * @param {Twilio.Pricing.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nNumberList = function NumberList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function numbers\n   * @memberof Twilio.Pricing.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V2.NumberContext}\n   */\n  /* jshint ignore:end */\n  function NumberListInstance(sid) {\n    return NumberListInstance.get(sid);\n  }\n\n  NumberListInstance._version = version;\n  // Path Solution\n  NumberListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a number\n   *\n   * @function get\n   * @memberof Twilio.Pricing.V2.NumberList#\n   *\n   * @param {string} destinationNumber -\n   *          The destination number for which to fetch pricing information\n   *\n   * @returns {Twilio.Pricing.V2.NumberContext}\n   */\n  /* jshint ignore:end */\n  NumberListInstance.get = function get(destinationNumber) {\n    return new NumberContext(this._version, destinationNumber);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V2.NumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NumberListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberPage\n *\n * @constructor Twilio.Pricing.V2.NumberPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NumberSolution} solution - Path solution\n *\n * @returns NumberPage\n */\n/* jshint ignore:end */\nNumberPage = function NumberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NumberPage.prototype, Page.prototype);\nNumberPage.prototype.constructor = NumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V2.NumberPage#\n *\n * @param {NumberPayload} payload - Payload response from the API\n *\n * @returns NumberInstance\n */\n/* jshint ignore:end */\nNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new NumberInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.NumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNumberPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberContext\n *\n * @constructor Twilio.Pricing.V2.NumberInstance\n *\n * @property {string} destinationNumber -\n *          The destination phone number, in E.164 format\n * @property {string} originationNumber -\n *          The origination phone number, in E.164 format\n * @property {string} country - The name of the country\n * @property {string} isoCountry - The ISO country code\n * @property {string} terminatingPrefixPrices - The terminating_prefix_prices\n * @property {string} originatingCallPrice - The OriginatingCallPrice record\n * @property {string} priceUnit -\n *          The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V2} version - Version of the resource\n * @param {NumberPayload} payload - The instance payload\n * @param {phone_number} destinationNumber -\n *          The destination number for which to fetch pricing information\n */\n/* jshint ignore:end */\nNumberInstance = function NumberInstance(version, payload, destinationNumber) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.destinationNumber = payload.destination_number; // jshint ignore:line\n  this.originationNumber = payload.origination_number; // jshint ignore:line\n  this.country = payload.country; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.terminatingPrefixPrices = payload.terminating_prefix_prices; // jshint ignore:line\n  this.originatingCallPrice = payload.originating_call_price; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {destinationNumber: destinationNumber || this.destinationNumber, };\n};\n\nObject.defineProperty(NumberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new NumberContext(this._version, this._solution.destinationNumber);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a NumberInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V2.NumberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.originationNumber] -\n *          The origination number for which to fetch pricing information\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NumberInstance\n */\n/* jshint ignore:end */\nNumberInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.NumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNumberInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberContext\n *\n * @constructor Twilio.Pricing.V2.NumberContext\n *\n * @param {V2} version - Version of the resource\n * @param {phone_number} destinationNumber -\n *          The destination number for which to fetch pricing information\n */\n/* jshint ignore:end */\nNumberContext = function NumberContext(version, destinationNumber) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {destinationNumber: destinationNumber, };\n  this._uri = `/Trunking/Numbers/${destinationNumber}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NumberInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V2.NumberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.originationNumber] -\n *          The origination number for which to fetch pricing information\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NumberInstance\n */\n/* jshint ignore:end */\nNumberContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'OriginationNumber': _.get(opts, 'originationNumber')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NumberInstance(this._version, payload, this._solution.destinationNumber));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.NumberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNumberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nNumberContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NumberList: NumberList,\n  NumberPage: NumberPage,\n  NumberInstance: NumberInstance,\n  NumberContext: NumberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CountryList;\nvar CountryPage;\nvar CountryInstance;\nvar CountryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryList\n *\n * @constructor Twilio.Pricing.V2.VoiceContext.CountryList\n *\n * @param {Twilio.Pricing.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nCountryList = function CountryList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function countries\n   * @memberof Twilio.Pricing.V2.VoiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V2.VoiceContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  function CountryListInstance(sid) {\n    return CountryListInstance.get(sid);\n  }\n\n  CountryListInstance._version = version;\n  // Path Solution\n  CountryListInstance._solution = {};\n  CountryListInstance._uri = `/Voice/Countries`;\n  /* jshint ignore:start */\n  /**\n   * Streams CountryInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Pricing.V2.VoiceContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CountryListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CountryInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Pricing.V2.VoiceContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Pricing.V2.VoiceContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Pricing.V2.VoiceContext.CountryList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a country\n   *\n   * @function get\n   * @memberof Twilio.Pricing.V2.VoiceContext.CountryList#\n   *\n   * @param {string} isoCountry -\n   *          The ISO country code of the pricing information to fetch\n   *\n   * @returns {Twilio.Pricing.V2.VoiceContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  CountryListInstance.get = function get(isoCountry) {\n    return new CountryContext(this._version, isoCountry);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V2.VoiceContext.CountryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CountryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CountryListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CountryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryPage\n *\n * @constructor Twilio.Pricing.V2.VoiceContext.CountryPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CountrySolution} solution - Path solution\n *\n * @returns CountryPage\n */\n/* jshint ignore:end */\nCountryPage = function CountryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CountryPage.prototype, Page.prototype);\nCountryPage.prototype.constructor = CountryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CountryInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V2.VoiceContext.CountryPage#\n *\n * @param {CountryPayload} payload - Payload response from the API\n *\n * @returns CountryInstance\n */\n/* jshint ignore:end */\nCountryPage.prototype.getInstance = function getInstance(payload) {\n  return new CountryInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.VoiceContext.CountryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V2.VoiceContext.CountryInstance\n *\n * @property {string} country - The name of the country\n * @property {string} isoCountry - The ISO country code\n * @property {string} outboundPrefixPrices -\n *          The list of OutboundPrefixPriceWithOrigin records\n * @property {string} inboundCallPrices - The list of InboundCallPrice records\n * @property {string} priceUnit -\n *          The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V2} version - Version of the resource\n * @param {CountryPayload} payload - The instance payload\n * @param {iso_country_code} isoCountry -\n *          The ISO country code of the pricing information to fetch\n */\n/* jshint ignore:end */\nCountryInstance = function CountryInstance(version, payload, isoCountry) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.country = payload.country; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.outboundPrefixPrices = payload.outbound_prefix_prices; // jshint ignore:line\n  this.inboundCallPrices = payload.inbound_call_prices; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {isoCountry: isoCountry || this.isoCountry, };\n};\n\nObject.defineProperty(CountryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CountryContext(this._version, this._solution.isoCountry);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V2.VoiceContext.CountryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.VoiceContext.CountryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * @constructor Twilio.Pricing.V2.VoiceContext.CountryContext\n *\n * @param {V2} version - Version of the resource\n * @param {iso_country_code} isoCountry -\n *          The ISO country code of the pricing information to fetch\n */\n/* jshint ignore:end */\nCountryContext = function CountryContext(version, isoCountry) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {isoCountry: isoCountry, };\n  this._uri = `/Voice/Countries/${isoCountry}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V2.VoiceContext.CountryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CountryInstance(this._version, payload, this._solution.isoCountry));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.VoiceContext.CountryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCountryContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CountryList: CountryList,\n  CountryPage: CountryPage,\n  CountryInstance: CountryInstance,\n  CountryContext: CountryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar NumberList;\nvar NumberPage;\nvar NumberInstance;\nvar NumberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberList\n *\n * @constructor Twilio.Pricing.V2.VoiceContext.NumberList\n *\n * @param {Twilio.Pricing.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nNumberList = function NumberList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function numbers\n   * @memberof Twilio.Pricing.V2.VoiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V2.VoiceContext.NumberContext}\n   */\n  /* jshint ignore:end */\n  function NumberListInstance(sid) {\n    return NumberListInstance.get(sid);\n  }\n\n  NumberListInstance._version = version;\n  // Path Solution\n  NumberListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a number\n   *\n   * @function get\n   * @memberof Twilio.Pricing.V2.VoiceContext.NumberList#\n   *\n   * @param {string} destinationNumber -\n   *          The destination number for which to fetch pricing information\n   *\n   * @returns {Twilio.Pricing.V2.VoiceContext.NumberContext}\n   */\n  /* jshint ignore:end */\n  NumberListInstance.get = function get(destinationNumber) {\n    return new NumberContext(this._version, destinationNumber);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V2.VoiceContext.NumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NumberListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberPage\n *\n * @constructor Twilio.Pricing.V2.VoiceContext.NumberPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NumberSolution} solution - Path solution\n *\n * @returns NumberPage\n */\n/* jshint ignore:end */\nNumberPage = function NumberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NumberPage.prototype, Page.prototype);\nNumberPage.prototype.constructor = NumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V2.VoiceContext.NumberPage#\n *\n * @param {NumberPayload} payload - Payload response from the API\n *\n * @returns NumberInstance\n */\n/* jshint ignore:end */\nNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new NumberInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.VoiceContext.NumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNumberPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberContext\n *\n * @constructor Twilio.Pricing.V2.VoiceContext.NumberInstance\n *\n * @property {string} destinationNumber -\n *          The destination phone number, in E.164 format\n * @property {string} originationNumber -\n *          The origination phone number, in E.164 format\n * @property {string} country - The name of the country\n * @property {string} isoCountry - The ISO country code\n * @property {string} outboundCallPrices -\n *          The list of OutboundCallPriceWithOrigin records\n * @property {string} inboundCallPrice - The InboundCallPrice record\n * @property {string} priceUnit -\n *          The currency in which prices are measured, in ISO 4127 format (e.g. usd, eur, jpy)\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V2} version - Version of the resource\n * @param {NumberPayload} payload - The instance payload\n * @param {phone_number} destinationNumber -\n *          The destination number for which to fetch pricing information\n */\n/* jshint ignore:end */\nNumberInstance = function NumberInstance(version, payload, destinationNumber) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.destinationNumber = payload.destination_number; // jshint ignore:line\n  this.originationNumber = payload.origination_number; // jshint ignore:line\n  this.country = payload.country; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.outboundCallPrices = payload.outbound_call_prices; // jshint ignore:line\n  this.inboundCallPrice = payload.inbound_call_price; // jshint ignore:line\n  this.priceUnit = payload.price_unit; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {destinationNumber: destinationNumber || this.destinationNumber, };\n};\n\nObject.defineProperty(NumberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new NumberContext(this._version, this._solution.destinationNumber);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a NumberInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V2.VoiceContext.NumberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.originationNumber] -\n *          The origination number for which to fetch pricing information\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NumberInstance\n */\n/* jshint ignore:end */\nNumberInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.VoiceContext.NumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNumberInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NumberContext\n *\n * @constructor Twilio.Pricing.V2.VoiceContext.NumberContext\n *\n * @param {V2} version - Version of the resource\n * @param {phone_number} destinationNumber -\n *          The destination number for which to fetch pricing information\n */\n/* jshint ignore:end */\nNumberContext = function NumberContext(version, destinationNumber) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {destinationNumber: destinationNumber, };\n  this._uri = `/Voice/Numbers/${destinationNumber}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NumberInstance\n *\n * @function fetch\n * @memberof Twilio.Pricing.V2.VoiceContext.NumberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.originationNumber] -\n *          The origination number for which to fetch pricing information\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NumberInstance\n */\n/* jshint ignore:end */\nNumberContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'OriginationNumber': _.get(opts, 'originationNumber')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NumberInstance(this._version, payload, this._solution.destinationNumber));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.VoiceContext.NumberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNumberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nNumberContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NumberList: NumberList,\n  NumberPage: NumberPage,\n  NumberInstance: NumberInstance,\n  NumberContext: NumberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CountryList = require('./voice/country').CountryList;\nvar NumberList = require('./voice/number').NumberList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\n\nvar VoiceList;\nvar VoicePage;\nvar VoiceInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the VoiceList\n *\n * @constructor Twilio.Pricing.V2.VoiceList\n *\n * @param {Twilio.Pricing.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nVoiceList = function VoiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function voice\n   * @memberof Twilio.Pricing.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Pricing.V2.VoiceContext}\n   */\n  /* jshint ignore:end */\n  function VoiceListInstance(sid) {\n    return VoiceListInstance.get(sid);\n  }\n\n  VoiceListInstance._version = version;\n  // Path Solution\n  VoiceListInstance._solution = {};\n\n  // Components\n  VoiceListInstance._countries = undefined;\n  VoiceListInstance._numbers = undefined;\n\n  Object.defineProperty(VoiceListInstance,\n    'countries', {\n      get: function countries() {\n        if (!this._countries) {\n          this._countries = new CountryList(this._version);\n        }\n\n        return this._countries;\n      }\n  });\n\n  Object.defineProperty(VoiceListInstance,\n    'numbers', {\n      get: function numbers() {\n        if (!this._numbers) {\n          this._numbers = new NumberList(this._version);\n        }\n\n        return this._numbers;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Pricing.V2.VoiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  VoiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  VoiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return VoiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VoicePage\n *\n * @constructor Twilio.Pricing.V2.VoicePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {VoiceSolution} solution - Path solution\n *\n * @returns VoicePage\n */\n/* jshint ignore:end */\nVoicePage = function VoicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(VoicePage.prototype, Page.prototype);\nVoicePage.prototype.constructor = VoicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of VoiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Pricing.V2.VoicePage#\n *\n * @param {VoicePayload} payload - Payload response from the API\n *\n * @returns VoiceInstance\n */\n/* jshint ignore:end */\nVoicePage.prototype.getInstance = function getInstance(payload) {\n  return new VoiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.VoicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVoicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVoicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VoiceContext\n *\n * @constructor Twilio.Pricing.V2.VoiceInstance\n *\n * @property {string} name - The resource name\n * @property {string} url - The absolute URL of the resource\n * @property {string} links -\n *          The URLs of the related Countries and Numbers resources\n *\n * @param {V2} version - Version of the resource\n * @param {VoicePayload} payload - The instance payload\n */\n/* jshint ignore:end */\nVoiceInstance = function VoiceInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.name = payload.name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Pricing.V2.VoiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVoiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVoiceInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  VoiceList: VoiceList,\n  VoicePage: VoicePage,\n  VoiceInstance: VoiceInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CountryList = require('./v2/country').CountryList;\nvar NumberList = require('./v2/number').NumberList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\nvar VoiceList = require('./v2/voice').VoiceList;\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V2 version of Pricing\n *\n * @constructor Twilio.Pricing.V2\n *\n * @property {Twilio.Pricing.V2.CountryList} countries - countries resource\n * @property {Twilio.Pricing.V2.NumberList} numbers - numbers resource\n * @property {Twilio.Pricing.V2.VoiceList} voice - voice resource\n *\n * @param {Twilio.Pricing} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V2(domain) {\n  Version.prototype.constructor.call(this, domain, 'v2');\n\n  // Resources\n  this._countries = undefined;\n  this._numbers = undefined;\n  this._voice = undefined;\n}\n\n_.extend(V2.prototype, Version.prototype);\nV2.prototype.constructor = V2;\n\nObject.defineProperty(V2.prototype,\n  'countries', {\n    get: function() {\n      this._countries = this._countries || new CountryList(this);\n      return this._countries;\n    }\n});\n\nObject.defineProperty(V2.prototype,\n  'numbers', {\n    get: function() {\n      this._numbers = this._numbers || new NumberList(this);\n      return this._numbers;\n    }\n});\n\nObject.defineProperty(V2.prototype,\n  'voice', {\n    get: function() {\n      this._voice = this._voice || new VoiceList(this);\n      return this._voice;\n    }\n});\n\nmodule.exports = V2;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./pricing/V1');  /* jshint ignore:line */\nvar V2 = require('./pricing/V2');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize pricing domain\n *\n * @constructor Twilio.Pricing\n *\n * @property {Twilio.Pricing.V1} v1 - v1 version\n * @property {Twilio.Pricing.V2} v2 - v2 version\n * @property {Twilio.Pricing.V1.MessagingList} messaging - messaging resource\n * @property {Twilio.Pricing.V1.PhoneNumberList} phoneNumbers -\n *          phoneNumbers resource\n * @property {Twilio.Pricing.V2.VoiceList} voice - voice resource\n * @property {Twilio.Pricing.V2.CountryList} countries - countries resource\n * @property {Twilio.Pricing.V2.NumberList} numbers - numbers resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Pricing(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://pricing.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n  this._v2 = undefined;\n}\n\n_.extend(Pricing.prototype, Domain.prototype);\nPricing.prototype.constructor = Pricing;\n\nObject.defineProperty(Pricing.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Pricing.prototype,\n  'v2', {\n    get: function() {\n      this._v2 = this._v2 || new V2(this);\n      return this._v2;\n    }\n});\n\nObject.defineProperty(Pricing.prototype,\n  'messaging', {\n    get: function() {\n      return this.v1.messaging;\n    }\n});\n\nObject.defineProperty(Pricing.prototype,\n  'phoneNumbers', {\n    get: function() {\n      return this.v1.phoneNumbers;\n    }\n});\n\nObject.defineProperty(Pricing.prototype,\n  'voice', {\n    get: function() {\n      return this.v2.voice;\n    }\n});\n\nObject.defineProperty(Pricing.prototype,\n  'countries', {\n    get: function() {\n      return this.v2.countries;\n    }\n});\n\nObject.defineProperty(Pricing.prototype,\n  'numbers', {\n    get: function() {\n      return this.v2.numbers;\n    }\n});\n\nmodule.exports = Pricing;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar PhoneNumberList;\nvar PhoneNumberPage;\nvar PhoneNumberInstance;\nvar PhoneNumberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.PhoneNumberList\n *\n * @param {Twilio.Proxy.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the PhoneNumber resource's parent Service resource\n */\n/* jshint ignore:end */\nPhoneNumberList = function PhoneNumberList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function phoneNumbers\n   * @memberof Twilio.Proxy.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.PhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  function PhoneNumberListInstance(sid) {\n    return PhoneNumberListInstance.get(sid);\n  }\n\n  PhoneNumberListInstance._version = version;\n  // Path Solution\n  PhoneNumberListInstance._solution = {serviceSid: serviceSid};\n  PhoneNumberListInstance._uri = `/Services/${serviceSid}/PhoneNumbers`;\n  /* jshint ignore:start */\n  /**\n   * create a PhoneNumberInstance\n   *\n   * @function create\n   * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sid] - The SID of a Twilio IncomingPhoneNumber resource\n   * @param {string} [opts.phoneNumber] - The phone number in E.164 format\n   * @param {boolean} [opts.isReserved] -\n   *          Whether the new phone number should be reserved\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed PhoneNumberInstance\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Sid': _.get(opts, 'sid'),\n      'PhoneNumber': _.get(opts, 'phoneNumber'),\n      'IsReserved': serialize.bool(_.get(opts, 'isReserved'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PhoneNumberInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams PhoneNumberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists PhoneNumberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of PhoneNumberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of PhoneNumberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a phone_number\n   *\n   * @function get\n   * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.PhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.get = function get(sid) {\n    return new PhoneNumberContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PhoneNumberListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PhoneNumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.PhoneNumberPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PhoneNumberSolution} solution - Path solution\n *\n * @returns PhoneNumberPage\n */\n/* jshint ignore:end */\nPhoneNumberPage = function PhoneNumberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PhoneNumberPage.prototype, Page.prototype);\nPhoneNumberPage.prototype.constructor = PhoneNumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PhoneNumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberPage#\n *\n * @param {PhoneNumberPayload} payload - Payload response from the API\n *\n * @returns PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new PhoneNumberInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.PhoneNumberInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the PhoneNumber resource's parent Service resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} isoCountry - The ISO Country Code\n * @property {PhoneNumberCapabilities} capabilities -\n *          The capabilities of the phone number\n * @property {string} url - The absolute URL of the PhoneNumber resource\n * @property {boolean} isReserved -\n *          Reserve the phone number for manual assignment to participants only\n * @property {number} inUse - The number of open session assigned to the number.\n *\n * @param {V1} version - Version of the resource\n * @param {PhoneNumberPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the PhoneNumber resource's parent Service resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nPhoneNumberInstance = function PhoneNumberInstance(version, payload, serviceSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.isReserved = payload.is_reserved; // jshint ignore:line\n  this.inUse = deserialize.integer(payload.in_use); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(PhoneNumberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PhoneNumberContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a PhoneNumberInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a PhoneNumberInstance\n *\n * @function update\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.isReserved] -\n *          Whether the new phone number should be reserved\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.PhoneNumberContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid -\n *          The SID of the parent Service resource of the PhoneNumber resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nPhoneNumberContext = function PhoneNumberContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/PhoneNumbers/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a PhoneNumberInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PhoneNumberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a PhoneNumberInstance\n *\n * @function update\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.isReserved] -\n *          Whether the new phone number should be reserved\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'IsReserved': serialize.bool(_.get(opts, 'isReserved'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PhoneNumberInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.PhoneNumberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPhoneNumberContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PhoneNumberList: PhoneNumberList,\n  PhoneNumberPage: PhoneNumberPage,\n  PhoneNumberInstance: PhoneNumberInstance,\n  PhoneNumberContext: PhoneNumberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar InteractionList;\nvar InteractionPage;\nvar InteractionInstance;\nvar InteractionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionList\n *\n * @param {Twilio.Proxy.V1} version - Version of the resource\n * @param {string} serviceSid - The SID of the resource's parent Service\n * @param {string} sessionSid - The SID of the resource's parent Session\n */\n/* jshint ignore:end */\nInteractionList = function InteractionList(version, serviceSid, sessionSid) {\n  /* jshint ignore:start */\n  /**\n   * @function interactions\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionContext}\n   */\n  /* jshint ignore:end */\n  function InteractionListInstance(sid) {\n    return InteractionListInstance.get(sid);\n  }\n\n  InteractionListInstance._version = version;\n  // Path Solution\n  InteractionListInstance._solution = {serviceSid: serviceSid, sessionSid: sessionSid};\n  InteractionListInstance._uri = `/Services/${serviceSid}/Sessions/${sessionSid}/Interactions`;\n  /* jshint ignore:start */\n  /**\n   * Streams InteractionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  InteractionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists InteractionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of InteractionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of InteractionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  InteractionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new InteractionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a interaction\n   *\n   * @function get\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionContext}\n   */\n  /* jshint ignore:end */\n  InteractionListInstance.get = function get(sid) {\n    return new InteractionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.sessionSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  InteractionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  InteractionListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return InteractionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {InteractionSolution} solution - Path solution\n *\n * @returns InteractionPage\n */\n/* jshint ignore:end */\nInteractionPage = function InteractionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(InteractionPage.prototype, Page.prototype);\nInteractionPage.prototype.constructor = InteractionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of InteractionInstance\n *\n * @function getInstance\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionPage#\n *\n * @param {InteractionPayload} payload - Payload response from the API\n *\n * @returns InteractionInstance\n */\n/* jshint ignore:end */\nInteractionPage.prototype.getInstance = function getInstance(payload) {\n  return new InteractionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.sessionSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} sessionSid - The SID of the resource's parent Session\n * @property {string} serviceSid - The SID of the resource's parent Service\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} data -\n *          A JSON string that includes the message body of message interactions\n * @property {interaction.type} type - The Type of the Interaction\n * @property {string} inboundParticipantSid -\n *          The SID of the inbound Participant resource\n * @property {string} inboundResourceSid - The SID of the inbound resource\n * @property {interaction.resource_status} inboundResourceStatus -\n *          The inbound resource status of the Interaction\n * @property {string} inboundResourceType - The inbound resource type\n * @property {string} inboundResourceUrl - The URL of the Twilio inbound resource\n * @property {string} outboundParticipantSid - The SID of the outbound Participant\n * @property {string} outboundResourceSid - The SID of the outbound resource\n * @property {interaction.resource_status} outboundResourceStatus -\n *          The outbound resource status of the Interaction\n * @property {string} outboundResourceType - The outbound resource type\n * @property {string} outboundResourceUrl - The URL of the Twilio outbound resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Interaction was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Interaction resource\n *\n * @param {V1} version - Version of the resource\n * @param {InteractionPayload} payload - The instance payload\n * @param {sid} serviceSid - The SID of the resource's parent Service\n * @param {sid} sessionSid - The SID of the resource's parent Session\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nInteractionInstance = function InteractionInstance(version, payload, serviceSid,\n                                                    sessionSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.sessionSid = payload.session_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.inboundParticipantSid = payload.inbound_participant_sid; // jshint ignore:line\n  this.inboundResourceSid = payload.inbound_resource_sid; // jshint ignore:line\n  this.inboundResourceStatus = payload.inbound_resource_status; // jshint ignore:line\n  this.inboundResourceType = payload.inbound_resource_type; // jshint ignore:line\n  this.inboundResourceUrl = payload.inbound_resource_url; // jshint ignore:line\n  this.outboundParticipantSid = payload.outbound_participant_sid; // jshint ignore:line\n  this.outboundResourceSid = payload.outbound_resource_sid; // jshint ignore:line\n  this.outboundResourceStatus = payload.outbound_resource_status; // jshint ignore:line\n  this.outboundResourceType = payload.outbound_resource_type; // jshint ignore:line\n  this.outboundResourceUrl = payload.outbound_resource_url; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sessionSid: sessionSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(InteractionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new InteractionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sessionSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a InteractionInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionInstance\n */\n/* jshint ignore:end */\nInteractionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a InteractionInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionInstance\n */\n/* jshint ignore:end */\nInteractionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nInteractionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the InteractionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the parent Service of the resource to fetch\n * @param {sid} sessionSid - he SID of the parent Session of the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nInteractionContext = function InteractionContext(version, serviceSid,\n                                                  sessionSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sessionSid: sessionSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Sessions/${sessionSid}/Interactions/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a InteractionInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionInstance\n */\n/* jshint ignore:end */\nInteractionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new InteractionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sessionSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a InteractionInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed InteractionInstance\n */\n/* jshint ignore:end */\nInteractionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nInteractionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nInteractionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  InteractionList: InteractionList,\n  InteractionPage: InteractionPage,\n  InteractionInstance: InteractionInstance,\n  InteractionContext: InteractionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar MessageInteractionList;\nvar MessageInteractionPage;\nvar MessageInteractionInstance;\nvar MessageInteractionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageInteractionList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList\n *\n * @param {Twilio.Proxy.V1} version - Version of the resource\n * @param {string} serviceSid - The SID of the resource's parent Service\n * @param {string} sessionSid - The SID of the resource's parent Session\n * @param {string} participantSid - The SID of the Participant resource\n */\n/* jshint ignore:end */\nMessageInteractionList = function MessageInteractionList(version, serviceSid,\n                                                          sessionSid,\n                                                          participantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function messageInteractions\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionContext}\n   */\n  /* jshint ignore:end */\n  function MessageInteractionListInstance(sid) {\n    return MessageInteractionListInstance.get(sid);\n  }\n\n  MessageInteractionListInstance._version = version;\n  // Path Solution\n  MessageInteractionListInstance._solution = {\n    serviceSid: serviceSid,\n    sessionSid: sessionSid,\n    participantSid: participantSid\n  };\n  MessageInteractionListInstance._uri = `/Services/${serviceSid}/Sessions/${sessionSid}/Participants/${participantSid}/MessageInteractions`;\n  /* jshint ignore:start */\n  /**\n   * create a MessageInteractionInstance\n   *\n   * @function create\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.body] - Message body\n   * @param {string|list} [opts.mediaUrl] - Reserved\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MessageInteractionInstance\n   */\n  /* jshint ignore:end */\n  MessageInteractionListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Body': _.get(opts, 'body'),\n      'MediaUrl': serialize.map(_.get(opts, 'mediaUrl'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInteractionInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sessionSid,\n        this._solution.participantSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MessageInteractionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MessageInteractionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MessageInteractionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageInteractionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MessageInteractionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageInteractionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInteractionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MessageInteractionInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessageInteractionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessageInteractionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a message_interaction\n   *\n   * @function get\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionContext}\n   */\n  /* jshint ignore:end */\n  MessageInteractionListInstance.get = function get(sid) {\n    return new MessageInteractionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.sessionSid,\n      this._solution.participantSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessageInteractionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessageInteractionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessageInteractionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageInteractionPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessageInteractionSolution} solution - Path solution\n *\n * @returns MessageInteractionPage\n */\n/* jshint ignore:end */\nMessageInteractionPage = function MessageInteractionPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessageInteractionPage.prototype, Page.prototype);\nMessageInteractionPage.prototype.constructor = MessageInteractionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessageInteractionInstance\n *\n * @function getInstance\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionPage#\n *\n * @param {MessageInteractionPayload} payload - Payload response from the API\n *\n * @returns MessageInteractionInstance\n */\n/* jshint ignore:end */\nMessageInteractionPage.prototype.getInstance = function getInstance(payload) {\n  return new MessageInteractionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.sessionSid,\n    this._solution.participantSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInteractionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessageInteractionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageInteractionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} sessionSid - The SID of the resource's parent Session\n * @property {string} serviceSid - The SID of the resource's parent Service\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} data -\n *          A JSON string that includes the message body sent to the participant\n * @property {message_interaction.type} type - The Type of Message Interaction\n * @property {string} participantSid - The SID of the Participant resource\n * @property {string} inboundParticipantSid - Always empty for Message Interactions\n * @property {string} inboundResourceSid - Always empty for Message Interactions\n * @property {message_interaction.resource_status} inboundResourceStatus -\n *          Always empty for Message Interactions\n * @property {string} inboundResourceType - Always empty for Message Interactions\n * @property {string} inboundResourceUrl - Always empty for Message Interactions\n * @property {string} outboundParticipantSid -\n *          The SID of the outbound Participant resource\n * @property {string} outboundResourceSid -\n *          The SID of the outbound Message resource\n * @property {message_interaction.resource_status} outboundResourceStatus -\n *          The outbound resource status\n * @property {string} outboundResourceType - The outbound resource type\n * @property {string} outboundResourceUrl - The URL of the Twilio message resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the MessageInteraction resource\n *\n * @param {V1} version - Version of the resource\n * @param {MessageInteractionPayload} payload - The instance payload\n * @param {sid} serviceSid - The SID of the resource's parent Service\n * @param {sid} sessionSid - The SID of the resource's parent Session\n * @param {sid} participantSid - The SID of the Participant resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nMessageInteractionInstance = function MessageInteractionInstance(version,\n    payload, serviceSid, sessionSid, participantSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.sessionSid = payload.session_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.inboundParticipantSid = payload.inbound_participant_sid; // jshint ignore:line\n  this.inboundResourceSid = payload.inbound_resource_sid; // jshint ignore:line\n  this.inboundResourceStatus = payload.inbound_resource_status; // jshint ignore:line\n  this.inboundResourceType = payload.inbound_resource_type; // jshint ignore:line\n  this.inboundResourceUrl = payload.inbound_resource_url; // jshint ignore:line\n  this.outboundParticipantSid = payload.outbound_participant_sid; // jshint ignore:line\n  this.outboundResourceSid = payload.outbound_resource_sid; // jshint ignore:line\n  this.outboundResourceStatus = payload.outbound_resource_status; // jshint ignore:line\n  this.outboundResourceType = payload.outbound_resource_type; // jshint ignore:line\n  this.outboundResourceUrl = payload.outbound_resource_url; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    serviceSid: serviceSid,\n    sessionSid: sessionSid,\n    participantSid: participantSid,\n    sid: sid || this.sid,\n  };\n};\n\nObject.defineProperty(MessageInteractionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MessageInteractionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sessionSid,\n          this._solution.participantSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInteractionInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInteractionInstance\n */\n/* jshint ignore:end */\nMessageInteractionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInteractionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessageInteractionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessageInteractionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid} sessionSid - The SID of the parent Session\n * @param {sid} participantSid - The SID of the Participant resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nMessageInteractionContext = function MessageInteractionContext(version,\n    serviceSid, sessionSid, participantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {\n    serviceSid: serviceSid,\n    sessionSid: sessionSid,\n    participantSid: participantSid,\n    sid: sid,\n  };\n  this._uri = `/Services/${serviceSid}/Sessions/${sessionSid}/Participants/${participantSid}/MessageInteractions/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessageInteractionInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessageInteractionInstance\n */\n/* jshint ignore:end */\nMessageInteractionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessageInteractionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sessionSid,\n      this._solution.participantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessageInteractionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMessageInteractionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessageInteractionList: MessageInteractionList,\n  MessageInteractionPage: MessageInteractionPage,\n  MessageInteractionInstance: MessageInteractionInstance,\n  MessageInteractionContext: MessageInteractionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar MessageInteractionList = require(\n    './participant/messageInteraction').MessageInteractionList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ParticipantList;\nvar ParticipantPage;\nvar ParticipantInstance;\nvar ParticipantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList\n *\n * @param {Twilio.Proxy.V1} version - Version of the resource\n * @param {string} serviceSid - The SID of the resource's parent Service\n * @param {string} sessionSid - The SID of the resource's parent Session\n */\n/* jshint ignore:end */\nParticipantList = function ParticipantList(version, serviceSid, sessionSid) {\n  /* jshint ignore:start */\n  /**\n   * @function participants\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  function ParticipantListInstance(sid) {\n    return ParticipantListInstance.get(sid);\n  }\n\n  ParticipantListInstance._version = version;\n  // Path Solution\n  ParticipantListInstance._solution = {serviceSid: serviceSid, sessionSid: sessionSid};\n  ParticipantListInstance._uri = `/Services/${serviceSid}/Sessions/${sessionSid}/Participants`;\n  /* jshint ignore:start */\n  /**\n   * Streams ParticipantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ParticipantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ParticipantInstance\n   *\n   * @function create\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identifier - The phone number of the Participant\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the participant\n   * @param {string} [opts.proxyIdentifier] -\n   *          The proxy phone number to use for the Participant\n   * @param {string} [opts.proxyIdentifierSid] - The Proxy Identifier Sid\n   * @param {boolean} [opts.failOnParticipantConflict] -\n   *          An experimental parameter to override the ProxyAllowParticipantConflict account flag on a per-request basis.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ParticipantInstance\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identifier'])) {\n      throw new Error('Required parameter \"opts[\\'identifier\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identifier': _.get(opts, 'identifier'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'ProxyIdentifier': _.get(opts, 'proxyIdentifier'),\n      'ProxyIdentifierSid': _.get(opts, 'proxyIdentifierSid'),\n      'FailOnParticipantConflict': serialize.bool(_.get(opts, 'failOnParticipantConflict'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sessionSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a participant\n   *\n   * @function get\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.get = function get(sid) {\n    return new ParticipantContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.sessionSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ParticipantListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ParticipantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ParticipantSolution} solution - Path solution\n *\n * @returns ParticipantPage\n */\n/* jshint ignore:end */\nParticipantPage = function ParticipantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ParticipantPage.prototype, Page.prototype);\nParticipantPage.prototype.constructor = ParticipantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ParticipantInstance\n *\n * @function getInstance\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantPage#\n *\n * @param {ParticipantPayload} payload - Payload response from the API\n *\n * @returns ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantPage.prototype.getInstance = function getInstance(payload) {\n  return new ParticipantInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.sessionSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} sessionSid - The SID of the resource's parent Session\n * @property {string} serviceSid - The SID of the resource's parent Service\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the participant\n * @property {string} identifier -\n *          The phone number or channel identifier of the Participant\n * @property {string} proxyIdentifier -\n *          The phone number or short code of the participant's partner\n * @property {string} proxyIdentifierSid -\n *          The SID of the Proxy Identifier assigned to the Participant\n * @property {Date} dateDeleted - The ISO 8601 date the Participant was removed\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Participant resource\n * @property {string} links - The URLs to resources related the participant\n *\n * @param {V1} version - Version of the resource\n * @param {ParticipantPayload} payload - The instance payload\n * @param {sid} serviceSid - The SID of the resource's parent Service\n * @param {sid} sessionSid - The SID of the resource's parent Session\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nParticipantInstance = function ParticipantInstance(version, payload, serviceSid,\n                                                    sessionSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.sessionSid = payload.session_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.identifier = payload.identifier; // jshint ignore:line\n  this.proxyIdentifier = payload.proxy_identifier; // jshint ignore:line\n  this.proxyIdentifierSid = payload.proxy_identifier_sid; // jshint ignore:line\n  this.dateDeleted = deserialize.iso8601DateTime(payload.date_deleted); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sessionSid: sessionSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ParticipantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ParticipantContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sessionSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ParticipantInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the messageInteractions\n *\n * @function messageInteractions\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantInstance#\n *\n * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList}\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.messageInteractions = function\n    messageInteractions() {\n  return this._proxy.messageInteractions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext\n *\n * @property {Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext.MessageInteractionList} messageInteractions -\n *          messageInteractions resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the parent Service of the resource to fetch\n * @param {sid} sessionSid - The SID of the parent Session of the resource to fetch\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nParticipantContext = function ParticipantContext(version, serviceSid,\n                                                  sessionSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sessionSid: sessionSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Sessions/${sessionSid}/Participants/${sid}`;\n\n  // Dependents\n  this._messageInteractions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sessionSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ParticipantInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ParticipantContext.prototype,\n  'messageInteractions', {\n    get: function() {\n      if (!this._messageInteractions) {\n        this._messageInteractions = new MessageInteractionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sessionSid,\n          this._solution.sid\n        );\n      }\n      return this._messageInteractions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nParticipantContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ParticipantList: ParticipantList,\n  ParticipantPage: ParticipantPage,\n  ParticipantInstance: ParticipantInstance,\n  ParticipantContext: ParticipantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar InteractionList = require('./session/interaction').InteractionList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar ParticipantList = require('./session/participant').ParticipantList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SessionList;\nvar SessionPage;\nvar SessionInstance;\nvar SessionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SessionList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionList\n *\n * @param {Twilio.Proxy.V1} version - Version of the resource\n * @param {string} serviceSid - The SID of the resource's parent Service\n */\n/* jshint ignore:end */\nSessionList = function SessionList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function sessions\n   * @memberof Twilio.Proxy.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext}\n   */\n  /* jshint ignore:end */\n  function SessionListInstance(sid) {\n    return SessionListInstance.get(sid);\n  }\n\n  SessionListInstance._version = version;\n  // Path Solution\n  SessionListInstance._solution = {serviceSid: serviceSid};\n  SessionListInstance._uri = `/Services/${serviceSid}/Sessions`;\n  /* jshint ignore:start */\n  /**\n   * Streams SessionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SessionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SessionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SessionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SessionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SessionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SessionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SessionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SessionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SessionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a SessionInstance\n   *\n   * @function create\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {Date} [opts.dateExpiry] -\n   *          The ISO 8601 date when the Session should expire\n   * @param {number} [opts.ttl] - When the session will expire\n   * @param {session.mode} [opts.mode] - The Mode of the Session\n   * @param {session.status} [opts.status] - Session status\n   * @param {object|list} [opts.participants] -\n   *          The Participant objects to include in the new session\n   * @param {boolean} [opts.failOnParticipantConflict] -\n   *          An experimental parameter to override the ProxyAllowParticipantConflict account flag on a per-request basis.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SessionInstance\n   */\n  /* jshint ignore:end */\n  SessionListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'DateExpiry': serialize.iso8601DateTime(_.get(opts, 'dateExpiry')),\n      'Ttl': _.get(opts, 'ttl'),\n      'Mode': _.get(opts, 'mode'),\n      'Status': _.get(opts, 'status'),\n      'Participants': serialize.map(_.get(opts, 'participants'), function(e) { return serialize.object(e); }),\n      'FailOnParticipantConflict': serialize.bool(_.get(opts, 'failOnParticipantConflict'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SessionInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a session\n   *\n   * @function get\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext}\n   */\n  /* jshint ignore:end */\n  SessionListInstance.get = function get(sid) {\n    return new SessionContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Proxy.V1.ServiceContext.SessionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SessionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SessionListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SessionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SessionPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SessionSolution} solution - Path solution\n *\n * @returns SessionPage\n */\n/* jshint ignore:end */\nSessionPage = function SessionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SessionPage.prototype, Page.prototype);\nSessionPage.prototype.constructor = SessionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SessionInstance\n *\n * @function getInstance\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionPage#\n *\n * @param {SessionPayload} payload - Payload response from the API\n *\n * @returns SessionInstance\n */\n/* jshint ignore:end */\nSessionPage.prototype.getInstance = function getInstance(payload) {\n  return new SessionInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSessionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSessionPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SessionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} serviceSid - The SID of the resource's parent Service\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateStarted - The ISO 8601 date when the Session started\n * @property {Date} dateEnded - The ISO 8601 date when the Session ended\n * @property {Date} dateLastInteraction -\n *          The ISO 8601 date when the Session last had an interaction\n * @property {Date} dateExpiry - The ISO 8601 date when the Session should expire\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {session.status} status - The status of the Session\n * @property {string} closedReason - The reason the Session ended\n * @property {number} ttl - When the session will expire\n * @property {session.mode} mode - The Mode of the Session\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Session resource\n * @property {string} links - The URLs of resources related to the Session\n *\n * @param {V1} version - Version of the resource\n * @param {SessionPayload} payload - The instance payload\n * @param {sid} serviceSid - The SID of the resource's parent Service\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSessionInstance = function SessionInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateStarted = deserialize.iso8601DateTime(payload.date_started); // jshint ignore:line\n  this.dateEnded = deserialize.iso8601DateTime(payload.date_ended); // jshint ignore:line\n  this.dateLastInteraction = deserialize.iso8601DateTime(payload.date_last_interaction); // jshint ignore:line\n  this.dateExpiry = deserialize.iso8601DateTime(payload.date_expiry); // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.closedReason = payload.closed_reason; // jshint ignore:line\n  this.ttl = deserialize.integer(payload.ttl); // jshint ignore:line\n  this.mode = payload.mode; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SessionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SessionContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SessionInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SessionInstance\n */\n/* jshint ignore:end */\nSessionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SessionInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SessionInstance\n */\n/* jshint ignore:end */\nSessionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SessionInstance\n *\n * @function update\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.dateExpiry] -\n *          The ISO 8601 date when the Session should expire\n * @param {number} [opts.ttl] - When the session will expire\n * @param {session.status} [opts.status] - The new status of the resource\n * @param {boolean} [opts.failOnParticipantConflict] -\n *          An experimental parameter to override the ProxyAllowParticipantConflict account flag on a per-request basis.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SessionInstance\n */\n/* jshint ignore:end */\nSessionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the interactions\n *\n * @function interactions\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionInstance#\n *\n * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionList}\n */\n/* jshint ignore:end */\nSessionInstance.prototype.interactions = function interactions() {\n  return this._proxy.interactions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the participants\n *\n * @function participants\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionInstance#\n *\n * @returns {Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList}\n */\n/* jshint ignore:end */\nSessionInstance.prototype.participants = function participants() {\n  return this._proxy.participants;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSessionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSessionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SessionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.SessionContext\n *\n * @property {Twilio.Proxy.V1.ServiceContext.SessionContext.InteractionList} interactions -\n *          interactions resource\n * @property {Twilio.Proxy.V1.ServiceContext.SessionContext.ParticipantList} participants -\n *          participants resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid - The SID of the Service to fetch the resource from\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSessionContext = function SessionContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Sessions/${sid}`;\n\n  // Dependents\n  this._interactions = undefined;\n  this._participants = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SessionInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SessionInstance\n */\n/* jshint ignore:end */\nSessionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SessionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SessionInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SessionInstance\n */\n/* jshint ignore:end */\nSessionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SessionInstance\n *\n * @function update\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.dateExpiry] -\n *          The ISO 8601 date when the Session should expire\n * @param {number} [opts.ttl] - When the session will expire\n * @param {session.status} [opts.status] - The new status of the resource\n * @param {boolean} [opts.failOnParticipantConflict] -\n *          An experimental parameter to override the ProxyAllowParticipantConflict account flag on a per-request basis.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SessionInstance\n */\n/* jshint ignore:end */\nSessionContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'DateExpiry': serialize.iso8601DateTime(_.get(opts, 'dateExpiry')),\n    'Ttl': _.get(opts, 'ttl'),\n    'Status': _.get(opts, 'status'),\n    'FailOnParticipantConflict': serialize.bool(_.get(opts, 'failOnParticipantConflict'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SessionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SessionContext.prototype,\n  'interactions', {\n    get: function() {\n      if (!this._interactions) {\n        this._interactions = new InteractionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._interactions;\n    }\n});\n\nObject.defineProperty(SessionContext.prototype,\n  'participants', {\n    get: function() {\n      if (!this._participants) {\n        this._participants = new ParticipantList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._participants;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.SessionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSessionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSessionContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SessionList: SessionList,\n  SessionPage: SessionPage,\n  SessionInstance: SessionInstance,\n  SessionContext: SessionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ShortCodeList;\nvar ShortCodePage;\nvar ShortCodeInstance;\nvar ShortCodeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodeList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.ShortCodeList\n *\n * @param {Twilio.Proxy.V1} version - Version of the resource\n * @param {string} serviceSid - The SID of the resource's parent Service\n */\n/* jshint ignore:end */\nShortCodeList = function ShortCodeList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function shortCodes\n   * @memberof Twilio.Proxy.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.ShortCodeContext}\n   */\n  /* jshint ignore:end */\n  function ShortCodeListInstance(sid) {\n    return ShortCodeListInstance.get(sid);\n  }\n\n  ShortCodeListInstance._version = version;\n  // Path Solution\n  ShortCodeListInstance._solution = {serviceSid: serviceSid};\n  ShortCodeListInstance._uri = `/Services/${serviceSid}/ShortCodes`;\n  /* jshint ignore:start */\n  /**\n   * create a ShortCodeInstance\n   *\n   * @function create\n   * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.sid - The SID of a Twilio ShortCode resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ShortCodeInstance\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['sid'])) {\n      throw new Error('Required parameter \"opts[\\'sid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Sid': _.get(opts, 'sid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ShortCodeInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ShortCodeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ShortCodeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ShortCodeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ShortCodePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ShortCodeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ShortCodePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a short_code\n   *\n   * @function get\n   * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext.ShortCodeContext}\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.get = function get(sid) {\n    return new ShortCodeContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ShortCodeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ShortCodeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ShortCodeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.ShortCodePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ShortCodeSolution} solution - Path solution\n *\n * @returns ShortCodePage\n */\n/* jshint ignore:end */\nShortCodePage = function ShortCodePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ShortCodePage.prototype, Page.prototype);\nShortCodePage.prototype.constructor = ShortCodePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ShortCodeInstance\n *\n * @function getInstance\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodePage#\n *\n * @param {ShortCodePayload} payload - Payload response from the API\n *\n * @returns ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodePage.prototype.getInstance = function getInstance(payload) {\n  return new ShortCodeInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nShortCodePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nShortCodePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodeContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.ShortCodeInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid - The SID of the resource's parent Service\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} shortCode - The short code's number\n * @property {string} isoCountry - The ISO Country Code\n * @property {PhoneNumberCapabilities} capabilities -\n *          The capabilities of the short code\n * @property {string} url - The absolute URL of the ShortCode resource\n * @property {boolean} isReserved -\n *          Whether the short code should be reserved for manual assignment to participants only\n *\n * @param {V1} version - Version of the resource\n * @param {ShortCodePayload} payload - The instance payload\n * @param {sid} serviceSid - The SID of the resource's parent Service\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nShortCodeInstance = function ShortCodeInstance(version, payload, serviceSid,\n                                                sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.shortCode = payload.short_code; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.isReserved = payload.is_reserved; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ShortCodeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ShortCodeContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a ShortCodeInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ShortCodeInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ShortCodeInstance\n *\n * @function update\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.isReserved] -\n *          Whether the short code should be reserved for manual assignment to participants only\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nShortCodeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nShortCodeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ShortCodeContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext.ShortCodeContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} serviceSid -\n *          The SID of the parent Service to fetch the resource from\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nShortCodeContext = function ShortCodeContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/ShortCodes/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ShortCodeInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ShortCodeInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ShortCodeInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ShortCodeInstance\n *\n * @function update\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.isReserved] -\n *          Whether the short code should be reserved for manual assignment to participants only\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ShortCodeInstance\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'IsReserved': serialize.bool(_.get(opts, 'isReserved'))});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ShortCodeInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext.ShortCodeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nShortCodeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nShortCodeContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ShortCodeList: ShortCodeList,\n  ShortCodePage: ShortCodePage,\n  ShortCodeInstance: ShortCodeInstance,\n  ShortCodeContext: ShortCodeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar PhoneNumberList = require('./service/phoneNumber').PhoneNumberList;\nvar SessionList = require('./service/session').SessionList;\nvar ShortCodeList = require('./service/shortCode').ShortCodeList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceList\n *\n * @param {Twilio.Proxy.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Proxy.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Proxy.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Proxy.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Proxy.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Proxy.V1.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Proxy.V1.ServiceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.uniqueName -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {number} [opts.defaultTtl] - Default TTL for a Session, in seconds\n   * @param {string} [opts.callbackUrl] -\n   *          The URL we should call when the interaction status changes\n   * @param {service.geo_match_level} [opts.geoMatchLevel] -\n   *          Where a proxy number must be located relative to the participant identifier\n   * @param {service.number_selection_behavior} [opts.numberSelectionBehavior] -\n   *          The preference for Proxy Number selection for the Service instance\n   * @param {string} [opts.interceptCallbackUrl] -\n   *          The URL we call on each interaction\n   * @param {string} [opts.outOfSessionCallbackUrl] -\n   *          The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session\n   * @param {string} [opts.chatInstanceSid] - The SID of the Chat Service Instance\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'DefaultTtl': _.get(opts, 'defaultTtl'),\n      'CallbackUrl': _.get(opts, 'callbackUrl'),\n      'GeoMatchLevel': _.get(opts, 'geoMatchLevel'),\n      'NumberSelectionBehavior': _.get(opts, 'numberSelectionBehavior'),\n      'InterceptCallbackUrl': _.get(opts, 'interceptCallbackUrl'),\n      'OutOfSessionCallbackUrl': _.get(opts, 'outOfSessionCallbackUrl'),\n      'ChatInstanceSid': _.get(opts, 'chatInstanceSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Proxy.V1.ServiceList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Proxy.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Proxy.V1.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServicePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Proxy.V1.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} chatInstanceSid - The SID of the Chat Service Instance\n * @property {string} callbackUrl -\n *          The URL we call when the interaction status changes\n * @property {number} defaultTtl - Default TTL for a Session, in seconds\n * @property {service.number_selection_behavior} numberSelectionBehavior -\n *          The preference for Proxy Number selection for the Service instance\n * @property {service.geo_match_level} geoMatchLevel -\n *          Where a proxy number must be located relative to the participant identifier\n * @property {string} interceptCallbackUrl - The URL we call on each interaction\n * @property {string} outOfSessionCallbackUrl -\n *          The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Service resource\n * @property {string} links - The URLs of resources related to the Service\n *\n * @param {V1} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.chatInstanceSid = payload.chat_instance_sid; // jshint ignore:line\n  this.callbackUrl = payload.callback_url; // jshint ignore:line\n  this.defaultTtl = deserialize.integer(payload.default_ttl); // jshint ignore:line\n  this.numberSelectionBehavior = payload.number_selection_behavior; // jshint ignore:line\n  this.geoMatchLevel = payload.geo_match_level; // jshint ignore:line\n  this.interceptCallbackUrl = payload.intercept_callback_url; // jshint ignore:line\n  this.outOfSessionCallbackUrl = payload.out_of_session_callback_url; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Proxy.V1.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {number} [opts.defaultTtl] - Default TTL for a Session, in seconds\n * @param {string} [opts.callbackUrl] -\n *          The URL we should call when the interaction status changes\n * @param {service.geo_match_level} [opts.geoMatchLevel] -\n *          Where a proxy number must be located relative to the participant identifier\n * @param {service.number_selection_behavior} [opts.numberSelectionBehavior] -\n *          The preference for Proxy Number selection for the Service instance\n * @param {string} [opts.interceptCallbackUrl] -\n *          The URL we call on each interaction\n * @param {string} [opts.outOfSessionCallbackUrl] -\n *          The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session\n * @param {string} [opts.chatInstanceSid] - The SID of the Chat Service Instance\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the sessions\n *\n * @function sessions\n * @memberof Twilio.Proxy.V1.ServiceInstance#\n *\n * @returns {Twilio.Proxy.V1.ServiceContext.SessionList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.sessions = function sessions() {\n  return this._proxy.sessions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the phoneNumbers\n *\n * @function phoneNumbers\n * @memberof Twilio.Proxy.V1.ServiceInstance#\n *\n * @returns {Twilio.Proxy.V1.ServiceContext.PhoneNumberList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.phoneNumbers = function phoneNumbers() {\n  return this._proxy.phoneNumbers;\n};\n\n/* jshint ignore:start */\n/**\n * Access the shortCodes\n *\n * @function shortCodes\n * @memberof Twilio.Proxy.V1.ServiceInstance#\n *\n * @returns {Twilio.Proxy.V1.ServiceContext.ShortCodeList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.shortCodes = function shortCodes() {\n  return this._proxy.shortCodes;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Proxy.V1.ServiceContext\n *\n * @property {Twilio.Proxy.V1.ServiceContext.SessionList} sessions -\n *          sessions resource\n * @property {Twilio.Proxy.V1.ServiceContext.PhoneNumberList} phoneNumbers -\n *          phoneNumbers resource\n * @property {Twilio.Proxy.V1.ServiceContext.ShortCodeList} shortCodes -\n *          shortCodes resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._sessions = undefined;\n  this._phoneNumbers = undefined;\n  this._shortCodes = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Proxy.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Proxy.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Proxy.V1.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {number} [opts.defaultTtl] - Default TTL for a Session, in seconds\n * @param {string} [opts.callbackUrl] -\n *          The URL we should call when the interaction status changes\n * @param {service.geo_match_level} [opts.geoMatchLevel] -\n *          Where a proxy number must be located relative to the participant identifier\n * @param {service.number_selection_behavior} [opts.numberSelectionBehavior] -\n *          The preference for Proxy Number selection for the Service instance\n * @param {string} [opts.interceptCallbackUrl] -\n *          The URL we call on each interaction\n * @param {string} [opts.outOfSessionCallbackUrl] -\n *          The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session\n * @param {string} [opts.chatInstanceSid] - The SID of the Chat Service Instance\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'DefaultTtl': _.get(opts, 'defaultTtl'),\n    'CallbackUrl': _.get(opts, 'callbackUrl'),\n    'GeoMatchLevel': _.get(opts, 'geoMatchLevel'),\n    'NumberSelectionBehavior': _.get(opts, 'numberSelectionBehavior'),\n    'InterceptCallbackUrl': _.get(opts, 'interceptCallbackUrl'),\n    'OutOfSessionCallbackUrl': _.get(opts, 'outOfSessionCallbackUrl'),\n    'ChatInstanceSid': _.get(opts, 'chatInstanceSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'sessions', {\n    get: function() {\n      if (!this._sessions) {\n        this._sessions = new SessionList(this._version, this._solution.sid);\n      }\n      return this._sessions;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'phoneNumbers', {\n    get: function() {\n      if (!this._phoneNumbers) {\n        this._phoneNumbers = new PhoneNumberList(this._version, this._solution.sid);\n      }\n      return this._phoneNumbers;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'shortCodes', {\n    get: function() {\n      if (!this._shortCodes) {\n        this._shortCodes = new ShortCodeList(this._version, this._solution.sid);\n      }\n      return this._shortCodes;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Proxy.V1.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar ServiceList = require('./v1/service').ServiceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Proxy\n *\n * @constructor Twilio.Proxy.V1\n *\n * @property {Twilio.Proxy.V1.ServiceList} services - services resource\n *\n * @param {Twilio.Proxy} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._services = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./proxy/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize proxy domain\n *\n * @constructor Twilio.Proxy\n *\n * @property {Twilio.Proxy.V1} v1 - v1 version\n * @property {Twilio.Proxy.V1.ServiceList} services - services resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Proxy(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://proxy.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Proxy.prototype, Domain.prototype);\nProxy.prototype.constructor = Proxy;\n\nObject.defineProperty(Proxy.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Proxy.prototype,\n  'services', {\n    get: function() {\n      return this.v1.services;\n    }\n});\n\nmodule.exports = Proxy;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar AssetVersionList;\nvar AssetVersionPage;\nvar AssetVersionInstance;\nvar AssetVersionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AssetVersionList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Asset Version resource is associated with\n * @param {string} assetSid -\n *          The SID of the Asset resource that is the parent of the Asset Version\n */\n/* jshint ignore:end */\nAssetVersionList = function AssetVersionList(version, serviceSid, assetSid) {\n  /* jshint ignore:start */\n  /**\n   * @function assetVersions\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionContext}\n   */\n  /* jshint ignore:end */\n  function AssetVersionListInstance(sid) {\n    return AssetVersionListInstance.get(sid);\n  }\n\n  AssetVersionListInstance._version = version;\n  // Path Solution\n  AssetVersionListInstance._solution = {serviceSid: serviceSid, assetSid: assetSid};\n  AssetVersionListInstance._uri = `/Services/${serviceSid}/Assets/${assetSid}/Versions`;\n  /* jshint ignore:start */\n  /**\n   * Streams AssetVersionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AssetVersionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AssetVersionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssetVersionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AssetVersionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssetVersionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssetVersionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AssetVersionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssetVersionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssetVersionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a asset_version\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionList#\n   *\n   * @param {string} sid -\n   *          The SID that identifies the Asset Version resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionContext}\n   */\n  /* jshint ignore:end */\n  AssetVersionListInstance.get = function get(sid) {\n    return new AssetVersionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.assetSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AssetVersionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AssetVersionListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AssetVersionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssetVersionPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AssetVersionSolution} solution - Path solution\n *\n * @returns AssetVersionPage\n */\n/* jshint ignore:end */\nAssetVersionPage = function AssetVersionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AssetVersionPage.prototype, Page.prototype);\nAssetVersionPage.prototype.constructor = AssetVersionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AssetVersionInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionPage#\n *\n * @param {AssetVersionPayload} payload - Payload response from the API\n *\n * @returns AssetVersionInstance\n */\n/* jshint ignore:end */\nAssetVersionPage.prototype.getInstance = function getInstance(payload) {\n  return new AssetVersionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.assetSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssetVersionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssetVersionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssetVersionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Asset Version resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Asset Version resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Asset Version resource is associated with\n * @property {string} assetSid -\n *          The SID of the Asset resource that is the parent of the Asset Version\n * @property {string} path -\n *          The URL-friendly string by which the Asset Version can be referenced\n * @property {asset_version.visibility} visibility -\n *          The access control that determines how the Asset Version can be accessed\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Asset Version resource was created\n * @property {string} url - The absolute URL of the Asset Version resource\n *\n * @param {V1} version - Version of the resource\n * @param {AssetVersionPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Asset Version resource is associated with\n * @param {sid} assetSid -\n *          The SID of the Asset resource that is the parent of the Asset Version\n * @param {sid} sid - The SID that identifies the Asset Version resource to fetch\n */\n/* jshint ignore:end */\nAssetVersionInstance = function AssetVersionInstance(version, payload,\n                                                      serviceSid, assetSid, sid)\n                                                      {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.assetSid = payload.asset_sid; // jshint ignore:line\n  this.path = payload.path; // jshint ignore:line\n  this.visibility = payload.visibility; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, assetSid: assetSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AssetVersionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AssetVersionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.assetSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AssetVersionInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssetVersionInstance\n */\n/* jshint ignore:end */\nAssetVersionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssetVersionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssetVersionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssetVersionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Asset Version resource from\n * @param {sid} assetSid -\n *          The SID of the Asset resource that is the parent of the Asset Version resource to fetch\n * @param {sid} sid - The SID that identifies the Asset Version resource to fetch\n */\n/* jshint ignore:end */\nAssetVersionContext = function AssetVersionContext(version, serviceSid,\n                                                    assetSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, assetSid: assetSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Assets/${assetSid}/Versions/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AssetVersionInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssetVersionInstance\n */\n/* jshint ignore:end */\nAssetVersionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssetVersionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.assetSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssetVersionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAssetVersionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AssetVersionList: AssetVersionList,\n  AssetVersionPage: AssetVersionPage,\n  AssetVersionInstance: AssetVersionInstance,\n  AssetVersionContext: AssetVersionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AssetVersionList = require('./asset/assetVersion').AssetVersionList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AssetList;\nvar AssetPage;\nvar AssetInstance;\nvar AssetContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AssetList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.AssetList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Asset resource is associated with\n */\n/* jshint ignore:end */\nAssetList = function AssetList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function assets\n   * @memberof Twilio.Serverless.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.AssetContext}\n   */\n  /* jshint ignore:end */\n  function AssetListInstance(sid) {\n    return AssetListInstance.get(sid);\n  }\n\n  AssetListInstance._version = version;\n  // Path Solution\n  AssetListInstance._solution = {serviceSid: serviceSid};\n  AssetListInstance._uri = `/Services/${serviceSid}/Assets`;\n  /* jshint ignore:start */\n  /**\n   * Streams AssetInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  AssetListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists AssetInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssetListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of AssetInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssetListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssetPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of AssetInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  AssetListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssetPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a AssetInstance\n   *\n   * @function create\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the Asset resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AssetInstance\n   */\n  /* jshint ignore:end */\n  AssetListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AssetInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a asset\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetList#\n   *\n   * @param {string} sid - The SID that identifies the Asset resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.AssetContext}\n   */\n  /* jshint ignore:end */\n  AssetListInstance.get = function get(sid) {\n    return new AssetContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.AssetList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AssetListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AssetListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AssetListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssetPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.AssetPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AssetSolution} solution - Path solution\n *\n * @returns AssetPage\n */\n/* jshint ignore:end */\nAssetPage = function AssetPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AssetPage.prototype, Page.prototype);\nAssetPage.prototype.constructor = AssetPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AssetInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetPage#\n *\n * @param {AssetPayload} payload - Payload response from the API\n *\n * @returns AssetInstance\n */\n/* jshint ignore:end */\nAssetPage.prototype.getInstance = function getInstance(payload) {\n  return new AssetInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssetPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssetPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssetContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.AssetInstance\n *\n * @property {string} sid - The unique string that identifies the Asset resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Asset resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Asset resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Asset resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Asset resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Asset resource was last updated\n * @property {string} url - The absolute URL of the Asset resource\n * @property {string} links - The URLs of the Asset resource's nested resources\n *\n * @param {V1} version - Version of the resource\n * @param {AssetPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Asset resource is associated with\n * @param {sid} sid - The SID that identifies the Asset resource to fetch\n */\n/* jshint ignore:end */\nAssetInstance = function AssetInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AssetInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AssetContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AssetInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssetInstance\n */\n/* jshint ignore:end */\nAssetInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a AssetInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssetInstance\n */\n/* jshint ignore:end */\nAssetInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a AssetInstance\n *\n * @function update\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - A string to describe the Asset resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssetInstance\n */\n/* jshint ignore:end */\nAssetInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the assetVersions\n *\n * @function assetVersions\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionList}\n */\n/* jshint ignore:end */\nAssetInstance.prototype.assetVersions = function assetVersions() {\n  return this._proxy.assetVersions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssetInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAssetInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AssetContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.AssetContext\n *\n * @property {Twilio.Serverless.V1.ServiceContext.AssetContext.AssetVersionList} assetVersions -\n *          assetVersions resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Asset resource from\n * @param {sid} sid - The SID that identifies the Asset resource to fetch\n */\n/* jshint ignore:end */\nAssetContext = function AssetContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Assets/${sid}`;\n\n  // Dependents\n  this._assetVersions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AssetInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssetInstance\n */\n/* jshint ignore:end */\nAssetContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssetInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a AssetInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssetInstance\n */\n/* jshint ignore:end */\nAssetContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a AssetInstance\n *\n * @function update\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - A string to describe the Asset resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AssetInstance\n */\n/* jshint ignore:end */\nAssetContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['friendlyName'])) {\n    throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AssetInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(AssetContext.prototype,\n  'assetVersions', {\n    get: function() {\n      if (!this._assetVersions) {\n        this._assetVersions = new AssetVersionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._assetVersions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.AssetContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAssetContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAssetContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AssetList: AssetList,\n  AssetPage: AssetPage,\n  AssetInstance: AssetInstance,\n  AssetContext: AssetContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar BuildStatusList;\nvar BuildStatusPage;\nvar BuildStatusInstance;\nvar BuildStatusContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BuildStatusList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Build resource is associated with\n * @param {string} sid - The unique string that identifies the Build resource\n */\n/* jshint ignore:end */\nBuildStatusList = function BuildStatusList(version, serviceSid, sid) {\n  /* jshint ignore:start */\n  /**\n   * @function buildStatus\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusContext}\n   */\n  /* jshint ignore:end */\n  function BuildStatusListInstance(sid) {\n    return BuildStatusListInstance.get(sid);\n  }\n\n  BuildStatusListInstance._version = version;\n  // Path Solution\n  BuildStatusListInstance._solution = {serviceSid: serviceSid, sid: sid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a build_status\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusList#\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusContext}\n   */\n  /* jshint ignore:end */\n  BuildStatusListInstance.get = function get() {\n    return new BuildStatusContext(this._version, this._solution.serviceSid, this._solution.sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BuildStatusListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BuildStatusListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BuildStatusListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BuildStatusPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BuildStatusSolution} solution - Path solution\n *\n * @returns BuildStatusPage\n */\n/* jshint ignore:end */\nBuildStatusPage = function BuildStatusPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BuildStatusPage.prototype, Page.prototype);\nBuildStatusPage.prototype.constructor = BuildStatusPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BuildStatusInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusPage#\n *\n * @param {BuildStatusPayload} payload - Payload response from the API\n *\n * @returns BuildStatusInstance\n */\n/* jshint ignore:end */\nBuildStatusPage.prototype.getInstance = function getInstance(payload) {\n  return new BuildStatusInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.sid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBuildStatusPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBuildStatusPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BuildStatusContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusInstance\n *\n * @property {string} sid - The unique string that identifies the Build resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Build resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Build resource is associated with\n * @property {build_status.status} status - The status of the Build\n * @property {string} url - The absolute URL of the Build Status resource\n *\n * @param {V1} version - Version of the resource\n * @param {BuildStatusPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Build resource is associated with\n * @param {sid} sid - The unique string that identifies the Build resource\n */\n/* jshint ignore:end */\nBuildStatusInstance = function BuildStatusInstance(version, payload, serviceSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n};\n\nObject.defineProperty(BuildStatusInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BuildStatusContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BuildStatusInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BuildStatusInstance\n */\n/* jshint ignore:end */\nBuildStatusInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBuildStatusInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBuildStatusInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BuildStatusContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Build resource from\n * @param {sid} sid - The SID of the Build resource to fetch\n */\n/* jshint ignore:end */\nBuildStatusContext = function BuildStatusContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Builds/${sid}/Status`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BuildStatusInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BuildStatusInstance\n */\n/* jshint ignore:end */\nBuildStatusContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BuildStatusInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBuildStatusContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBuildStatusContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BuildStatusList: BuildStatusList,\n  BuildStatusPage: BuildStatusPage,\n  BuildStatusInstance: BuildStatusInstance,\n  BuildStatusContext: BuildStatusContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BuildStatusList = require('./build/buildStatus').BuildStatusList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BuildList;\nvar BuildPage;\nvar BuildInstance;\nvar BuildContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BuildList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.BuildList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Build resource is associated with\n */\n/* jshint ignore:end */\nBuildList = function BuildList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function builds\n   * @memberof Twilio.Serverless.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.BuildContext}\n   */\n  /* jshint ignore:end */\n  function BuildListInstance(sid) {\n    return BuildListInstance.get(sid);\n  }\n\n  BuildListInstance._version = version;\n  // Path Solution\n  BuildListInstance._solution = {serviceSid: serviceSid};\n  BuildListInstance._uri = `/Services/${serviceSid}/Builds`;\n  /* jshint ignore:start */\n  /**\n   * Streams BuildInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BuildListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BuildInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BuildListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BuildInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BuildListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BuildPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BuildInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BuildListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BuildPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a BuildInstance\n   *\n   * @function create\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string|list} [opts.assetVersions] -\n   *          The list of Asset Version resource SIDs to include in the Build\n   * @param {string|list} [opts.functionVersions] -\n   *          The list of the Function Version resource SIDs to include in the Build\n   * @param {string} [opts.dependencies] -\n   *          A list of objects that describe the Dependencies included in the Build\n   * @param {string} [opts.runtime] -\n   *          The Runtime version that will be used to run the Build.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed BuildInstance\n   */\n  /* jshint ignore:end */\n  BuildListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'AssetVersions': serialize.map(_.get(opts, 'assetVersions'), function(e) { return e; }),\n      'FunctionVersions': serialize.map(_.get(opts, 'functionVersions'), function(e) { return e; }),\n      'Dependencies': _.get(opts, 'dependencies'),\n      'Runtime': _.get(opts, 'runtime')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BuildInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a build\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildList#\n   *\n   * @param {string} sid - The SID of the Build resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.BuildContext}\n   */\n  /* jshint ignore:end */\n  BuildListInstance.get = function get(sid) {\n    return new BuildContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.BuildList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BuildListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BuildListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BuildListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BuildPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.BuildPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BuildSolution} solution - Path solution\n *\n * @returns BuildPage\n */\n/* jshint ignore:end */\nBuildPage = function BuildPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BuildPage.prototype, Page.prototype);\nBuildPage.prototype.constructor = BuildPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BuildInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildPage#\n *\n * @param {BuildPayload} payload - Payload response from the API\n *\n * @returns BuildInstance\n */\n/* jshint ignore:end */\nBuildPage.prototype.getInstance = function getInstance(payload) {\n  return new BuildInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBuildPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBuildPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BuildContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.BuildInstance\n *\n * @property {string} sid - The unique string that identifies the Build resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Build resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Build resource is associated with\n * @property {build.status} status - The status of the Build\n * @property {object} assetVersions -\n *          The list of Asset Version resource SIDs that are included in the Build\n * @property {object} functionVersions -\n *          The list of Function Version resource SIDs that are included in the Build\n * @property {object} dependencies -\n *          A list of objects that describe the Dependencies included in the Build\n * @property {build.runtime} runtime -\n *          The Runtime version that will be used to run the Build.\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Build resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Build resource was last updated\n * @property {string} url - The absolute URL of the Build resource\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {BuildPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Build resource is associated with\n * @param {sid} sid - The SID of the Build resource to fetch\n */\n/* jshint ignore:end */\nBuildInstance = function BuildInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.assetVersions = payload.asset_versions; // jshint ignore:line\n  this.functionVersions = payload.function_versions; // jshint ignore:line\n  this.dependencies = payload.dependencies; // jshint ignore:line\n  this.runtime = payload.runtime; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(BuildInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BuildContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a BuildInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BuildInstance\n */\n/* jshint ignore:end */\nBuildInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a BuildInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BuildInstance\n */\n/* jshint ignore:end */\nBuildInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the buildStatus\n *\n * @function buildStatus\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusList}\n */\n/* jshint ignore:end */\nBuildInstance.prototype.buildStatus = function buildStatus() {\n  return this._proxy.buildStatus;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBuildInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBuildInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BuildContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.BuildContext\n *\n * @property {Twilio.Serverless.V1.ServiceContext.BuildContext.BuildStatusList} buildStatus -\n *          buildStatus resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Build resource from\n * @param {sid} sid - The SID of the Build resource to fetch\n */\n/* jshint ignore:end */\nBuildContext = function BuildContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Builds/${sid}`;\n\n  // Dependents\n  this._buildStatus = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BuildInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BuildInstance\n */\n/* jshint ignore:end */\nBuildContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BuildInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a BuildInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BuildInstance\n */\n/* jshint ignore:end */\nBuildContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(BuildContext.prototype,\n  'buildStatus', {\n    get: function() {\n      if (!this._buildStatus) {\n        this._buildStatus = new BuildStatusList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._buildStatus;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.BuildContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBuildContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBuildContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BuildList: BuildList,\n  BuildPage: BuildPage,\n  BuildInstance: BuildInstance,\n  BuildContext: BuildContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar DeploymentList;\nvar DeploymentPage;\nvar DeploymentInstance;\nvar DeploymentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DeploymentList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Deployment resource is associated with\n * @param {string} environmentSid - The SID of the Environment for the Deployment\n */\n/* jshint ignore:end */\nDeploymentList = function DeploymentList(version, serviceSid, environmentSid) {\n  /* jshint ignore:start */\n  /**\n   * @function deployments\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentContext}\n   */\n  /* jshint ignore:end */\n  function DeploymentListInstance(sid) {\n    return DeploymentListInstance.get(sid);\n  }\n\n  DeploymentListInstance._version = version;\n  // Path Solution\n  DeploymentListInstance._solution = {serviceSid: serviceSid, environmentSid: environmentSid};\n  DeploymentListInstance._uri = `/Services/${serviceSid}/Environments/${environmentSid}/Deployments`;\n  /* jshint ignore:start */\n  /**\n   * Streams DeploymentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DeploymentInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DeploymentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeploymentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DeploymentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeploymentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a DeploymentInstance\n   *\n   * @function create\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.buildSid] - The SID of the Build for the Deployment\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed DeploymentInstance\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'BuildSid': _.get(opts, 'buildSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DeploymentInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.environmentSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a deployment\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList#\n   *\n   * @param {string} sid - The SID that identifies the Deployment resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentContext}\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.get = function get(sid) {\n    return new DeploymentContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.environmentSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DeploymentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DeploymentListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DeploymentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeploymentPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DeploymentSolution} solution - Path solution\n *\n * @returns DeploymentPage\n */\n/* jshint ignore:end */\nDeploymentPage = function DeploymentPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DeploymentPage.prototype, Page.prototype);\nDeploymentPage.prototype.constructor = DeploymentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DeploymentInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentPage#\n *\n * @param {DeploymentPayload} payload - Payload response from the API\n *\n * @returns DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentPage.prototype.getInstance = function getInstance(payload) {\n  return new DeploymentInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.environmentSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeploymentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeploymentPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeploymentContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Deployment resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Deployment resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Deployment resource is associated with\n * @property {string} environmentSid -\n *          The SID of the Environment for the Deployment\n * @property {string} buildSid - The SID of the Build for the deployment\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Deployment resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Deployment resource was last updated\n * @property {string} url - The absolute URL of the Deployment resource\n *\n * @param {V1} version - Version of the resource\n * @param {DeploymentPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Deployment resource is associated with\n * @param {sid} environmentSid - The SID of the Environment for the Deployment\n * @param {sid} sid - The SID that identifies the Deployment resource to fetch\n */\n/* jshint ignore:end */\nDeploymentInstance = function DeploymentInstance(version, payload, serviceSid,\n                                                  environmentSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.environmentSid = payload.environment_sid; // jshint ignore:line\n  this.buildSid = payload.build_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, environmentSid: environmentSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(DeploymentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DeploymentContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.environmentSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DeploymentInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeploymentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDeploymentInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DeploymentContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Deployment resource from\n * @param {sid} environmentSid -\n *          The SID of the Environment used by the Deployment to fetch\n * @param {sid} sid - The SID that identifies the Deployment resource to fetch\n */\n/* jshint ignore:end */\nDeploymentContext = function DeploymentContext(version, serviceSid,\n                                                environmentSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, environmentSid: environmentSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Environments/${environmentSid}/Deployments/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DeploymentInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DeploymentInstance\n */\n/* jshint ignore:end */\nDeploymentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DeploymentInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.environmentSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDeploymentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDeploymentContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DeploymentList: DeploymentList,\n  DeploymentPage: DeploymentPage,\n  DeploymentInstance: DeploymentInstance,\n  DeploymentContext: DeploymentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar LogList;\nvar LogPage;\nvar LogInstance;\nvar LogContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the LogList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Log resource is associated with\n * @param {string} environmentSid -\n *          The SID of the environment in which the log occurred\n */\n/* jshint ignore:end */\nLogList = function LogList(version, serviceSid, environmentSid) {\n  /* jshint ignore:start */\n  /**\n   * @function logs\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogContext}\n   */\n  /* jshint ignore:end */\n  function LogListInstance(sid) {\n    return LogListInstance.get(sid);\n  }\n\n  LogListInstance._version = version;\n  // Path Solution\n  LogListInstance._solution = {serviceSid: serviceSid, environmentSid: environmentSid};\n  LogListInstance._uri = `/Services/${serviceSid}/Environments/${environmentSid}/Logs`;\n  /* jshint ignore:start */\n  /**\n   * Streams LogInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.functionSid] -\n   *          The SID of the function whose invocation produced the Log resources to read\n   * @param {Date} [opts.startDate] -\n   *          The date and time after which the Log resources must have been created.\n   * @param {Date} [opts.endDate] -\n   *          The date and time before which the Log resource must have been created.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  LogListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists LogInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.functionSid] -\n   *          The SID of the function whose invocation produced the Log resources to read\n   * @param {Date} [opts.startDate] -\n   *          The date and time after which the Log resources must have been created.\n   * @param {Date} [opts.endDate] -\n   *          The date and time before which the Log resource must have been created.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LogListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of LogInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.functionSid] -\n   *          The SID of the function whose invocation produced the Log resources to read\n   * @param {Date} [opts.startDate] -\n   *          The date and time after which the Log resources must have been created.\n   * @param {Date} [opts.endDate] -\n   *          The date and time before which the Log resource must have been created.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LogListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FunctionSid': _.get(opts, 'functionSid'),\n      'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n      'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new LogPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of LogInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  LogListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new LogPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a log\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogList#\n   *\n   * @param {string} sid - The SID that identifies the Log resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogContext}\n   */\n  /* jshint ignore:end */\n  LogListInstance.get = function get(sid) {\n    return new LogContext(this._version, this._solution.serviceSid, this._solution.environmentSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  LogListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  LogListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return LogListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the LogPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {LogSolution} solution - Path solution\n *\n * @returns LogPage\n */\n/* jshint ignore:end */\nLogPage = function LogPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(LogPage.prototype, Page.prototype);\nLogPage.prototype.constructor = LogPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of LogInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogPage#\n *\n * @param {LogPayload} payload - Payload response from the API\n *\n * @returns LogInstance\n */\n/* jshint ignore:end */\nLogPage.prototype.getInstance = function getInstance(payload) {\n  return new LogInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.environmentSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nLogPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nLogPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the LogContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogInstance\n *\n * @property {string} sid - The unique string that identifies the Log resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Log resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Log resource is associated with\n * @property {string} environmentSid -\n *          The SID of the environment in which the log occurred\n * @property {string} buildSid - The SID of the build that corresponds to the log\n * @property {string} deploymentSid -\n *          The SID of the deployment that corresponds to the log\n * @property {string} functionSid -\n *          The SID of the function whose invocation produced the log\n * @property {string} requestSid - The SID of the request associated with the log\n * @property {log.level} level - The log level\n * @property {string} message - The log message\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Log resource was created\n * @property {string} url - The absolute URL of the Log resource\n *\n * @param {V1} version - Version of the resource\n * @param {LogPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Log resource is associated with\n * @param {sid} environmentSid -\n *          The SID of the environment in which the log occurred\n * @param {sid} sid - The SID that identifies the Log resource to fetch\n */\n/* jshint ignore:end */\nLogInstance = function LogInstance(version, payload, serviceSid, environmentSid,\n                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.environmentSid = payload.environment_sid; // jshint ignore:line\n  this.buildSid = payload.build_sid; // jshint ignore:line\n  this.deploymentSid = payload.deployment_sid; // jshint ignore:line\n  this.functionSid = payload.function_sid; // jshint ignore:line\n  this.requestSid = payload.request_sid; // jshint ignore:line\n  this.level = payload.level; // jshint ignore:line\n  this.message = payload.message; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, environmentSid: environmentSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(LogInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new LogContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.environmentSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a LogInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed LogInstance\n */\n/* jshint ignore:end */\nLogInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nLogInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nLogInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the LogContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Log resource from\n * @param {sid} environmentSid -\n *          The SID of the environment with the Log resource to fetch\n * @param {sid} sid - The SID that identifies the Log resource to fetch\n */\n/* jshint ignore:end */\nLogContext = function LogContext(version, serviceSid, environmentSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, environmentSid: environmentSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Environments/${environmentSid}/Logs/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a LogInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed LogInstance\n */\n/* jshint ignore:end */\nLogContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new LogInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.environmentSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nLogContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nLogContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  LogList: LogList,\n  LogPage: LogPage,\n  LogInstance: LogInstance,\n  LogContext: LogContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar VariableList;\nvar VariablePage;\nvar VariableInstance;\nvar VariableContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the VariableList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Variable resource is associated with\n * @param {string} environmentSid -\n *          The SID of the Environment in which the Variable exists\n */\n/* jshint ignore:end */\nVariableList = function VariableList(version, serviceSid, environmentSid) {\n  /* jshint ignore:start */\n  /**\n   * @function variables\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableContext}\n   */\n  /* jshint ignore:end */\n  function VariableListInstance(sid) {\n    return VariableListInstance.get(sid);\n  }\n\n  VariableListInstance._version = version;\n  // Path Solution\n  VariableListInstance._solution = {serviceSid: serviceSid, environmentSid: environmentSid};\n  VariableListInstance._uri = `/Services/${serviceSid}/Environments/${environmentSid}/Variables`;\n  /* jshint ignore:start */\n  /**\n   * Streams VariableInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  VariableListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists VariableInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  VariableListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of VariableInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  VariableListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new VariablePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of VariableInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  VariableListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new VariablePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a VariableInstance\n   *\n   * @function create\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.key -\n   *          A string by which the Variable resource can be referenced\n   * @param {string} opts.value -\n   *          A string that contains the actual value of the Variable\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed VariableInstance\n   */\n  /* jshint ignore:end */\n  VariableListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['key'])) {\n      throw new Error('Required parameter \"opts[\\'key\\']\" missing.');\n    }\n    if (_.isUndefined(opts['value'])) {\n      throw new Error('Required parameter \"opts[\\'value\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Key': _.get(opts, 'key'), 'Value': _.get(opts, 'value')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new VariableInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.environmentSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a variable\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList#\n   *\n   * @param {string} sid - The SID of the Variable resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableContext}\n   */\n  /* jshint ignore:end */\n  VariableListInstance.get = function get(sid) {\n    return new VariableContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.environmentSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  VariableListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  VariableListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return VariableListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VariablePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariablePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {VariableSolution} solution - Path solution\n *\n * @returns VariablePage\n */\n/* jshint ignore:end */\nVariablePage = function VariablePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(VariablePage.prototype, Page.prototype);\nVariablePage.prototype.constructor = VariablePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of VariableInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariablePage#\n *\n * @param {VariablePayload} payload - Payload response from the API\n *\n * @returns VariableInstance\n */\n/* jshint ignore:end */\nVariablePage.prototype.getInstance = function getInstance(payload) {\n  return new VariableInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.environmentSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariablePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVariablePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVariablePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VariableContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableInstance\n *\n * @property {string} sid - The unique string that identifies the Variable resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Variable resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Variable resource is associated with\n * @property {string} environmentSid -\n *          The SID of the Environment in which the Variable exists\n * @property {string} key -\n *          A string by which the Variable resource can be referenced\n * @property {string} value -\n *          A string that contains the actual value of the Variable\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Variable resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Variable resource was last updated\n * @property {string} url - The absolute URL of the Variable resource\n *\n * @param {V1} version - Version of the resource\n * @param {VariablePayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Variable resource is associated with\n * @param {sid} environmentSid -\n *          The SID of the Environment in which the Variable exists\n * @param {sid} sid - The SID of the Variable resource to fetch\n */\n/* jshint ignore:end */\nVariableInstance = function VariableInstance(version, payload, serviceSid,\n                                              environmentSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.environmentSid = payload.environment_sid; // jshint ignore:line\n  this.key = payload.key; // jshint ignore:line\n  this.value = payload.value; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, environmentSid: environmentSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(VariableInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new VariableContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.environmentSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a VariableInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VariableInstance\n */\n/* jshint ignore:end */\nVariableInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a VariableInstance\n *\n * @function update\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.key] -\n *          A string by which the Variable resource can be referenced\n * @param {string} [opts.value] -\n *          A string that contains the actual value of the Variable\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VariableInstance\n */\n/* jshint ignore:end */\nVariableInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a VariableInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VariableInstance\n */\n/* jshint ignore:end */\nVariableInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVariableInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVariableInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VariableContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Variable resource from\n * @param {sid} environmentSid -\n *          The SID of the Environment with the Variable resource to fetch\n * @param {sid} sid - The SID of the Variable resource to fetch\n */\n/* jshint ignore:end */\nVariableContext = function VariableContext(version, serviceSid, environmentSid,\n                                            sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, environmentSid: environmentSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Environments/${environmentSid}/Variables/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a VariableInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VariableInstance\n */\n/* jshint ignore:end */\nVariableContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new VariableInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.environmentSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a VariableInstance\n *\n * @function update\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.key] -\n *          A string by which the Variable resource can be referenced\n * @param {string} [opts.value] -\n *          A string that contains the actual value of the Variable\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VariableInstance\n */\n/* jshint ignore:end */\nVariableContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Key': _.get(opts, 'key'), 'Value': _.get(opts, 'value')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new VariableInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.environmentSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a VariableInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VariableInstance\n */\n/* jshint ignore:end */\nVariableContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVariableContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nVariableContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  VariableList: VariableList,\n  VariablePage: VariablePage,\n  VariableInstance: VariableInstance,\n  VariableContext: VariableContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DeploymentList = require('./environment/deployment').DeploymentList;\nvar LogList = require('./environment/log').LogList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar VariableList = require('./environment/variable').VariableList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar EnvironmentList;\nvar EnvironmentPage;\nvar EnvironmentInstance;\nvar EnvironmentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EnvironmentList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Environment resource is associated with\n */\n/* jshint ignore:end */\nEnvironmentList = function EnvironmentList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function environments\n   * @memberof Twilio.Serverless.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext}\n   */\n  /* jshint ignore:end */\n  function EnvironmentListInstance(sid) {\n    return EnvironmentListInstance.get(sid);\n  }\n\n  EnvironmentListInstance._version = version;\n  // Path Solution\n  EnvironmentListInstance._solution = {serviceSid: serviceSid};\n  EnvironmentListInstance._uri = `/Services/${serviceSid}/Environments`;\n  /* jshint ignore:start */\n  /**\n   * Streams EnvironmentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EnvironmentListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EnvironmentInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EnvironmentListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EnvironmentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EnvironmentListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EnvironmentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EnvironmentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EnvironmentListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EnvironmentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a EnvironmentInstance\n   *\n   * @function create\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.uniqueName -\n   *          A user-defined string that uniquely identifies the Environment resource\n   * @param {string} [opts.domainSuffix] -\n   *          A URL-friendly name that represents the environment\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed EnvironmentInstance\n   */\n  /* jshint ignore:end */\n  EnvironmentListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'DomainSuffix': _.get(opts, 'domainSuffix')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EnvironmentInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a environment\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentList#\n   *\n   * @param {string} sid - The SID of the Environment resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext}\n   */\n  /* jshint ignore:end */\n  EnvironmentListInstance.get = function get(sid) {\n    return new EnvironmentContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EnvironmentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EnvironmentListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EnvironmentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EnvironmentPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EnvironmentSolution} solution - Path solution\n *\n * @returns EnvironmentPage\n */\n/* jshint ignore:end */\nEnvironmentPage = function EnvironmentPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EnvironmentPage.prototype, Page.prototype);\nEnvironmentPage.prototype.constructor = EnvironmentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EnvironmentInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentPage#\n *\n * @param {EnvironmentPayload} payload - Payload response from the API\n *\n * @returns EnvironmentInstance\n */\n/* jshint ignore:end */\nEnvironmentPage.prototype.getInstance = function getInstance(payload) {\n  return new EnvironmentInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEnvironmentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEnvironmentPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EnvironmentContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Environment resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Environment resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Environment resource is associated with\n * @property {string} buildSid - The SID of the build deployed in the environment\n * @property {string} uniqueName -\n *          A user-defined string that uniquely identifies the Environment resource\n * @property {string} domainSuffix -\n *          A URL-friendly name that represents the environment\n * @property {string} domainName -\n *          The domain name for all Functions and Assets deployed in the Environment\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Environment resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Environment resource was last updated\n * @property {string} url - The absolute URL of the Environment resource\n * @property {string} links -\n *          The URLs of the Environment resource's nested resources\n *\n * @param {V1} version - Version of the resource\n * @param {EnvironmentPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Environment resource is associated with\n * @param {sid} sid - The SID of the Environment resource to fetch\n */\n/* jshint ignore:end */\nEnvironmentInstance = function EnvironmentInstance(version, payload, serviceSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.buildSid = payload.build_sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.domainSuffix = payload.domain_suffix; // jshint ignore:line\n  this.domainName = payload.domain_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(EnvironmentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EnvironmentContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EnvironmentInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EnvironmentInstance\n */\n/* jshint ignore:end */\nEnvironmentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a EnvironmentInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EnvironmentInstance\n */\n/* jshint ignore:end */\nEnvironmentInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the variables\n *\n * @function variables\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList}\n */\n/* jshint ignore:end */\nEnvironmentInstance.prototype.variables = function variables() {\n  return this._proxy.variables;\n};\n\n/* jshint ignore:start */\n/**\n * Access the deployments\n *\n * @function deployments\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList}\n */\n/* jshint ignore:end */\nEnvironmentInstance.prototype.deployments = function deployments() {\n  return this._proxy.deployments;\n};\n\n/* jshint ignore:start */\n/**\n * Access the logs\n *\n * @function logs\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogList}\n */\n/* jshint ignore:end */\nEnvironmentInstance.prototype.logs = function logs() {\n  return this._proxy.logs;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEnvironmentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEnvironmentInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EnvironmentContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.EnvironmentContext\n *\n * @property {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.VariableList} variables -\n *          variables resource\n * @property {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.DeploymentList} deployments -\n *          deployments resource\n * @property {Twilio.Serverless.V1.ServiceContext.EnvironmentContext.LogList} logs -\n *          logs resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Environment resource from\n * @param {sid} sid - The SID of the Environment resource to fetch\n */\n/* jshint ignore:end */\nEnvironmentContext = function EnvironmentContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Environments/${sid}`;\n\n  // Dependents\n  this._variables = undefined;\n  this._deployments = undefined;\n  this._logs = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EnvironmentInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EnvironmentInstance\n */\n/* jshint ignore:end */\nEnvironmentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EnvironmentInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a EnvironmentInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EnvironmentInstance\n */\n/* jshint ignore:end */\nEnvironmentContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(EnvironmentContext.prototype,\n  'variables', {\n    get: function() {\n      if (!this._variables) {\n        this._variables = new VariableList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._variables;\n    }\n});\n\nObject.defineProperty(EnvironmentContext.prototype,\n  'deployments', {\n    get: function() {\n      if (!this._deployments) {\n        this._deployments = new DeploymentList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._deployments;\n    }\n});\n\nObject.defineProperty(EnvironmentContext.prototype,\n  'logs', {\n    get: function() {\n      if (!this._logs) {\n        this._logs = new LogList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._logs;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.EnvironmentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEnvironmentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEnvironmentContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EnvironmentList: EnvironmentList,\n  EnvironmentPage: EnvironmentPage,\n  EnvironmentInstance: EnvironmentInstance,\n  EnvironmentContext: EnvironmentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar FunctionVersionContentList;\nvar FunctionVersionContentPage;\nvar FunctionVersionContentInstance;\nvar FunctionVersionContentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionVersionContentList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Function Version resource is associated with\n * @param {string} functionSid -\n *          The SID of the Function that is the parent of the Function Version\n * @param {string} sid -\n *          The unique string that identifies the Function Version resource\n */\n/* jshint ignore:end */\nFunctionVersionContentList = function FunctionVersionContentList(version,\n    serviceSid, functionSid, sid) {\n  /* jshint ignore:start */\n  /**\n   * @function functionVersionContent\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentContext}\n   */\n  /* jshint ignore:end */\n  function FunctionVersionContentListInstance(sid) {\n    return FunctionVersionContentListInstance.get(sid);\n  }\n\n  FunctionVersionContentListInstance._version = version;\n  // Path Solution\n  FunctionVersionContentListInstance._solution = {\n    serviceSid: serviceSid,\n    functionSid: functionSid,\n    sid: sid\n  };\n  /* jshint ignore:start */\n  /**\n   * Constructs a function_version_content\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentList#\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentContext}\n   */\n  /* jshint ignore:end */\n  FunctionVersionContentListInstance.get = function get() {\n    return new FunctionVersionContentContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.functionSid,\n      this._solution.sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FunctionVersionContentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FunctionVersionContentListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FunctionVersionContentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionVersionContentPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FunctionVersionContentSolution} solution - Path solution\n *\n * @returns FunctionVersionContentPage\n */\n/* jshint ignore:end */\nFunctionVersionContentPage = function FunctionVersionContentPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FunctionVersionContentPage.prototype, Page.prototype);\nFunctionVersionContentPage.prototype.constructor = FunctionVersionContentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FunctionVersionContentInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentPage#\n *\n * @param {FunctionVersionContentPayload} payload - Payload response from the API\n *\n * @returns FunctionVersionContentInstance\n */\n/* jshint ignore:end */\nFunctionVersionContentPage.prototype.getInstance = function getInstance(payload)\n    {\n  return new FunctionVersionContentInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.functionSid,\n    this._solution.sid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFunctionVersionContentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFunctionVersionContentPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionVersionContentContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Function Version resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Function Version resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Function Version resource is associated with\n * @property {string} functionSid -\n *          The SID of the Function that is the parent of the Function Version\n * @property {string} content - The content of the Function Version resource\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {FunctionVersionContentPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Function Version resource is associated with\n * @param {sid} functionSid -\n *          The SID of the Function that is the parent of the Function Version\n * @param {sid} sid -\n *          The unique string that identifies the Function Version resource\n */\n/* jshint ignore:end */\nFunctionVersionContentInstance = function\n    FunctionVersionContentInstance(version, payload, serviceSid, functionSid,\n    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.functionSid = payload.function_sid; // jshint ignore:line\n  this.content = payload.content; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, functionSid: functionSid, sid: sid, };\n};\n\nObject.defineProperty(FunctionVersionContentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FunctionVersionContentContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.functionSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FunctionVersionContentInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionVersionContentInstance\n */\n/* jshint ignore:end */\nFunctionVersionContentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFunctionVersionContentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFunctionVersionContentInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionVersionContentContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Function Version content from\n * @param {sid} functionSid -\n *          The SID of the Function that is the parent of the Function Version content to fetch\n * @param {sid} sid - The SID that identifies the Function Version content to fetch\n */\n/* jshint ignore:end */\nFunctionVersionContentContext = function FunctionVersionContentContext(version,\n    serviceSid, functionSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, functionSid: functionSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Functions/${functionSid}/Versions/${sid}/Content`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FunctionVersionContentInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionVersionContentInstance\n */\n/* jshint ignore:end */\nFunctionVersionContentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FunctionVersionContentInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.functionSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFunctionVersionContentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFunctionVersionContentContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FunctionVersionContentList: FunctionVersionContentList,\n  FunctionVersionContentPage: FunctionVersionContentPage,\n  FunctionVersionContentInstance: FunctionVersionContentInstance,\n  FunctionVersionContentContext: FunctionVersionContentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar FunctionVersionContentList = require(\n    './functionVersion/functionVersionContent').FunctionVersionContentList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar FunctionVersionList;\nvar FunctionVersionPage;\nvar FunctionVersionInstance;\nvar FunctionVersionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionVersionList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Function Version resource is associated with\n * @param {string} functionSid -\n *          The SID of the Function resource that is the parent of the Function Version resource\n */\n/* jshint ignore:end */\nFunctionVersionList = function FunctionVersionList(version, serviceSid,\n                                                    functionSid) {\n  /* jshint ignore:start */\n  /**\n   * @function functionVersions\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext}\n   */\n  /* jshint ignore:end */\n  function FunctionVersionListInstance(sid) {\n    return FunctionVersionListInstance.get(sid);\n  }\n\n  FunctionVersionListInstance._version = version;\n  // Path Solution\n  FunctionVersionListInstance._solution = {serviceSid: serviceSid, functionSid: functionSid};\n  FunctionVersionListInstance._uri = `/Services/${serviceSid}/Functions/${functionSid}/Versions`;\n  /* jshint ignore:start */\n  /**\n   * Streams FunctionVersionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FunctionVersionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FunctionVersionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FunctionVersionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FunctionVersionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FunctionVersionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FunctionVersionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FunctionVersionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FunctionVersionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FunctionVersionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a function_version\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionList#\n   *\n   * @param {string} sid -\n   *          The SID that identifies the Function Version resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext}\n   */\n  /* jshint ignore:end */\n  FunctionVersionListInstance.get = function get(sid) {\n    return new FunctionVersionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.functionSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FunctionVersionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FunctionVersionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FunctionVersionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionVersionPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FunctionVersionSolution} solution - Path solution\n *\n * @returns FunctionVersionPage\n */\n/* jshint ignore:end */\nFunctionVersionPage = function FunctionVersionPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FunctionVersionPage.prototype, Page.prototype);\nFunctionVersionPage.prototype.constructor = FunctionVersionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FunctionVersionInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionPage#\n *\n * @param {FunctionVersionPayload} payload - Payload response from the API\n *\n * @returns FunctionVersionInstance\n */\n/* jshint ignore:end */\nFunctionVersionPage.prototype.getInstance = function getInstance(payload) {\n  return new FunctionVersionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.functionSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFunctionVersionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFunctionVersionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionVersionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Function Version resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Function Version resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Function Version resource is associated with\n * @property {string} functionSid -\n *          The SID of the Function resource that is the parent of the Function Version resource\n * @property {string} path -\n *          The URL-friendly string by which the Function Version resource can be referenced\n * @property {function_version.visibility} visibility -\n *          The access control that determines how the Function Version resource can be accessed\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Function Version resource was created\n * @property {string} url - The absolute URL of the Function Version resource\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {FunctionVersionPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Function Version resource is associated with\n * @param {sid} functionSid -\n *          The SID of the Function resource that is the parent of the Function Version resource\n * @param {sid} sid -\n *          The SID that identifies the Function Version resource to fetch\n */\n/* jshint ignore:end */\nFunctionVersionInstance = function FunctionVersionInstance(version, payload,\n                                                            serviceSid,\n                                                            functionSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.functionSid = payload.function_sid; // jshint ignore:line\n  this.path = payload.path; // jshint ignore:line\n  this.visibility = payload.visibility; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, functionSid: functionSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FunctionVersionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FunctionVersionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.functionSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FunctionVersionInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionVersionInstance\n */\n/* jshint ignore:end */\nFunctionVersionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the functionVersionContent\n *\n * @function functionVersionContent\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentList}\n */\n/* jshint ignore:end */\nFunctionVersionInstance.prototype.functionVersionContent = function\n    functionVersionContent() {\n  return this._proxy.functionVersionContent;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFunctionVersionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFunctionVersionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionVersionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext\n *\n * @property {Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext.FunctionVersionContentList} functionVersionContent -\n *          functionVersionContent resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Function Version resource from\n * @param {sid} functionSid -\n *          The SID of the function that is the parent of the Function Version resource to fetch\n * @param {sid} sid -\n *          The SID that identifies the Function Version resource to fetch\n */\n/* jshint ignore:end */\nFunctionVersionContext = function FunctionVersionContext(version, serviceSid,\n                                                          functionSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, functionSid: functionSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Functions/${functionSid}/Versions/${sid}`;\n\n  // Dependents\n  this._functionVersionContent = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FunctionVersionInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionVersionInstance\n */\n/* jshint ignore:end */\nFunctionVersionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FunctionVersionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.functionSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(FunctionVersionContext.prototype,\n  'functionVersionContent', {\n    get: function() {\n      if (!this._functionVersionContent) {\n        this._functionVersionContent = new FunctionVersionContentList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.functionSid,\n          this._solution.sid\n        );\n      }\n      return this._functionVersionContent;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFunctionVersionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFunctionVersionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FunctionVersionList: FunctionVersionList,\n  FunctionVersionPage: FunctionVersionPage,\n  FunctionVersionInstance: FunctionVersionInstance,\n  FunctionVersionContext: FunctionVersionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar FunctionVersionList = require(\n    './function/functionVersion').FunctionVersionList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar FunctionList;\nvar FunctionPage;\nvar FunctionInstance;\nvar FunctionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the Function resource is associated with\n */\n/* jshint ignore:end */\nFunctionList = function FunctionList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function functions\n   * @memberof Twilio.Serverless.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.FunctionContext}\n   */\n  /* jshint ignore:end */\n  function FunctionListInstance(sid) {\n    return FunctionListInstance.get(sid);\n  }\n\n  FunctionListInstance._version = version;\n  // Path Solution\n  FunctionListInstance._solution = {serviceSid: serviceSid};\n  FunctionListInstance._uri = `/Services/${serviceSid}/Functions`;\n  /* jshint ignore:start */\n  /**\n   * Streams FunctionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FunctionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FunctionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FunctionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FunctionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FunctionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FunctionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FunctionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FunctionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FunctionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a FunctionInstance\n   *\n   * @function create\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the Function resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FunctionInstance\n   */\n  /* jshint ignore:end */\n  FunctionListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FunctionInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a function\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionList#\n   *\n   * @param {string} sid - The SID of the Function resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext.FunctionContext}\n   */\n  /* jshint ignore:end */\n  FunctionListInstance.get = function get(sid) {\n    return new FunctionContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceContext.FunctionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FunctionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FunctionListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FunctionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FunctionSolution} solution - Path solution\n *\n * @returns FunctionPage\n */\n/* jshint ignore:end */\nFunctionPage = function FunctionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FunctionPage.prototype, Page.prototype);\nFunctionPage.prototype.constructor = FunctionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FunctionInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionPage#\n *\n * @param {FunctionPayload} payload - Payload response from the API\n *\n * @returns FunctionInstance\n */\n/* jshint ignore:end */\nFunctionPage.prototype.getInstance = function getInstance(payload) {\n  return new FunctionInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFunctionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFunctionPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionInstance\n *\n * @property {string} sid - The unique string that identifies the Function resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Function resource\n * @property {string} serviceSid -\n *          The SID of the Service that the Function resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Function resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Function resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Function resource was last updated\n * @property {string} url - The absolute URL of the Function resource\n * @property {string} links - The URLs of nested resources of the Function resource\n *\n * @param {V1} version - Version of the resource\n * @param {FunctionPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the Function resource is associated with\n * @param {sid} sid - The SID of the Function resource to fetch\n */\n/* jshint ignore:end */\nFunctionInstance = function FunctionInstance(version, payload, serviceSid, sid)\n                                              {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FunctionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FunctionContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FunctionInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionInstance\n */\n/* jshint ignore:end */\nFunctionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FunctionInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionInstance\n */\n/* jshint ignore:end */\nFunctionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FunctionInstance\n *\n * @function update\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - A string to describe the Function resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionInstance\n */\n/* jshint ignore:end */\nFunctionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the functionVersions\n *\n * @function functionVersions\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionList}\n */\n/* jshint ignore:end */\nFunctionInstance.prototype.functionVersions = function functionVersions() {\n  return this._proxy.functionVersions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFunctionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFunctionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FunctionContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext.FunctionContext\n *\n * @property {Twilio.Serverless.V1.ServiceContext.FunctionContext.FunctionVersionList} functionVersions -\n *          functionVersions resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Service to fetch the Function resource from\n * @param {sid} sid - The SID of the Function resource to fetch\n */\n/* jshint ignore:end */\nFunctionContext = function FunctionContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Functions/${sid}`;\n\n  // Dependents\n  this._functionVersions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FunctionInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionInstance\n */\n/* jshint ignore:end */\nFunctionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FunctionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FunctionInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionInstance\n */\n/* jshint ignore:end */\nFunctionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FunctionInstance\n *\n * @function update\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - A string to describe the Function resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FunctionInstance\n */\n/* jshint ignore:end */\nFunctionContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['friendlyName'])) {\n    throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FunctionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(FunctionContext.prototype,\n  'functionVersions', {\n    get: function() {\n      if (!this._functionVersions) {\n        this._functionVersions = new FunctionVersionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._functionVersions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext.FunctionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFunctionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFunctionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FunctionList: FunctionList,\n  FunctionPage: FunctionPage,\n  FunctionInstance: FunctionInstance,\n  FunctionContext: FunctionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AssetList = require('./service/asset').AssetList;\nvar BuildList = require('./service/build').BuildList;\nvar EnvironmentList = require('./service/environment').EnvironmentList;\nvar FunctionList = require('./service/function').FunctionList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceList\n *\n * @param {Twilio.Serverless.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Serverless.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Serverless.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Serverless.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Serverless.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Serverless.V1.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Serverless.V1.ServiceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.uniqueName -\n   *          A user-defined string that uniquely identifies the Service resource\n   * @param {string} opts.friendlyName - A string to describe the Service resource\n   * @param {boolean} [opts.includeCredentials] -\n   *          Whether to inject Account credentials into a function invocation context\n   * @param {boolean} [opts.uiEditable] -\n   *          Whether the Service's properties and subresources can be edited via the UI\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'IncludeCredentials': serialize.bool(_.get(opts, 'includeCredentials')),\n      'UiEditable': serialize.bool(_.get(opts, 'uiEditable'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Serverless.V1.ServiceList#\n   *\n   * @param {string} sid - The SID of the Service resource to fetch\n   *\n   * @returns {Twilio.Serverless.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Serverless.V1.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServicePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Serverless.V1.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceInstance\n *\n * @property {string} sid - The unique string that identifies the Service resource\n * @property {string} accountSid -\n *          The SID of the Account that created the Service resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Service resource\n * @property {string} uniqueName -\n *          A user-defined string that uniquely identifies the Service resource\n * @property {boolean} includeCredentials -\n *          Whether to inject Account credentials into a function invocation context\n * @property {boolean} uiEditable -\n *          Whether the Service resource's properties and subresources can be edited via the UI\n * @property {string} domainBase -\n *          The base domain name for this Service, which is a combination of the unique name and a randomly generated string\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Service resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Service resource was last updated\n * @property {string} url - The absolute URL of the Service resource\n * @property {string} links - The URLs of the Service's nested resources\n *\n * @param {V1} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid_like} sid - The SID of the Service resource to fetch\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.includeCredentials = payload.include_credentials; // jshint ignore:line\n  this.uiEditable = payload.ui_editable; // jshint ignore:line\n  this.domainBase = payload.domain_base; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Serverless.V1.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.includeCredentials] -\n *          Whether to inject Account credentials into a function invocation context\n * @param {string} [opts.friendlyName] - A string to describe the Service resource\n * @param {boolean} [opts.uiEditable] -\n *          Whether the Service resource's properties and subresources can be edited via the UI\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the environments\n *\n * @function environments\n * @memberof Twilio.Serverless.V1.ServiceInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.EnvironmentList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.environments = function environments() {\n  return this._proxy.environments;\n};\n\n/* jshint ignore:start */\n/**\n * Access the functions\n *\n * @function functions\n * @memberof Twilio.Serverless.V1.ServiceInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.FunctionList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.functions = function functions() {\n  return this._proxy.functions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the assets\n *\n * @function assets\n * @memberof Twilio.Serverless.V1.ServiceInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.AssetList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.assets = function assets() {\n  return this._proxy.assets;\n};\n\n/* jshint ignore:start */\n/**\n * Access the builds\n *\n * @function builds\n * @memberof Twilio.Serverless.V1.ServiceInstance#\n *\n * @returns {Twilio.Serverless.V1.ServiceContext.BuildList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.builds = function builds() {\n  return this._proxy.builds;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Serverless.V1.ServiceContext\n *\n * @property {Twilio.Serverless.V1.ServiceContext.EnvironmentList} environments -\n *          environments resource\n * @property {Twilio.Serverless.V1.ServiceContext.FunctionList} functions -\n *          functions resource\n * @property {Twilio.Serverless.V1.ServiceContext.AssetList} assets -\n *          assets resource\n * @property {Twilio.Serverless.V1.ServiceContext.BuildList} builds -\n *          builds resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID of the Service resource to fetch\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._environments = undefined;\n  this._functions = undefined;\n  this._assets = undefined;\n  this._builds = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Serverless.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Serverless.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Serverless.V1.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.includeCredentials] -\n *          Whether to inject Account credentials into a function invocation context\n * @param {string} [opts.friendlyName] - A string to describe the Service resource\n * @param {boolean} [opts.uiEditable] -\n *          Whether the Service resource's properties and subresources can be edited via the UI\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'IncludeCredentials': serialize.bool(_.get(opts, 'includeCredentials')),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'UiEditable': serialize.bool(_.get(opts, 'uiEditable'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'environments', {\n    get: function() {\n      if (!this._environments) {\n        this._environments = new EnvironmentList(this._version, this._solution.sid);\n      }\n      return this._environments;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'functions', {\n    get: function() {\n      if (!this._functions) {\n        this._functions = new FunctionList(this._version, this._solution.sid);\n      }\n      return this._functions;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'assets', {\n    get: function() {\n      if (!this._assets) {\n        this._assets = new AssetList(this._version, this._solution.sid);\n      }\n      return this._assets;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'builds', {\n    get: function() {\n      if (!this._builds) {\n        this._builds = new BuildList(this._version, this._solution.sid);\n      }\n      return this._builds;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Serverless.V1.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar ServiceList = require('./v1/service').ServiceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Serverless\n *\n * @constructor Twilio.Serverless.V1\n *\n * @property {Twilio.Serverless.V1.ServiceList} services - services resource\n *\n * @param {Twilio.Serverless} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._services = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./serverless/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize serverless domain\n *\n * @constructor Twilio.Serverless\n *\n * @property {Twilio.Serverless.V1} v1 - v1 version\n * @property {Twilio.Serverless.V1.ServiceList} services - services resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Serverless(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://serverless.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Serverless.prototype, Domain.prototype);\nServerless.prototype.constructor = Serverless;\n\nObject.defineProperty(Serverless.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Serverless.prototype,\n  'services', {\n    get: function() {\n      return this.v1.services;\n    }\n});\n\nmodule.exports = Serverless;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar EngagementContextList;\nvar EngagementContextPage;\nvar EngagementContextInstance;\nvar EngagementContextContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EngagementContextList\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextList\n *\n * @param {Twilio.Studio.V1} version - Version of the resource\n * @param {string} flowSid - Flow SID\n * @param {string} engagementSid - Engagement SID\n */\n/* jshint ignore:end */\nEngagementContextList = function EngagementContextList(version, flowSid,\n                                                        engagementSid) {\n  /* jshint ignore:start */\n  /**\n   * @function engagementContext\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextContext}\n   */\n  /* jshint ignore:end */\n  function EngagementContextListInstance(sid) {\n    return EngagementContextListInstance.get(sid);\n  }\n\n  EngagementContextListInstance._version = version;\n  // Path Solution\n  EngagementContextListInstance._solution = {flowSid: flowSid, engagementSid: engagementSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a engagement_context\n   *\n   * @function get\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextList#\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextContext}\n   */\n  /* jshint ignore:end */\n  EngagementContextListInstance.get = function get() {\n    return new EngagementContextContext(\n      this._version,\n      this._solution.flowSid,\n      this._solution.engagementSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EngagementContextListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EngagementContextListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EngagementContextListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EngagementContextPage\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EngagementContextSolution} solution - Path solution\n *\n * @returns EngagementContextPage\n */\n/* jshint ignore:end */\nEngagementContextPage = function EngagementContextPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EngagementContextPage.prototype, Page.prototype);\nEngagementContextPage.prototype.constructor = EngagementContextPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EngagementContextInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextPage#\n *\n * @param {EngagementContextPayload} payload - Payload response from the API\n *\n * @returns EngagementContextInstance\n */\n/* jshint ignore:end */\nEngagementContextPage.prototype.getInstance = function getInstance(payload) {\n  return new EngagementContextInstance(\n    this._version,\n    payload,\n    this._solution.flowSid,\n    this._solution.engagementSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEngagementContextPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEngagementContextPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EngagementContextContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextInstance\n *\n * @property {string} accountSid - Account SID\n * @property {object} context - Flow state\n * @property {string} engagementSid - Engagement SID\n * @property {string} flowSid - Flow SID\n * @property {string} url - The URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {EngagementContextPayload} payload - The instance payload\n * @param {sid} flowSid - Flow SID\n * @param {sid} engagementSid - Engagement SID\n */\n/* jshint ignore:end */\nEngagementContextInstance = function EngagementContextInstance(version, payload,\n    flowSid, engagementSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.engagementSid = payload.engagement_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, engagementSid: engagementSid, };\n};\n\nObject.defineProperty(EngagementContextInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EngagementContextContext(\n          this._version,\n          this._solution.flowSid,\n          this._solution.engagementSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EngagementContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EngagementContextInstance\n */\n/* jshint ignore:end */\nEngagementContextInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEngagementContextInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEngagementContextInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EngagementContextContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} flowSid - Flow SID\n * @param {sid} engagementSid - Engagement SID\n */\n/* jshint ignore:end */\nEngagementContextContext = function EngagementContextContext(version, flowSid,\n    engagementSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, engagementSid: engagementSid, };\n  this._uri = `/Flows/${flowSid}/Engagements/${engagementSid}/Context`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EngagementContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EngagementContextInstance\n */\n/* jshint ignore:end */\nEngagementContextContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EngagementContextInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.engagementSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEngagementContextContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEngagementContextContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EngagementContextList: EngagementContextList,\n  EngagementContextPage: EngagementContextPage,\n  EngagementContextInstance: EngagementContextInstance,\n  EngagementContextContext: EngagementContextContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar StepContextList;\nvar StepContextPage;\nvar StepContextInstance;\nvar StepContextContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the StepContextList\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextList\n *\n * @param {Twilio.Studio.V1} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n * @param {string} engagementSid - The SID of the Engagement\n * @param {string} stepSid - Step SID\n */\n/* jshint ignore:end */\nStepContextList = function StepContextList(version, flowSid, engagementSid,\n                                            stepSid) {\n  /* jshint ignore:start */\n  /**\n   * @function stepContext\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextContext}\n   */\n  /* jshint ignore:end */\n  function StepContextListInstance(sid) {\n    return StepContextListInstance.get(sid);\n  }\n\n  StepContextListInstance._version = version;\n  // Path Solution\n  StepContextListInstance._solution = {\n    flowSid: flowSid,\n    engagementSid: engagementSid,\n    stepSid: stepSid\n  };\n  /* jshint ignore:start */\n  /**\n   * Constructs a step_context\n   *\n   * @function get\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextList#\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextContext}\n   */\n  /* jshint ignore:end */\n  StepContextListInstance.get = function get() {\n    return new StepContextContext(\n      this._version,\n      this._solution.flowSid,\n      this._solution.engagementSid,\n      this._solution.stepSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  StepContextListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  StepContextListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return StepContextListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StepContextPage\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {StepContextSolution} solution - Path solution\n *\n * @returns StepContextPage\n */\n/* jshint ignore:end */\nStepContextPage = function StepContextPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(StepContextPage.prototype, Page.prototype);\nStepContextPage.prototype.constructor = StepContextPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of StepContextInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextPage#\n *\n * @param {StepContextPayload} payload - Payload response from the API\n *\n * @returns StepContextInstance\n */\n/* jshint ignore:end */\nStepContextPage.prototype.getInstance = function getInstance(payload) {\n  return new StepContextInstance(\n    this._version,\n    payload,\n    this._solution.flowSid,\n    this._solution.engagementSid,\n    this._solution.stepSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStepContextPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStepContextPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StepContextContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} context - The current state of the flow\n * @property {string} engagementSid - The SID of the Engagement\n * @property {string} flowSid - The SID of the Flow\n * @property {string} stepSid - Step SID\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {StepContextPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} engagementSid - The SID of the Engagement\n * @param {sid} stepSid - Step SID\n */\n/* jshint ignore:end */\nStepContextInstance = function StepContextInstance(version, payload, flowSid,\n                                                    engagementSid, stepSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.engagementSid = payload.engagement_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.stepSid = payload.step_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, engagementSid: engagementSid, stepSid: stepSid, };\n};\n\nObject.defineProperty(StepContextInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new StepContextContext(\n          this._version,\n          this._solution.flowSid,\n          this._solution.engagementSid,\n          this._solution.stepSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a StepContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StepContextInstance\n */\n/* jshint ignore:end */\nStepContextInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStepContextInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStepContextInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StepContextContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} engagementSid - The SID of the Engagement\n * @param {sid} stepSid - Step SID\n */\n/* jshint ignore:end */\nStepContextContext = function StepContextContext(version, flowSid,\n                                                  engagementSid, stepSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, engagementSid: engagementSid, stepSid: stepSid, };\n  this._uri = `/Flows/${flowSid}/Engagements/${engagementSid}/Steps/${stepSid}/Context`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a StepContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StepContextInstance\n */\n/* jshint ignore:end */\nStepContextContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new StepContextInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.engagementSid,\n      this._solution.stepSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStepContextContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nStepContextContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  StepContextList: StepContextList,\n  StepContextPage: StepContextPage,\n  StepContextInstance: StepContextInstance,\n  StepContextContext: StepContextContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar StepContextList = require('./step/stepContext').StepContextList;\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar StepList;\nvar StepPage;\nvar StepInstance;\nvar StepContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the StepList\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.StepList\n *\n * @param {Twilio.Studio.V1} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n * @param {string} engagementSid - The SID of the Engagement\n */\n/* jshint ignore:end */\nStepList = function StepList(version, flowSid, engagementSid) {\n  /* jshint ignore:start */\n  /**\n   * @function steps\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.EngagementContext.StepContext}\n   */\n  /* jshint ignore:end */\n  function StepListInstance(sid) {\n    return StepListInstance.get(sid);\n  }\n\n  StepListInstance._version = version;\n  // Path Solution\n  StepListInstance._solution = {flowSid: flowSid, engagementSid: engagementSid};\n  StepListInstance._uri = `/Flows/${flowSid}/Engagements/${engagementSid}/Steps`;\n  /* jshint ignore:start */\n  /**\n   * Streams StepInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  StepListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists StepInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  StepListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of StepInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  StepListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new StepPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of StepInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  StepListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new StepPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a step\n   *\n   * @function get\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.EngagementContext.StepContext}\n   */\n  /* jshint ignore:end */\n  StepListInstance.get = function get(sid) {\n    return new StepContext(this._version, this._solution.flowSid, this._solution.engagementSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  StepListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  StepListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return StepListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StepPage\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.StepPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {StepSolution} solution - Path solution\n *\n * @returns StepPage\n */\n/* jshint ignore:end */\nStepPage = function StepPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(StepPage.prototype, Page.prototype);\nStepPage.prototype.constructor = StepPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of StepInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepPage#\n *\n * @param {StepPayload} payload - Payload response from the API\n *\n * @returns StepInstance\n */\n/* jshint ignore:end */\nStepPage.prototype.getInstance = function getInstance(payload) {\n  return new StepInstance(\n    this._version,\n    payload,\n    this._solution.flowSid,\n    this._solution.engagementSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStepPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStepPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StepContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.StepInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} flowSid - The SID of the Flow\n * @property {string} engagementSid - The SID of the Engagement\n * @property {string} name -\n *          The event that caused the Flow to transition to the Step\n * @property {object} context - The current state of the flow\n * @property {string} transitionedFrom -\n *          The Widget that preceded the Widget for the Step\n * @property {string} transitionedTo -\n *          The Widget that will follow the Widget for the Step\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {StepPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} engagementSid - The SID of the Engagement\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nStepInstance = function StepInstance(version, payload, flowSid, engagementSid,\n                                      sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.engagementSid = payload.engagement_sid; // jshint ignore:line\n  this.name = payload.name; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.transitionedFrom = payload.transitioned_from; // jshint ignore:line\n  this.transitionedTo = payload.transitioned_to; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, engagementSid: engagementSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(StepInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new StepContext(\n          this._version,\n          this._solution.flowSid,\n          this._solution.engagementSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a StepInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StepInstance\n */\n/* jshint ignore:end */\nStepInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the stepContext\n *\n * @function stepContext\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepInstance#\n *\n * @returns {Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextList}\n */\n/* jshint ignore:end */\nStepInstance.prototype.stepContext = function stepContext() {\n  return this._proxy.stepContext;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStepInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStepInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StepContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext.StepContext\n *\n * @property {Twilio.Studio.V1.FlowContext.EngagementContext.StepContext.StepContextList} stepContext -\n *          stepContext resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} engagementSid - The SID of the Engagement\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nStepContext = function StepContext(version, flowSid, engagementSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, engagementSid: engagementSid, sid: sid, };\n  this._uri = `/Flows/${flowSid}/Engagements/${engagementSid}/Steps/${sid}`;\n\n  // Dependents\n  this._stepContext = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a StepInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed StepInstance\n */\n/* jshint ignore:end */\nStepContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new StepInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.engagementSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(StepContext.prototype,\n  'stepContext', {\n    get: function() {\n      if (!this._stepContext) {\n        this._stepContext = new StepContextList(\n          this._version,\n          this._solution.flowSid,\n          this._solution.engagementSid,\n          this._solution.sid\n        );\n      }\n      return this._stepContext;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext.StepContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStepContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nStepContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  StepList: StepList,\n  StepPage: StepPage,\n  StepInstance: StepInstance,\n  StepContext: StepContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar EngagementContextList = require(\n    './engagement/engagementContext').EngagementContextList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar StepList = require('./engagement/step').StepList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar EngagementList;\nvar EngagementPage;\nvar EngagementInstance;\nvar EngagementContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EngagementList\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementList\n *\n * @param {Twilio.Studio.V1} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n */\n/* jshint ignore:end */\nEngagementList = function EngagementList(version, flowSid) {\n  /* jshint ignore:start */\n  /**\n   * @function engagements\n   * @memberof Twilio.Studio.V1.FlowContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.EngagementContext}\n   */\n  /* jshint ignore:end */\n  function EngagementListInstance(sid) {\n    return EngagementListInstance.get(sid);\n  }\n\n  EngagementListInstance._version = version;\n  // Path Solution\n  EngagementListInstance._solution = {flowSid: flowSid};\n  EngagementListInstance._uri = `/Flows/${flowSid}/Engagements`;\n  /* jshint ignore:start */\n  /**\n   * Streams EngagementInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EngagementListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EngagementInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EngagementListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EngagementInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EngagementListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EngagementPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EngagementInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EngagementListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EngagementPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a EngagementInstance\n   *\n   * @function create\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.to -\n   *          The Contact phone number to start a Studio Flow Engagement\n   * @param {string} opts.from -\n   *          The Twilio phone number to send messages or initiate calls from during the Flow Engagement\n   * @param {object} [opts.parameters] -\n   *          A JSON string we will add to your flow's context and that you can access as variables inside your flow\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed EngagementInstance\n   */\n  /* jshint ignore:end */\n  EngagementListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['to'])) {\n      throw new Error('Required parameter \"opts[\\'to\\']\" missing.');\n    }\n    if (_.isUndefined(opts['from'])) {\n      throw new Error('Required parameter \"opts[\\'from\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'To': _.get(opts, 'to'),\n      'From': _.get(opts, 'from'),\n      'Parameters': serialize.object(_.get(opts, 'parameters'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EngagementInstance(\n        this._version,\n        payload,\n        this._solution.flowSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a engagement\n   *\n   * @function get\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementList#\n   *\n   * @param {string} sid - The SID of the Engagement resource to fetch\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.EngagementContext}\n   */\n  /* jshint ignore:end */\n  EngagementListInstance.get = function get(sid) {\n    return new EngagementContext(this._version, this._solution.flowSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V1.FlowContext.EngagementList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EngagementListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EngagementListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EngagementListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EngagementPage\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EngagementSolution} solution - Path solution\n *\n * @returns EngagementPage\n */\n/* jshint ignore:end */\nEngagementPage = function EngagementPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EngagementPage.prototype, Page.prototype);\nEngagementPage.prototype.constructor = EngagementPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EngagementInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V1.FlowContext.EngagementPage#\n *\n * @param {EngagementPayload} payload - Payload response from the API\n *\n * @returns EngagementInstance\n */\n/* jshint ignore:end */\nEngagementPage.prototype.getInstance = function getInstance(payload) {\n  return new EngagementInstance(this._version, payload, this._solution.flowSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEngagementPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEngagementPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EngagementContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} flowSid - The SID of the Flow\n * @property {string} contactSid - The SID of the Contact\n * @property {string} contactChannelAddress -\n *          The phone number, SIP address or Client identifier that triggered this Engagement\n * @property {object} context - The current state of the execution flow\n * @property {engagement.status} status - The status of the Engagement\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Engagement was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Engagement was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of the Engagement's nested resources\n *\n * @param {V1} version - Version of the resource\n * @param {EngagementPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} sid - The SID of the Engagement resource to fetch\n */\n/* jshint ignore:end */\nEngagementInstance = function EngagementInstance(version, payload, flowSid, sid)\n                                                  {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.contactSid = payload.contact_sid; // jshint ignore:line\n  this.contactChannelAddress = payload.contact_channel_address; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(EngagementInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EngagementContext(this._version, this._solution.flowSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EngagementInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.EngagementInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EngagementInstance\n */\n/* jshint ignore:end */\nEngagementInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a EngagementInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V1.FlowContext.EngagementInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EngagementInstance\n */\n/* jshint ignore:end */\nEngagementInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the steps\n *\n * @function steps\n * @memberof Twilio.Studio.V1.FlowContext.EngagementInstance#\n *\n * @returns {Twilio.Studio.V1.FlowContext.EngagementContext.StepList}\n */\n/* jshint ignore:end */\nEngagementInstance.prototype.steps = function steps() {\n  return this._proxy.steps;\n};\n\n/* jshint ignore:start */\n/**\n * Access the engagementContext\n *\n * @function engagementContext\n * @memberof Twilio.Studio.V1.FlowContext.EngagementInstance#\n *\n * @returns {Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextList}\n */\n/* jshint ignore:end */\nEngagementInstance.prototype.engagementContext = function engagementContext() {\n  return this._proxy.engagementContext;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEngagementInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEngagementInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EngagementContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.EngagementContext\n *\n * @property {Twilio.Studio.V1.FlowContext.EngagementContext.StepList} steps -\n *          steps resource\n * @property {Twilio.Studio.V1.FlowContext.EngagementContext.EngagementContextList} engagementContext -\n *          engagementContext resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} flowSid - Flow SID\n * @param {sid} sid - The SID of the Engagement resource to fetch\n */\n/* jshint ignore:end */\nEngagementContext = function EngagementContext(version, flowSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, sid: sid, };\n  this._uri = `/Flows/${flowSid}/Engagements/${sid}`;\n\n  // Dependents\n  this._steps = undefined;\n  this._engagementContext = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EngagementInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EngagementInstance\n */\n/* jshint ignore:end */\nEngagementContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EngagementInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a EngagementInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EngagementInstance\n */\n/* jshint ignore:end */\nEngagementContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(EngagementContext.prototype,\n  'steps', {\n    get: function() {\n      if (!this._steps) {\n        this._steps = new StepList(this._version, this._solution.flowSid, this._solution.sid);\n      }\n      return this._steps;\n    }\n});\n\nObject.defineProperty(EngagementContext.prototype,\n  'engagementContext', {\n    get: function() {\n      if (!this._engagementContext) {\n        this._engagementContext = new EngagementContextList(\n          this._version,\n          this._solution.flowSid,\n          this._solution.sid\n        );\n      }\n      return this._engagementContext;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.EngagementContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEngagementContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEngagementContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EngagementList: EngagementList,\n  EngagementPage: EngagementPage,\n  EngagementInstance: EngagementInstance,\n  EngagementContext: EngagementContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ExecutionContextList;\nvar ExecutionContextPage;\nvar ExecutionContextInstance;\nvar ExecutionContextContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContextList\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextList\n *\n * @param {Twilio.Studio.V1} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n * @param {string} executionSid - The SID of the Execution\n */\n/* jshint ignore:end */\nExecutionContextList = function ExecutionContextList(version, flowSid,\n                                                      executionSid) {\n  /* jshint ignore:start */\n  /**\n   * @function executionContext\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextContext}\n   */\n  /* jshint ignore:end */\n  function ExecutionContextListInstance(sid) {\n    return ExecutionContextListInstance.get(sid);\n  }\n\n  ExecutionContextListInstance._version = version;\n  // Path Solution\n  ExecutionContextListInstance._solution = {flowSid: flowSid, executionSid: executionSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a execution_context\n   *\n   * @function get\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextList#\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextContext}\n   */\n  /* jshint ignore:end */\n  ExecutionContextListInstance.get = function get() {\n    return new ExecutionContextContext(\n      this._version,\n      this._solution.flowSid,\n      this._solution.executionSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExecutionContextListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExecutionContextListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExecutionContextListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContextPage\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExecutionContextSolution} solution - Path solution\n *\n * @returns ExecutionContextPage\n */\n/* jshint ignore:end */\nExecutionContextPage = function ExecutionContextPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExecutionContextPage.prototype, Page.prototype);\nExecutionContextPage.prototype.constructor = ExecutionContextPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExecutionContextInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextPage#\n *\n * @param {ExecutionContextPayload} payload - Payload response from the API\n *\n * @returns ExecutionContextInstance\n */\n/* jshint ignore:end */\nExecutionContextPage.prototype.getInstance = function getInstance(payload) {\n  return new ExecutionContextInstance(\n    this._version,\n    payload,\n    this._solution.flowSid,\n    this._solution.executionSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionContextPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionContextPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContextContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} context - The current state of the flow\n * @property {string} flowSid - The SID of the Flow\n * @property {string} executionSid - The SID of the Execution\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {ExecutionContextPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n */\n/* jshint ignore:end */\nExecutionContextInstance = function ExecutionContextInstance(version, payload,\n    flowSid, executionSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.executionSid = payload.execution_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, executionSid: executionSid, };\n};\n\nObject.defineProperty(ExecutionContextInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExecutionContextContext(\n          this._version,\n          this._solution.flowSid,\n          this._solution.executionSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionContextInstance\n */\n/* jshint ignore:end */\nExecutionContextInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionContextInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionContextInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContextContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n */\n/* jshint ignore:end */\nExecutionContextContext = function ExecutionContextContext(version, flowSid,\n                                                            executionSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, executionSid: executionSid, };\n  this._uri = `/Flows/${flowSid}/Executions/${executionSid}/Context`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionContextInstance\n */\n/* jshint ignore:end */\nExecutionContextContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionContextInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.executionSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionContextContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExecutionContextContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExecutionContextList: ExecutionContextList,\n  ExecutionContextPage: ExecutionContextPage,\n  ExecutionContextInstance: ExecutionContextInstance,\n  ExecutionContextContext: ExecutionContextContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar ExecutionStepContextList;\nvar ExecutionStepContextPage;\nvar ExecutionStepContextInstance;\nvar ExecutionStepContextContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContextList\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList\n *\n * @param {Twilio.Studio.V1} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n * @param {string} executionSid - The SID of the Execution\n * @param {string} stepSid - Step SID\n */\n/* jshint ignore:end */\nExecutionStepContextList = function ExecutionStepContextList(version, flowSid,\n    executionSid, stepSid) {\n  /* jshint ignore:start */\n  /**\n   * @function stepContext\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext}\n   */\n  /* jshint ignore:end */\n  function ExecutionStepContextListInstance(sid) {\n    return ExecutionStepContextListInstance.get(sid);\n  }\n\n  ExecutionStepContextListInstance._version = version;\n  // Path Solution\n  ExecutionStepContextListInstance._solution = {\n    flowSid: flowSid,\n    executionSid: executionSid,\n    stepSid: stepSid\n  };\n  /* jshint ignore:start */\n  /**\n   * Constructs a execution_step_context\n   *\n   * @function get\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList#\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext}\n   */\n  /* jshint ignore:end */\n  ExecutionStepContextListInstance.get = function get() {\n    return new ExecutionStepContextContext(\n      this._version,\n      this._solution.flowSid,\n      this._solution.executionSid,\n      this._solution.stepSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExecutionStepContextListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExecutionStepContextListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExecutionStepContextListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContextPage\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExecutionStepContextSolution} solution - Path solution\n *\n * @returns ExecutionStepContextPage\n */\n/* jshint ignore:end */\nExecutionStepContextPage = function ExecutionStepContextPage(version, response,\n    solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExecutionStepContextPage.prototype, Page.prototype);\nExecutionStepContextPage.prototype.constructor = ExecutionStepContextPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExecutionStepContextInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextPage#\n *\n * @param {ExecutionStepContextPayload} payload - Payload response from the API\n *\n * @returns ExecutionStepContextInstance\n */\n/* jshint ignore:end */\nExecutionStepContextPage.prototype.getInstance = function getInstance(payload) {\n  return new ExecutionStepContextInstance(\n    this._version,\n    payload,\n    this._solution.flowSid,\n    this._solution.executionSid,\n    this._solution.stepSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepContextPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionStepContextPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContextContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} context - The current state of the flow\n * @property {string} executionSid - The SID of the Execution\n * @property {string} flowSid - The SID of the Flow\n * @property {string} stepSid - Step SID\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {ExecutionStepContextPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n * @param {sid} stepSid - Step SID\n */\n/* jshint ignore:end */\nExecutionStepContextInstance = function ExecutionStepContextInstance(version,\n    payload, flowSid, executionSid, stepSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.executionSid = payload.execution_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.stepSid = payload.step_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, executionSid: executionSid, stepSid: stepSid, };\n};\n\nObject.defineProperty(ExecutionStepContextInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExecutionStepContextContext(\n          this._version,\n          this._solution.flowSid,\n          this._solution.executionSid,\n          this._solution.stepSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionStepContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionStepContextInstance\n */\n/* jshint ignore:end */\nExecutionStepContextInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepContextInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionStepContextInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContextContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n * @param {sid} stepSid - Step SID\n */\n/* jshint ignore:end */\nExecutionStepContextContext = function ExecutionStepContextContext(version,\n    flowSid, executionSid, stepSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, executionSid: executionSid, stepSid: stepSid, };\n  this._uri = `/Flows/${flowSid}/Executions/${executionSid}/Steps/${stepSid}/Context`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionStepContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionStepContextInstance\n */\n/* jshint ignore:end */\nExecutionStepContextContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionStepContextInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.executionSid,\n      this._solution.stepSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepContextContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExecutionStepContextContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExecutionStepContextList: ExecutionStepContextList,\n  ExecutionStepContextPage: ExecutionStepContextPage,\n  ExecutionStepContextInstance: ExecutionStepContextInstance,\n  ExecutionStepContextContext: ExecutionStepContextContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ExecutionStepContextList = require(\n    './executionStep/executionStepContext').ExecutionStepContextList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ExecutionStepList;\nvar ExecutionStepPage;\nvar ExecutionStepInstance;\nvar ExecutionStepContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepList\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepList\n *\n * @param {Twilio.Studio.V1} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n * @param {string} executionSid - The SID of the Execution\n */\n/* jshint ignore:end */\nExecutionStepList = function ExecutionStepList(version, flowSid, executionSid) {\n  /* jshint ignore:start */\n  /**\n   * @function steps\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext}\n   */\n  /* jshint ignore:end */\n  function ExecutionStepListInstance(sid) {\n    return ExecutionStepListInstance.get(sid);\n  }\n\n  ExecutionStepListInstance._version = version;\n  // Path Solution\n  ExecutionStepListInstance._solution = {flowSid: flowSid, executionSid: executionSid};\n  ExecutionStepListInstance._uri = `/Flows/${flowSid}/Executions/${executionSid}/Steps`;\n  /* jshint ignore:start */\n  /**\n   * Streams ExecutionStepInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ExecutionStepInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ExecutionStepInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionStepPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ExecutionStepInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionStepPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a execution_step\n   *\n   * @function get\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext}\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.get = function get(sid) {\n    return new ExecutionStepContext(\n      this._version,\n      this._solution.flowSid,\n      this._solution.executionSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExecutionStepListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExecutionStepListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepPage\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExecutionStepSolution} solution - Path solution\n *\n * @returns ExecutionStepPage\n */\n/* jshint ignore:end */\nExecutionStepPage = function ExecutionStepPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExecutionStepPage.prototype, Page.prototype);\nExecutionStepPage.prototype.constructor = ExecutionStepPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExecutionStepInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepPage#\n *\n * @param {ExecutionStepPayload} payload - Payload response from the API\n *\n * @returns ExecutionStepInstance\n */\n/* jshint ignore:end */\nExecutionStepPage.prototype.getInstance = function getInstance(payload) {\n  return new ExecutionStepInstance(\n    this._version,\n    payload,\n    this._solution.flowSid,\n    this._solution.executionSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionStepPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} flowSid - The SID of the Flow\n * @property {string} executionSid - The SID of the Execution\n * @property {string} name -\n *          The event that caused the Flow to transition to the Step\n * @property {object} context - The current state of the flow\n * @property {string} transitionedFrom -\n *          The Widget that preceded the Widget for the Step\n * @property {string} transitionedTo -\n *          The Widget that will follow the Widget for the Step\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {ExecutionStepPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nExecutionStepInstance = function ExecutionStepInstance(version, payload,\n                                                        flowSid, executionSid,\n                                                        sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.executionSid = payload.execution_sid; // jshint ignore:line\n  this.name = payload.name; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.transitionedFrom = payload.transitioned_from; // jshint ignore:line\n  this.transitionedTo = payload.transitioned_to; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, executionSid: executionSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ExecutionStepInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExecutionStepContext(\n          this._version,\n          this._solution.flowSid,\n          this._solution.executionSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionStepInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionStepInstance\n */\n/* jshint ignore:end */\nExecutionStepInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the stepContext\n *\n * @function stepContext\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepInstance#\n *\n * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList}\n */\n/* jshint ignore:end */\nExecutionStepInstance.prototype.stepContext = function stepContext() {\n  return this._proxy.stepContext;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionStepInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext\n *\n * @property {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList} stepContext -\n *          stepContext resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nExecutionStepContext = function ExecutionStepContext(version, flowSid,\n                                                      executionSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, executionSid: executionSid, sid: sid, };\n  this._uri = `/Flows/${flowSid}/Executions/${executionSid}/Steps/${sid}`;\n\n  // Dependents\n  this._stepContext = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionStepInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionStepInstance\n */\n/* jshint ignore:end */\nExecutionStepContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionStepInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.executionSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ExecutionStepContext.prototype,\n  'stepContext', {\n    get: function() {\n      if (!this._stepContext) {\n        this._stepContext = new ExecutionStepContextList(\n          this._version,\n          this._solution.flowSid,\n          this._solution.executionSid,\n          this._solution.sid\n        );\n      }\n      return this._stepContext;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExecutionStepContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExecutionStepList: ExecutionStepList,\n  ExecutionStepPage: ExecutionStepPage,\n  ExecutionStepInstance: ExecutionStepInstance,\n  ExecutionStepContext: ExecutionStepContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ExecutionContextList = require(\n    './execution/executionContext').ExecutionContextList;\nvar ExecutionStepList = require('./execution/executionStep').ExecutionStepList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ExecutionList;\nvar ExecutionPage;\nvar ExecutionInstance;\nvar ExecutionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionList\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionList\n *\n * @param {Twilio.Studio.V1} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n */\n/* jshint ignore:end */\nExecutionList = function ExecutionList(version, flowSid) {\n  /* jshint ignore:start */\n  /**\n   * @function executions\n   * @memberof Twilio.Studio.V1.FlowContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext}\n   */\n  /* jshint ignore:end */\n  function ExecutionListInstance(sid) {\n    return ExecutionListInstance.get(sid);\n  }\n\n  ExecutionListInstance._version = version;\n  // Path Solution\n  ExecutionListInstance._solution = {flowSid: flowSid};\n  ExecutionListInstance._uri = `/Flows/${flowSid}/Executions`;\n  /* jshint ignore:start */\n  /**\n   * Streams ExecutionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedFrom] -\n   *          Only show Executions that started on or after this ISO 8601 date-time\n   * @param {Date} [opts.dateCreatedTo] -\n   *          Only show Executions that started before this ISO 8601 date-time\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ExecutionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedFrom] -\n   *          Only show Executions that started on or after this ISO 8601 date-time\n   * @param {Date} [opts.dateCreatedTo] -\n   *          Only show Executions that started before this ISO 8601 date-time\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ExecutionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedFrom] -\n   *          Only show Executions that started on or after this ISO 8601 date-time\n   * @param {Date} [opts.dateCreatedTo] -\n   *          Only show Executions that started before this ISO 8601 date-time\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DateCreatedFrom': serialize.iso8601DateTime(_.get(opts, 'dateCreatedFrom')),\n      'DateCreatedTo': serialize.iso8601DateTime(_.get(opts, 'dateCreatedTo')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ExecutionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ExecutionInstance\n   *\n   * @function create\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.to -\n   *          The Contact phone number to start a Studio Flow Execution\n   * @param {string} opts.from -\n   *          The Twilio phone number or Messaging Service SID to send messages or initiate calls from during the Flow Execution\n   * @param {object} [opts.parameters] -\n   *          JSON data that will be added to the Flow's context\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ExecutionInstance\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['to'])) {\n      throw new Error('Required parameter \"opts[\\'to\\']\" missing.');\n    }\n    if (_.isUndefined(opts['from'])) {\n      throw new Error('Required parameter \"opts[\\'from\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'To': _.get(opts, 'to'),\n      'From': _.get(opts, 'from'),\n      'Parameters': serialize.object(_.get(opts, 'parameters'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionInstance(\n        this._version,\n        payload,\n        this._solution.flowSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a execution\n   *\n   * @function get\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionList#\n   *\n   * @param {string} sid - The SID of the Execution resource to fetch\n   *\n   * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext}\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.get = function get(sid) {\n    return new ExecutionContext(this._version, this._solution.flowSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V1.FlowContext.ExecutionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExecutionListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExecutionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionPage\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExecutionSolution} solution - Path solution\n *\n * @returns ExecutionPage\n */\n/* jshint ignore:end */\nExecutionPage = function ExecutionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExecutionPage.prototype, Page.prototype);\nExecutionPage.prototype.constructor = ExecutionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExecutionInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionPage#\n *\n * @param {ExecutionPayload} payload - Payload response from the API\n *\n * @returns ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionPage.prototype.getInstance = function getInstance(payload) {\n  return new ExecutionInstance(this._version, payload, this._solution.flowSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} flowSid - The SID of the Flow\n * @property {string} contactSid - The SID of the Contact\n * @property {string} contactChannelAddress -\n *          The phone number, SIP address or Client identifier that triggered the Execution\n * @property {object} context - The current state of the flow\n * @property {execution.status} status - The status of the Execution\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - Nested resource URLs\n *\n * @param {V1} version - Version of the resource\n * @param {ExecutionPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} sid - The SID of the Execution resource to fetch\n */\n/* jshint ignore:end */\nExecutionInstance = function ExecutionInstance(version, payload, flowSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.contactSid = payload.contact_sid; // jshint ignore:line\n  this.contactChannelAddress = payload.contact_channel_address; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ExecutionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExecutionContext(this._version, this._solution.flowSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ExecutionInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ExecutionInstance\n *\n * @function update\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionInstance#\n *\n * @param {object} opts - Options for request\n * @param {execution.status} opts.status - The status of the Execution\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the steps\n *\n * @function steps\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionInstance#\n *\n * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepList}\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.steps = function steps() {\n  return this._proxy.steps;\n};\n\n/* jshint ignore:start */\n/**\n * Access the executionContext\n *\n * @function executionContext\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionInstance#\n *\n * @returns {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextList}\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.executionContext = function executionContext() {\n  return this._proxy.executionContext;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContext\n *\n * @constructor Twilio.Studio.V1.FlowContext.ExecutionContext\n *\n * @property {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionStepList} steps -\n *          steps resource\n * @property {Twilio.Studio.V1.FlowContext.ExecutionContext.ExecutionContextList} executionContext -\n *          executionContext resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} sid - The SID of the Execution resource to fetch\n */\n/* jshint ignore:end */\nExecutionContext = function ExecutionContext(version, flowSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, sid: sid, };\n  this._uri = `/Flows/${flowSid}/Executions/${sid}`;\n\n  // Dependents\n  this._steps = undefined;\n  this._executionContext = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ExecutionInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ExecutionInstance\n *\n * @function update\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext#\n *\n * @param {object} opts - Options for request\n * @param {execution.status} opts.status - The status of the Execution\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ExecutionContext.prototype,\n  'steps', {\n    get: function() {\n      if (!this._steps) {\n        this._steps = new ExecutionStepList(this._version, this._solution.flowSid, this._solution.sid);\n      }\n      return this._steps;\n    }\n});\n\nObject.defineProperty(ExecutionContext.prototype,\n  'executionContext', {\n    get: function() {\n      if (!this._executionContext) {\n        this._executionContext = new ExecutionContextList(\n          this._version,\n          this._solution.flowSid,\n          this._solution.sid\n        );\n      }\n      return this._executionContext;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext.ExecutionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExecutionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExecutionList: ExecutionList,\n  ExecutionPage: ExecutionPage,\n  ExecutionInstance: ExecutionInstance,\n  ExecutionContext: ExecutionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar EngagementList = require('./flow/engagement').EngagementList;\nvar ExecutionList = require('./flow/execution').ExecutionList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar FlowList;\nvar FlowPage;\nvar FlowInstance;\nvar FlowContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowList\n *\n * @constructor Twilio.Studio.V1.FlowList\n *\n * @param {Twilio.Studio.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nFlowList = function FlowList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function flows\n   * @memberof Twilio.Studio.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V1.FlowContext}\n   */\n  /* jshint ignore:end */\n  function FlowListInstance(sid) {\n    return FlowListInstance.get(sid);\n  }\n\n  FlowListInstance._version = version;\n  // Path Solution\n  FlowListInstance._solution = {};\n  FlowListInstance._uri = `/Flows`;\n  /* jshint ignore:start */\n  /**\n   * Streams FlowInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Studio.V1.FlowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FlowListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FlowInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Studio.V1.FlowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlowListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FlowInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Studio.V1.FlowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlowListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlowPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FlowInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Studio.V1.FlowList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlowListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlowPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a flow\n   *\n   * @function get\n   * @memberof Twilio.Studio.V1.FlowList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Studio.V1.FlowContext}\n   */\n  /* jshint ignore:end */\n  FlowListInstance.get = function get(sid) {\n    return new FlowContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V1.FlowList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FlowListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FlowListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FlowListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowPage\n *\n * @constructor Twilio.Studio.V1.FlowPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FlowSolution} solution - Path solution\n *\n * @returns FlowPage\n */\n/* jshint ignore:end */\nFlowPage = function FlowPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FlowPage.prototype, Page.prototype);\nFlowPage.prototype.constructor = FlowPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FlowInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V1.FlowPage#\n *\n * @param {FlowPayload} payload - Payload response from the API\n *\n * @returns FlowInstance\n */\n/* jshint ignore:end */\nFlowPage.prototype.getInstance = function getInstance(payload) {\n  return new FlowInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowContext\n *\n * @constructor Twilio.Studio.V1.FlowInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Flow\n * @property {flow.status} status - The status of the Flow\n * @property {number} version - The latest version number of the Flow's definition\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - Nested resource URLs\n *\n * @param {V1} version - Version of the resource\n * @param {FlowPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFlowInstance = function FlowInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.version = deserialize.integer(payload.version); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(FlowInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FlowContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FlowInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FlowInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V1.FlowInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the engagements\n *\n * @function engagements\n * @memberof Twilio.Studio.V1.FlowInstance#\n *\n * @returns {Twilio.Studio.V1.FlowContext.EngagementList}\n */\n/* jshint ignore:end */\nFlowInstance.prototype.engagements = function engagements() {\n  return this._proxy.engagements;\n};\n\n/* jshint ignore:start */\n/**\n * Access the executions\n *\n * @function executions\n * @memberof Twilio.Studio.V1.FlowInstance#\n *\n * @returns {Twilio.Studio.V1.FlowContext.ExecutionList}\n */\n/* jshint ignore:end */\nFlowInstance.prototype.executions = function executions() {\n  return this._proxy.executions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowContext\n *\n * @constructor Twilio.Studio.V1.FlowContext\n *\n * @property {Twilio.Studio.V1.FlowContext.EngagementList} engagements -\n *          engagements resource\n * @property {Twilio.Studio.V1.FlowContext.ExecutionList} executions -\n *          executions resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFlowContext = function FlowContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Flows/${sid}`;\n\n  // Dependents\n  this._engagements = undefined;\n  this._executions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FlowInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V1.FlowContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FlowInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FlowInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V1.FlowContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(FlowContext.prototype,\n  'engagements', {\n    get: function() {\n      if (!this._engagements) {\n        this._engagements = new EngagementList(this._version, this._solution.sid);\n      }\n      return this._engagements;\n    }\n});\n\nObject.defineProperty(FlowContext.prototype,\n  'executions', {\n    get: function() {\n      if (!this._executions) {\n        this._executions = new ExecutionList(this._version, this._solution.sid);\n      }\n      return this._executions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V1.FlowContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFlowContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FlowList: FlowList,\n  FlowPage: FlowPage,\n  FlowInstance: FlowInstance,\n  FlowContext: FlowContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar FlowList = require('./v1/flow').FlowList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Studio\n *\n * @constructor Twilio.Studio.V1\n *\n * @property {Twilio.Studio.V1.FlowList} flows - flows resource\n *\n * @param {Twilio.Studio} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._flows = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'flows', {\n    get: function() {\n      this._flows = this._flows || new FlowList(this);\n      return this._flows;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ExecutionContextList;\nvar ExecutionContextPage;\nvar ExecutionContextInstance;\nvar ExecutionContextContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContextList\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextList\n *\n * @param {Twilio.Studio.V2} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n * @param {string} executionSid - The SID of the Execution\n */\n/* jshint ignore:end */\nExecutionContextList = function ExecutionContextList(version, flowSid,\n                                                      executionSid) {\n  /* jshint ignore:start */\n  /**\n   * @function executionContext\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextContext}\n   */\n  /* jshint ignore:end */\n  function ExecutionContextListInstance(sid) {\n    return ExecutionContextListInstance.get(sid);\n  }\n\n  ExecutionContextListInstance._version = version;\n  // Path Solution\n  ExecutionContextListInstance._solution = {flowSid: flowSid, executionSid: executionSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a execution_context\n   *\n   * @function get\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextList#\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextContext}\n   */\n  /* jshint ignore:end */\n  ExecutionContextListInstance.get = function get() {\n    return new ExecutionContextContext(\n      this._version,\n      this._solution.flowSid,\n      this._solution.executionSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExecutionContextListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExecutionContextListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExecutionContextListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContextPage\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExecutionContextSolution} solution - Path solution\n *\n * @returns ExecutionContextPage\n */\n/* jshint ignore:end */\nExecutionContextPage = function ExecutionContextPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExecutionContextPage.prototype, Page.prototype);\nExecutionContextPage.prototype.constructor = ExecutionContextPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExecutionContextInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextPage#\n *\n * @param {ExecutionContextPayload} payload - Payload response from the API\n *\n * @returns ExecutionContextInstance\n */\n/* jshint ignore:end */\nExecutionContextPage.prototype.getInstance = function getInstance(payload) {\n  return new ExecutionContextInstance(\n    this._version,\n    payload,\n    this._solution.flowSid,\n    this._solution.executionSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionContextPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionContextPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContextContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} context - The current state of the flow\n * @property {string} flowSid - The SID of the Flow\n * @property {string} executionSid - The SID of the Execution\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V2} version - Version of the resource\n * @param {ExecutionContextPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n */\n/* jshint ignore:end */\nExecutionContextInstance = function ExecutionContextInstance(version, payload,\n    flowSid, executionSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.executionSid = payload.execution_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, executionSid: executionSid, };\n};\n\nObject.defineProperty(ExecutionContextInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExecutionContextContext(\n          this._version,\n          this._solution.flowSid,\n          this._solution.executionSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionContextInstance\n */\n/* jshint ignore:end */\nExecutionContextInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionContextInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionContextInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContextContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n */\n/* jshint ignore:end */\nExecutionContextContext = function ExecutionContextContext(version, flowSid,\n                                                            executionSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, executionSid: executionSid, };\n  this._uri = `/Flows/${flowSid}/Executions/${executionSid}/Context`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionContextInstance\n */\n/* jshint ignore:end */\nExecutionContextContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionContextInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.executionSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionContextContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExecutionContextContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExecutionContextList: ExecutionContextList,\n  ExecutionContextPage: ExecutionContextPage,\n  ExecutionContextInstance: ExecutionContextInstance,\n  ExecutionContextContext: ExecutionContextContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar ExecutionStepContextList;\nvar ExecutionStepContextPage;\nvar ExecutionStepContextInstance;\nvar ExecutionStepContextContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContextList\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList\n *\n * @param {Twilio.Studio.V2} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n * @param {string} executionSid - The SID of the Execution\n * @param {string} stepSid - Step SID\n */\n/* jshint ignore:end */\nExecutionStepContextList = function ExecutionStepContextList(version, flowSid,\n    executionSid, stepSid) {\n  /* jshint ignore:start */\n  /**\n   * @function stepContext\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext}\n   */\n  /* jshint ignore:end */\n  function ExecutionStepContextListInstance(sid) {\n    return ExecutionStepContextListInstance.get(sid);\n  }\n\n  ExecutionStepContextListInstance._version = version;\n  // Path Solution\n  ExecutionStepContextListInstance._solution = {\n    flowSid: flowSid,\n    executionSid: executionSid,\n    stepSid: stepSid\n  };\n  /* jshint ignore:start */\n  /**\n   * Constructs a execution_step_context\n   *\n   * @function get\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList#\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext}\n   */\n  /* jshint ignore:end */\n  ExecutionStepContextListInstance.get = function get() {\n    return new ExecutionStepContextContext(\n      this._version,\n      this._solution.flowSid,\n      this._solution.executionSid,\n      this._solution.stepSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExecutionStepContextListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExecutionStepContextListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExecutionStepContextListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContextPage\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExecutionStepContextSolution} solution - Path solution\n *\n * @returns ExecutionStepContextPage\n */\n/* jshint ignore:end */\nExecutionStepContextPage = function ExecutionStepContextPage(version, response,\n    solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExecutionStepContextPage.prototype, Page.prototype);\nExecutionStepContextPage.prototype.constructor = ExecutionStepContextPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExecutionStepContextInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextPage#\n *\n * @param {ExecutionStepContextPayload} payload - Payload response from the API\n *\n * @returns ExecutionStepContextInstance\n */\n/* jshint ignore:end */\nExecutionStepContextPage.prototype.getInstance = function getInstance(payload) {\n  return new ExecutionStepContextInstance(\n    this._version,\n    payload,\n    this._solution.flowSid,\n    this._solution.executionSid,\n    this._solution.stepSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepContextPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionStepContextPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContextContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} context - The current state of the flow\n * @property {string} executionSid - The SID of the Execution\n * @property {string} flowSid - The SID of the Flow\n * @property {string} stepSid - Step SID\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V2} version - Version of the resource\n * @param {ExecutionStepContextPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n * @param {sid} stepSid - Step SID\n */\n/* jshint ignore:end */\nExecutionStepContextInstance = function ExecutionStepContextInstance(version,\n    payload, flowSid, executionSid, stepSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.executionSid = payload.execution_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.stepSid = payload.step_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, executionSid: executionSid, stepSid: stepSid, };\n};\n\nObject.defineProperty(ExecutionStepContextInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExecutionStepContextContext(\n          this._version,\n          this._solution.flowSid,\n          this._solution.executionSid,\n          this._solution.stepSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionStepContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionStepContextInstance\n */\n/* jshint ignore:end */\nExecutionStepContextInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepContextInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionStepContextInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContextContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n * @param {sid} stepSid - Step SID\n */\n/* jshint ignore:end */\nExecutionStepContextContext = function ExecutionStepContextContext(version,\n    flowSid, executionSid, stepSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, executionSid: executionSid, stepSid: stepSid, };\n  this._uri = `/Flows/${flowSid}/Executions/${executionSid}/Steps/${stepSid}/Context`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionStepContextInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionStepContextInstance\n */\n/* jshint ignore:end */\nExecutionStepContextContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionStepContextInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.executionSid,\n      this._solution.stepSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepContextContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExecutionStepContextContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExecutionStepContextList: ExecutionStepContextList,\n  ExecutionStepContextPage: ExecutionStepContextPage,\n  ExecutionStepContextInstance: ExecutionStepContextInstance,\n  ExecutionStepContextContext: ExecutionStepContextContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ExecutionStepContextList = require(\n    './executionStep/executionStepContext').ExecutionStepContextList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ExecutionStepList;\nvar ExecutionStepPage;\nvar ExecutionStepInstance;\nvar ExecutionStepContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepList\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepList\n *\n * @param {Twilio.Studio.V2} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n * @param {string} executionSid - The SID of the Execution\n */\n/* jshint ignore:end */\nExecutionStepList = function ExecutionStepList(version, flowSid, executionSid) {\n  /* jshint ignore:start */\n  /**\n   * @function steps\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext}\n   */\n  /* jshint ignore:end */\n  function ExecutionStepListInstance(sid) {\n    return ExecutionStepListInstance.get(sid);\n  }\n\n  ExecutionStepListInstance._version = version;\n  // Path Solution\n  ExecutionStepListInstance._solution = {flowSid: flowSid, executionSid: executionSid};\n  ExecutionStepListInstance._uri = `/Flows/${flowSid}/Executions/${executionSid}/Steps`;\n  /* jshint ignore:start */\n  /**\n   * Streams ExecutionStepInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ExecutionStepInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ExecutionStepInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionStepPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ExecutionStepInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionStepPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a execution_step\n   *\n   * @function get\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext}\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.get = function get(sid) {\n    return new ExecutionStepContext(\n      this._version,\n      this._solution.flowSid,\n      this._solution.executionSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExecutionStepListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExecutionStepListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExecutionStepListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepPage\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExecutionStepSolution} solution - Path solution\n *\n * @returns ExecutionStepPage\n */\n/* jshint ignore:end */\nExecutionStepPage = function ExecutionStepPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExecutionStepPage.prototype, Page.prototype);\nExecutionStepPage.prototype.constructor = ExecutionStepPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExecutionStepInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepPage#\n *\n * @param {ExecutionStepPayload} payload - Payload response from the API\n *\n * @returns ExecutionStepInstance\n */\n/* jshint ignore:end */\nExecutionStepPage.prototype.getInstance = function getInstance(payload) {\n  return new ExecutionStepInstance(\n    this._version,\n    payload,\n    this._solution.flowSid,\n    this._solution.executionSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionStepPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} flowSid - The SID of the Flow\n * @property {string} executionSid - The SID of the Execution\n * @property {string} name -\n *          The event that caused the Flow to transition to the Step\n * @property {object} context - The current state of the flow\n * @property {string} transitionedFrom -\n *          The Widget that preceded the Widget for the Step\n * @property {string} transitionedTo -\n *          The Widget that will follow the Widget for the Step\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V2} version - Version of the resource\n * @param {ExecutionStepPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nExecutionStepInstance = function ExecutionStepInstance(version, payload,\n                                                        flowSid, executionSid,\n                                                        sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.executionSid = payload.execution_sid; // jshint ignore:line\n  this.name = payload.name; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.transitionedFrom = payload.transitioned_from; // jshint ignore:line\n  this.transitionedTo = payload.transitioned_to; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, executionSid: executionSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ExecutionStepInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExecutionStepContext(\n          this._version,\n          this._solution.flowSid,\n          this._solution.executionSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionStepInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionStepInstance\n */\n/* jshint ignore:end */\nExecutionStepInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the stepContext\n *\n * @function stepContext\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepInstance#\n *\n * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList}\n */\n/* jshint ignore:end */\nExecutionStepInstance.prototype.stepContext = function stepContext() {\n  return this._proxy.stepContext;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionStepInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionStepContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext\n *\n * @property {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext.ExecutionStepContextList} stepContext -\n *          stepContext resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} executionSid - The SID of the Execution\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nExecutionStepContext = function ExecutionStepContext(version, flowSid,\n                                                      executionSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, executionSid: executionSid, sid: sid, };\n  this._uri = `/Flows/${flowSid}/Executions/${executionSid}/Steps/${sid}`;\n\n  // Dependents\n  this._stepContext = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionStepInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionStepInstance\n */\n/* jshint ignore:end */\nExecutionStepContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionStepInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.executionSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ExecutionStepContext.prototype,\n  'stepContext', {\n    get: function() {\n      if (!this._stepContext) {\n        this._stepContext = new ExecutionStepContextList(\n          this._version,\n          this._solution.flowSid,\n          this._solution.executionSid,\n          this._solution.sid\n        );\n      }\n      return this._stepContext;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionStepContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExecutionStepContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExecutionStepList: ExecutionStepList,\n  ExecutionStepPage: ExecutionStepPage,\n  ExecutionStepInstance: ExecutionStepInstance,\n  ExecutionStepContext: ExecutionStepContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ExecutionContextList = require(\n    './execution/executionContext').ExecutionContextList;\nvar ExecutionStepList = require('./execution/executionStep').ExecutionStepList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ExecutionList;\nvar ExecutionPage;\nvar ExecutionInstance;\nvar ExecutionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionList\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionList\n *\n * @param {Twilio.Studio.V2} version - Version of the resource\n * @param {string} flowSid - The SID of the Flow\n */\n/* jshint ignore:end */\nExecutionList = function ExecutionList(version, flowSid) {\n  /* jshint ignore:start */\n  /**\n   * @function executions\n   * @memberof Twilio.Studio.V2.FlowContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext}\n   */\n  /* jshint ignore:end */\n  function ExecutionListInstance(sid) {\n    return ExecutionListInstance.get(sid);\n  }\n\n  ExecutionListInstance._version = version;\n  // Path Solution\n  ExecutionListInstance._solution = {flowSid: flowSid};\n  ExecutionListInstance._uri = `/Flows/${flowSid}/Executions`;\n  /* jshint ignore:start */\n  /**\n   * Streams ExecutionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedFrom] -\n   *          Only show Executions that started on or after this ISO 8601 date-time\n   * @param {Date} [opts.dateCreatedTo] -\n   *          Only show Executions that started before this ISO 8601 date-time\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ExecutionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedFrom] -\n   *          Only show Executions that started on or after this ISO 8601 date-time\n   * @param {Date} [opts.dateCreatedTo] -\n   *          Only show Executions that started before this ISO 8601 date-time\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ExecutionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedFrom] -\n   *          Only show Executions that started on or after this ISO 8601 date-time\n   * @param {Date} [opts.dateCreatedTo] -\n   *          Only show Executions that started before this ISO 8601 date-time\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DateCreatedFrom': serialize.iso8601DateTime(_.get(opts, 'dateCreatedFrom')),\n      'DateCreatedTo': serialize.iso8601DateTime(_.get(opts, 'dateCreatedTo')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ExecutionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ExecutionInstance\n   *\n   * @function create\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.to -\n   *          The Contact phone number to start a Studio Flow Execution\n   * @param {string} opts.from -\n   *          The Twilio phone number or Messaging Service SID to send messages or initiate calls from during the Flow Execution\n   * @param {object} [opts.parameters] -\n   *          JSON data that will be added to the Flow's context\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ExecutionInstance\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['to'])) {\n      throw new Error('Required parameter \"opts[\\'to\\']\" missing.');\n    }\n    if (_.isUndefined(opts['from'])) {\n      throw new Error('Required parameter \"opts[\\'from\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'To': _.get(opts, 'to'),\n      'From': _.get(opts, 'from'),\n      'Parameters': serialize.object(_.get(opts, 'parameters'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExecutionInstance(\n        this._version,\n        payload,\n        this._solution.flowSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a execution\n   *\n   * @function get\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionList#\n   *\n   * @param {string} sid - The SID of the Execution resource to fetch\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext}\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.get = function get(sid) {\n    return new ExecutionContext(this._version, this._solution.flowSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V2.FlowContext.ExecutionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExecutionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExecutionListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExecutionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionPage\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExecutionSolution} solution - Path solution\n *\n * @returns ExecutionPage\n */\n/* jshint ignore:end */\nExecutionPage = function ExecutionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExecutionPage.prototype, Page.prototype);\nExecutionPage.prototype.constructor = ExecutionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExecutionInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionPage#\n *\n * @param {ExecutionPayload} payload - Payload response from the API\n *\n * @returns ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionPage.prototype.getInstance = function getInstance(payload) {\n  return new ExecutionInstance(this._version, payload, this._solution.flowSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} flowSid - The SID of the Flow\n * @property {string} contactChannelAddress -\n *          The phone number, SIP address or Client identifier that triggered the Execution\n * @property {object} context - The current state of the flow\n * @property {execution.status} status - The status of the Execution\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - Nested resource URLs\n *\n * @param {V2} version - Version of the resource\n * @param {ExecutionPayload} payload - The instance payload\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} sid - The SID of the Execution resource to fetch\n */\n/* jshint ignore:end */\nExecutionInstance = function ExecutionInstance(version, payload, flowSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.flowSid = payload.flow_sid; // jshint ignore:line\n  this.contactChannelAddress = payload.contact_channel_address; // jshint ignore:line\n  this.context = payload.context; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {flowSid: flowSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ExecutionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExecutionContext(this._version, this._solution.flowSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ExecutionInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ExecutionInstance\n *\n * @function update\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionInstance#\n *\n * @param {object} opts - Options for request\n * @param {execution.status} opts.status - The status of the Execution\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the steps\n *\n * @function steps\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionInstance#\n *\n * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepList}\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.steps = function steps() {\n  return this._proxy.steps;\n};\n\n/* jshint ignore:start */\n/**\n * Access the executionContext\n *\n * @function executionContext\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionInstance#\n *\n * @returns {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextList}\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.executionContext = function executionContext() {\n  return this._proxy.executionContext;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExecutionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExecutionContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.ExecutionContext\n *\n * @property {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionStepList} steps -\n *          steps resource\n * @property {Twilio.Studio.V2.FlowContext.ExecutionContext.ExecutionContextList} executionContext -\n *          executionContext resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} flowSid - The SID of the Flow\n * @param {sid} sid - The SID of the Execution resource to fetch\n */\n/* jshint ignore:end */\nExecutionContext = function ExecutionContext(version, flowSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {flowSid: flowSid, sid: sid, };\n  this._uri = `/Flows/${flowSid}/Executions/${sid}`;\n\n  // Dependents\n  this._steps = undefined;\n  this._executionContext = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExecutionInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ExecutionInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ExecutionInstance\n *\n * @function update\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext#\n *\n * @param {object} opts - Options for request\n * @param {execution.status} opts.status - The status of the Execution\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExecutionInstance\n */\n/* jshint ignore:end */\nExecutionContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExecutionInstance(\n      this._version,\n      payload,\n      this._solution.flowSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ExecutionContext.prototype,\n  'steps', {\n    get: function() {\n      if (!this._steps) {\n        this._steps = new ExecutionStepList(this._version, this._solution.flowSid, this._solution.sid);\n      }\n      return this._steps;\n    }\n});\n\nObject.defineProperty(ExecutionContext.prototype,\n  'executionContext', {\n    get: function() {\n      if (!this._executionContext) {\n        this._executionContext = new ExecutionContextList(\n          this._version,\n          this._solution.flowSid,\n          this._solution.sid\n        );\n      }\n      return this._executionContext;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.ExecutionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExecutionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExecutionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExecutionList: ExecutionList,\n  ExecutionPage: ExecutionPage,\n  ExecutionInstance: ExecutionInstance,\n  ExecutionContext: ExecutionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar FlowRevisionList;\nvar FlowRevisionPage;\nvar FlowRevisionInstance;\nvar FlowRevisionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowRevisionList\n *\n * @constructor Twilio.Studio.V2.FlowContext.FlowRevisionList\n *\n * @param {Twilio.Studio.V2} version - Version of the resource\n * @param {string} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nFlowRevisionList = function FlowRevisionList(version, sid) {\n  /* jshint ignore:start */\n  /**\n   * @function revisions\n   * @memberof Twilio.Studio.V2.FlowContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.FlowRevisionContext}\n   */\n  /* jshint ignore:end */\n  function FlowRevisionListInstance(sid) {\n    return FlowRevisionListInstance.get(sid);\n  }\n\n  FlowRevisionListInstance._version = version;\n  // Path Solution\n  FlowRevisionListInstance._solution = {sid: sid};\n  FlowRevisionListInstance._uri = `/Flows/${sid}/Revisions`;\n  /* jshint ignore:start */\n  /**\n   * Streams FlowRevisionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FlowRevisionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FlowRevisionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlowRevisionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FlowRevisionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlowRevisionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlowRevisionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FlowRevisionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlowRevisionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlowRevisionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a flow_revision\n   *\n   * @function get\n   * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionList#\n   *\n   * @param {string} revision -\n   *          Specific Revision number or can be `LatestPublished` and `LatestRevision`\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.FlowRevisionContext}\n   */\n  /* jshint ignore:end */\n  FlowRevisionListInstance.get = function get(revision) {\n    return new FlowRevisionContext(this._version, this._solution.sid, revision);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FlowRevisionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FlowRevisionListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FlowRevisionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowRevisionPage\n *\n * @constructor Twilio.Studio.V2.FlowContext.FlowRevisionPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FlowRevisionSolution} solution - Path solution\n *\n * @returns FlowRevisionPage\n */\n/* jshint ignore:end */\nFlowRevisionPage = function FlowRevisionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FlowRevisionPage.prototype, Page.prototype);\nFlowRevisionPage.prototype.constructor = FlowRevisionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FlowRevisionInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionPage#\n *\n * @param {FlowRevisionPayload} payload - Payload response from the API\n *\n * @returns FlowRevisionInstance\n */\n/* jshint ignore:end */\nFlowRevisionPage.prototype.getInstance = function getInstance(payload) {\n  return new FlowRevisionInstance(this._version, payload, this._solution.sid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowRevisionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowRevisionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowRevisionContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.FlowRevisionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Flow\n * @property {object} definition - JSON representation of flow definition\n * @property {flow_revision.status} status - The status of the Flow\n * @property {number} revision -\n *          The latest revision number of the Flow's definition\n * @property {string} commitMessage - Description of change made in the revision\n * @property {boolean} valid - Boolean if the flow definition is valid\n * @property {object} errors - List of error in the flow definition\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V2} version - Version of the resource\n * @param {FlowRevisionPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n * @param {string} revision -\n *          Specific Revision number or can be `LatestPublished` and `LatestRevision`\n */\n/* jshint ignore:end */\nFlowRevisionInstance = function FlowRevisionInstance(version, payload, sid,\n                                                      revision) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.definition = payload.definition; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.revision = deserialize.integer(payload.revision); // jshint ignore:line\n  this.commitMessage = payload.commit_message; // jshint ignore:line\n  this.valid = payload.valid; // jshint ignore:line\n  this.errors = payload.errors; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid, revision: revision || this.revision, };\n};\n\nObject.defineProperty(FlowRevisionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FlowRevisionContext(this._version, this._solution.sid, this._solution.revision);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FlowRevisionInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowRevisionInstance\n */\n/* jshint ignore:end */\nFlowRevisionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowRevisionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowRevisionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowRevisionContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.FlowRevisionContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n * @param {string} revision -\n *          Specific Revision number or can be `LatestPublished` and `LatestRevision`\n */\n/* jshint ignore:end */\nFlowRevisionContext = function FlowRevisionContext(version, sid, revision) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, revision: revision, };\n  this._uri = `/Flows/${sid}/Revisions/${revision}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FlowRevisionInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowRevisionInstance\n */\n/* jshint ignore:end */\nFlowRevisionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FlowRevisionInstance(\n      this._version,\n      payload,\n      this._solution.sid,\n      this._solution.revision\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.FlowRevisionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowRevisionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFlowRevisionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FlowRevisionList: FlowRevisionList,\n  FlowRevisionPage: FlowRevisionPage,\n  FlowRevisionInstance: FlowRevisionInstance,\n  FlowRevisionContext: FlowRevisionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar FlowTestUserList;\nvar FlowTestUserPage;\nvar FlowTestUserInstance;\nvar FlowTestUserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowTestUserList\n *\n * @constructor Twilio.Studio.V2.FlowContext.FlowTestUserList\n *\n * @param {Twilio.Studio.V2} version - Version of the resource\n * @param {string} sid - Unique identifier of the flow.\n */\n/* jshint ignore:end */\nFlowTestUserList = function FlowTestUserList(version, sid) {\n  /* jshint ignore:start */\n  /**\n   * @function testUsers\n   * @memberof Twilio.Studio.V2.FlowContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.FlowTestUserContext}\n   */\n  /* jshint ignore:end */\n  function FlowTestUserListInstance(sid) {\n    return FlowTestUserListInstance.get(sid);\n  }\n\n  FlowTestUserListInstance._version = version;\n  // Path Solution\n  FlowTestUserListInstance._solution = {sid: sid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a flow_test_user\n   *\n   * @function get\n   * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserList#\n   *\n   * @returns {Twilio.Studio.V2.FlowContext.FlowTestUserContext}\n   */\n  /* jshint ignore:end */\n  FlowTestUserListInstance.get = function get() {\n    return new FlowTestUserContext(this._version, this._solution.sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FlowTestUserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FlowTestUserListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FlowTestUserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowTestUserPage\n *\n * @constructor Twilio.Studio.V2.FlowContext.FlowTestUserPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FlowTestUserSolution} solution - Path solution\n *\n * @returns FlowTestUserPage\n */\n/* jshint ignore:end */\nFlowTestUserPage = function FlowTestUserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FlowTestUserPage.prototype, Page.prototype);\nFlowTestUserPage.prototype.constructor = FlowTestUserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FlowTestUserInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserPage#\n *\n * @param {FlowTestUserPayload} payload - Payload response from the API\n *\n * @returns FlowTestUserInstance\n */\n/* jshint ignore:end */\nFlowTestUserPage.prototype.getInstance = function getInstance(payload) {\n  return new FlowTestUserInstance(this._version, payload, this._solution.sid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowTestUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowTestUserPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowTestUserContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.FlowTestUserInstance\n *\n * @property {string} sid - Unique identifier of the flow.\n * @property {string} testUsers -\n *          List of test user identities that can test draft versions of the flow.\n * @property {string} url - The URL of this resource.\n *\n * @param {V2} version - Version of the resource\n * @param {FlowTestUserPayload} payload - The instance payload\n * @param {sid} sid - Unique identifier of the flow.\n */\n/* jshint ignore:end */\nFlowTestUserInstance = function FlowTestUserInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.testUsers = payload.test_users; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid, };\n};\n\nObject.defineProperty(FlowTestUserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FlowTestUserContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FlowTestUserInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowTestUserInstance\n */\n/* jshint ignore:end */\nFlowTestUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FlowTestUserInstance\n *\n * @function update\n * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserInstance#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.testUsers -\n *          List of test user identities that can test draft versions of the flow.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowTestUserInstance\n */\n/* jshint ignore:end */\nFlowTestUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowTestUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowTestUserInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowTestUserContext\n *\n * @constructor Twilio.Studio.V2.FlowContext.FlowTestUserContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - Unique identifier of the flow.\n */\n/* jshint ignore:end */\nFlowTestUserContext = function FlowTestUserContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Flows/${sid}/TestUsers`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FlowTestUserInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowTestUserInstance\n */\n/* jshint ignore:end */\nFlowTestUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FlowTestUserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FlowTestUserInstance\n *\n * @function update\n * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserContext#\n *\n * @param {object} opts - Options for request\n * @param {string|list} opts.testUsers -\n *          List of test user identities that can test draft versions of the flow.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowTestUserInstance\n */\n/* jshint ignore:end */\nFlowTestUserContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['testUsers'])) {\n    throw new Error('Required parameter \"opts[\\'testUsers\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'TestUsers': serialize.map(_.get(opts, 'testUsers'), function(e) { return e; })\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FlowTestUserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext.FlowTestUserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowTestUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFlowTestUserContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FlowTestUserList: FlowTestUserList,\n  FlowTestUserPage: FlowTestUserPage,\n  FlowTestUserInstance: FlowTestUserInstance,\n  FlowTestUserContext: FlowTestUserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ExecutionList = require('./flow/execution').ExecutionList;\nvar FlowRevisionList = require('./flow/flowRevision').FlowRevisionList;\nvar FlowTestUserList = require('./flow/testUser').FlowTestUserList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar FlowList;\nvar FlowPage;\nvar FlowInstance;\nvar FlowContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowList\n *\n * @constructor Twilio.Studio.V2.FlowList\n *\n * @param {Twilio.Studio.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nFlowList = function FlowList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function flows\n   * @memberof Twilio.Studio.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V2.FlowContext}\n   */\n  /* jshint ignore:end */\n  function FlowListInstance(sid) {\n    return FlowListInstance.get(sid);\n  }\n\n  FlowListInstance._version = version;\n  // Path Solution\n  FlowListInstance._solution = {};\n  FlowListInstance._uri = `/Flows`;\n  /* jshint ignore:start */\n  /**\n   * create a FlowInstance\n   *\n   * @function create\n   * @memberof Twilio.Studio.V2.FlowList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the Flow\n   * @param {flow.status} opts.status - The status of the Flow\n   * @param {object} opts.definition - JSON representation of flow definition\n   * @param {string} [opts.commitMessage] -\n   *          Description of change made in the revision\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FlowInstance\n   */\n  /* jshint ignore:end */\n  FlowListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['status'])) {\n      throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n    }\n    if (_.isUndefined(opts['definition'])) {\n      throw new Error('Required parameter \"opts[\\'definition\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Status': _.get(opts, 'status'),\n      'Definition': serialize.object(_.get(opts, 'definition')),\n      'CommitMessage': _.get(opts, 'commitMessage')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlowInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams FlowInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Studio.V2.FlowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FlowListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FlowInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Studio.V2.FlowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlowListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FlowInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Studio.V2.FlowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlowListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlowPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FlowInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Studio.V2.FlowList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FlowListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlowPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a flow\n   *\n   * @function get\n   * @memberof Twilio.Studio.V2.FlowList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Studio.V2.FlowContext}\n   */\n  /* jshint ignore:end */\n  FlowListInstance.get = function get(sid) {\n    return new FlowContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V2.FlowList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FlowListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FlowListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FlowListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowPage\n *\n * @constructor Twilio.Studio.V2.FlowPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FlowSolution} solution - Path solution\n *\n * @returns FlowPage\n */\n/* jshint ignore:end */\nFlowPage = function FlowPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FlowPage.prototype, Page.prototype);\nFlowPage.prototype.constructor = FlowPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FlowInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V2.FlowPage#\n *\n * @param {FlowPayload} payload - Payload response from the API\n *\n * @returns FlowInstance\n */\n/* jshint ignore:end */\nFlowPage.prototype.getInstance = function getInstance(payload) {\n  return new FlowInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowContext\n *\n * @constructor Twilio.Studio.V2.FlowInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Flow\n * @property {object} definition - JSON representation of flow definition\n * @property {flow.status} status - The status of the Flow\n * @property {number} revision -\n *          The latest revision number of the Flow's definition\n * @property {string} commitMessage - Description of change made in the revision\n * @property {boolean} valid - Boolean if the flow definition is valid\n * @property {object} errors - List of error in the flow definition\n * @property {object} warnings - List of warnings in the flow definition\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} webhookUrl - The webhook_url\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - Nested resource URLs\n *\n * @param {V2} version - Version of the resource\n * @param {FlowPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFlowInstance = function FlowInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.definition = payload.definition; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.revision = deserialize.integer(payload.revision); // jshint ignore:line\n  this.commitMessage = payload.commit_message; // jshint ignore:line\n  this.valid = payload.valid; // jshint ignore:line\n  this.errors = payload.errors; // jshint ignore:line\n  this.warnings = payload.warnings; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(FlowInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FlowContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a FlowInstance\n *\n * @function update\n * @memberof Twilio.Studio.V2.FlowInstance#\n *\n * @param {object} opts - Options for request\n * @param {flow.status} opts.status - The status of the Flow\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the Flow\n * @param {object} [opts.definition] - JSON representation of flow definition\n * @param {string} [opts.commitMessage] -\n *          Description of change made in the revision\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FlowInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a FlowInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V2.FlowInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the revisions\n *\n * @function revisions\n * @memberof Twilio.Studio.V2.FlowInstance#\n *\n * @returns {Twilio.Studio.V2.FlowContext.FlowRevisionList}\n */\n/* jshint ignore:end */\nFlowInstance.prototype.revisions = function revisions() {\n  return this._proxy.revisions;\n};\n\n/* jshint ignore:start */\n/**\n * Access the testUsers\n *\n * @function testUsers\n * @memberof Twilio.Studio.V2.FlowInstance#\n *\n * @returns {Twilio.Studio.V2.FlowContext.FlowTestUserList}\n */\n/* jshint ignore:end */\nFlowInstance.prototype.testUsers = function testUsers() {\n  return this._proxy.testUsers;\n};\n\n/* jshint ignore:start */\n/**\n * Access the executions\n *\n * @function executions\n * @memberof Twilio.Studio.V2.FlowInstance#\n *\n * @returns {Twilio.Studio.V2.FlowContext.ExecutionList}\n */\n/* jshint ignore:end */\nFlowInstance.prototype.executions = function executions() {\n  return this._proxy.executions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowContext\n *\n * @constructor Twilio.Studio.V2.FlowContext\n *\n * @property {Twilio.Studio.V2.FlowContext.FlowRevisionList} revisions -\n *          revisions resource\n * @property {Twilio.Studio.V2.FlowContext.FlowTestUserList} testUsers -\n *          testUsers resource\n * @property {Twilio.Studio.V2.FlowContext.ExecutionList} executions -\n *          executions resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFlowContext = function FlowContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Flows/${sid}`;\n\n  // Dependents\n  this._revisions = undefined;\n  this._testUsers = undefined;\n  this._executions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a FlowInstance\n *\n * @function update\n * @memberof Twilio.Studio.V2.FlowContext#\n *\n * @param {object} opts - Options for request\n * @param {flow.status} opts.status - The status of the Flow\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the Flow\n * @param {object} [opts.definition] - JSON representation of flow definition\n * @param {string} [opts.commitMessage] -\n *          Description of change made in the revision\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Status': _.get(opts, 'status'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Definition': serialize.object(_.get(opts, 'definition')),\n    'CommitMessage': _.get(opts, 'commitMessage')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FlowInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FlowInstance\n *\n * @function fetch\n * @memberof Twilio.Studio.V2.FlowContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FlowInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FlowInstance\n *\n * @function remove\n * @memberof Twilio.Studio.V2.FlowContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FlowInstance\n */\n/* jshint ignore:end */\nFlowContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(FlowContext.prototype,\n  'revisions', {\n    get: function() {\n      if (!this._revisions) {\n        this._revisions = new FlowRevisionList(this._version, this._solution.sid);\n      }\n      return this._revisions;\n    }\n});\n\nObject.defineProperty(FlowContext.prototype,\n  'testUsers', {\n    get: function() {\n      if (!this._testUsers) {\n        this._testUsers = new FlowTestUserList(this._version, this._solution.sid);\n      }\n      return this._testUsers;\n    }\n});\n\nObject.defineProperty(FlowContext.prototype,\n  'executions', {\n    get: function() {\n      if (!this._executions) {\n        this._executions = new ExecutionList(this._version, this._solution.sid);\n      }\n      return this._executions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFlowContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FlowList: FlowList,\n  FlowPage: FlowPage,\n  FlowInstance: FlowInstance,\n  FlowContext: FlowContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar FlowValidateList;\nvar FlowValidatePage;\nvar FlowValidateInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowValidateList\n *\n * @constructor Twilio.Studio.V2.FlowValidateList\n *\n * @param {Twilio.Studio.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nFlowValidateList = function FlowValidateList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function flowValidate\n   * @memberof Twilio.Studio.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Studio.V2.FlowValidateContext}\n   */\n  /* jshint ignore:end */\n  function FlowValidateListInstance(sid) {\n    return FlowValidateListInstance.get(sid);\n  }\n\n  FlowValidateListInstance._version = version;\n  // Path Solution\n  FlowValidateListInstance._solution = {};\n  FlowValidateListInstance._uri = `/Flows/Validate`;\n  /* jshint ignore:start */\n  /**\n   * update a FlowValidateInstance\n   *\n   * @function update\n   * @memberof Twilio.Studio.V2.FlowValidateList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the Flow\n   * @param {flow_validate.status} opts.status - The status of the Flow\n   * @param {object} opts.definition - JSON representation of flow definition\n   * @param {string} [opts.commitMessage] -\n   *          Description of change made in the revision\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FlowValidateInstance\n   */\n  /* jshint ignore:end */\n  FlowValidateListInstance.update = function update(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['status'])) {\n      throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n    }\n    if (_.isUndefined(opts['definition'])) {\n      throw new Error('Required parameter \"opts[\\'definition\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Status': _.get(opts, 'status'),\n      'Definition': serialize.object(_.get(opts, 'definition')),\n      'CommitMessage': _.get(opts, 'commitMessage')\n    });\n\n    var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FlowValidateInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Studio.V2.FlowValidateList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FlowValidateListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FlowValidateListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FlowValidateListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowValidatePage\n *\n * @constructor Twilio.Studio.V2.FlowValidatePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FlowValidateSolution} solution - Path solution\n *\n * @returns FlowValidatePage\n */\n/* jshint ignore:end */\nFlowValidatePage = function FlowValidatePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FlowValidatePage.prototype, Page.prototype);\nFlowValidatePage.prototype.constructor = FlowValidatePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FlowValidateInstance\n *\n * @function getInstance\n * @memberof Twilio.Studio.V2.FlowValidatePage#\n *\n * @param {FlowValidatePayload} payload - Payload response from the API\n *\n * @returns FlowValidateInstance\n */\n/* jshint ignore:end */\nFlowValidatePage.prototype.getInstance = function getInstance(payload) {\n  return new FlowValidateInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowValidatePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowValidatePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowValidatePage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FlowValidateContext\n *\n * @constructor Twilio.Studio.V2.FlowValidateInstance\n *\n * @property {boolean} valid - Boolean if the flow definition is valid\n *\n * @param {V2} version - Version of the resource\n * @param {FlowValidatePayload} payload - The instance payload\n */\n/* jshint ignore:end */\nFlowValidateInstance = function FlowValidateInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.valid = payload.valid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Studio.V2.FlowValidateInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFlowValidateInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFlowValidateInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FlowValidateList: FlowValidateList,\n  FlowValidatePage: FlowValidatePage,\n  FlowValidateInstance: FlowValidateInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar FlowList = require('./v2/flow').FlowList;\nvar FlowValidateList = require('./v2/flowValidate').FlowValidateList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V2 version of Studio\n *\n * @constructor Twilio.Studio.V2\n *\n * @property {Twilio.Studio.V2.FlowList} flows - flows resource\n * @property {Twilio.Studio.V2.FlowValidateList} flowValidate -\n *          flowValidate resource\n *\n * @param {Twilio.Studio} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V2(domain) {\n  Version.prototype.constructor.call(this, domain, 'v2');\n\n  // Resources\n  this._flows = undefined;\n  this._flowValidate = undefined;\n}\n\n_.extend(V2.prototype, Version.prototype);\nV2.prototype.constructor = V2;\n\nObject.defineProperty(V2.prototype,\n  'flows', {\n    get: function() {\n      this._flows = this._flows || new FlowList(this);\n      return this._flows;\n    }\n});\n\nObject.defineProperty(V2.prototype,\n  'flowValidate', {\n    get: function() {\n      this._flowValidate = this._flowValidate || new FlowValidateList(this);\n      return this._flowValidate;\n    }\n});\n\nmodule.exports = V2;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./studio/V1');  /* jshint ignore:line */\nvar V2 = require('./studio/V2');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize studio domain\n *\n * @constructor Twilio.Studio\n *\n * @property {Twilio.Studio.V1} v1 - v1 version\n * @property {Twilio.Studio.V2} v2 - v2 version\n * @property {Twilio.Studio.V2.FlowList} flows - flows resource\n * @property {Twilio.Studio.V2.FlowValidateList} flowValidate -\n *          flowValidate resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Studio(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://studio.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n  this._v2 = undefined;\n}\n\n_.extend(Studio.prototype, Domain.prototype);\nStudio.prototype.constructor = Studio;\n\nObject.defineProperty(Studio.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Studio.prototype,\n  'v2', {\n    get: function() {\n      this._v2 = this._v2 || new V2(this);\n      return this._v2;\n    }\n});\n\nObject.defineProperty(Studio.prototype,\n  'flows', {\n    get: function() {\n      return this.v2.flows;\n    }\n});\n\nObject.defineProperty(Studio.prototype,\n  'flowValidate', {\n    get: function() {\n      return this.v2.flowValidate;\n    }\n});\n\nmodule.exports = Studio;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar DocumentPermissionList;\nvar DocumentPermissionPage;\nvar DocumentPermissionInstance;\nvar DocumentPermissionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPermissionList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {string} documentSid - The Sync Document SID\n */\n/* jshint ignore:end */\nDocumentPermissionList = function DocumentPermissionList(version, serviceSid,\n                                                          documentSid) {\n  /* jshint ignore:start */\n  /**\n   * @function documentPermissions\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionContext}\n   */\n  /* jshint ignore:end */\n  function DocumentPermissionListInstance(sid) {\n    return DocumentPermissionListInstance.get(sid);\n  }\n\n  DocumentPermissionListInstance._version = version;\n  // Path Solution\n  DocumentPermissionListInstance._solution = {serviceSid: serviceSid, documentSid: documentSid};\n  DocumentPermissionListInstance._uri = `/Services/${serviceSid}/Documents/${documentSid}/Permissions`;\n  /* jshint ignore:start */\n  /**\n   * Streams DocumentPermissionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DocumentPermissionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DocumentPermissionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DocumentPermissionInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a document_permission\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @param {string} identity -\n   *          The application-defined string that uniquely identifies the User's Document Permission resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionContext}\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.get = function get(identity) {\n    return new DocumentPermissionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.documentSid,\n      identity\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DocumentPermissionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DocumentPermissionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DocumentPermissionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPermissionPage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DocumentPermissionSolution} solution - Path solution\n *\n * @returns DocumentPermissionPage\n */\n/* jshint ignore:end */\nDocumentPermissionPage = function DocumentPermissionPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DocumentPermissionPage.prototype, Page.prototype);\nDocumentPermissionPage.prototype.constructor = DocumentPermissionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DocumentPermissionInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionPage#\n *\n * @param {DocumentPermissionPayload} payload - Payload response from the API\n *\n * @returns DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionPage.prototype.getInstance = function getInstance(payload) {\n  return new DocumentPermissionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.documentSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentPermissionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDocumentPermissionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPermissionContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @property {string} documentSid - The Sync Document SID\n * @property {string} identity -\n *          The identity of the user to whom the Sync Document Permission applies\n * @property {boolean} read - Read access\n * @property {boolean} write - Write access\n * @property {boolean} manage - Manage access\n * @property {string} url -\n *          The absolute URL of the Sync Document Permission resource\n *\n * @param {V1} version - Version of the resource\n * @param {DocumentPermissionPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid} documentSid - The Sync Document SID\n * @param {string} identity -\n *          The application-defined string that uniquely identifies the User's Document Permission resource to fetch\n */\n/* jshint ignore:end */\nDocumentPermissionInstance = function DocumentPermissionInstance(version,\n    payload, serviceSid, documentSid, identity) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.documentSid = payload.document_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.read = payload.read; // jshint ignore:line\n  this.write = payload.write; // jshint ignore:line\n  this.manage = payload.manage; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {\n    serviceSid: serviceSid,\n    documentSid: documentSid,\n    identity: identity || this.identity,\n  };\n};\n\nObject.defineProperty(DocumentPermissionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DocumentPermissionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.documentSid,\n          this._solution.identity\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DocumentPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a DocumentPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a DocumentPermissionInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionInstance#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access\n * @param {boolean} opts.write - Write access\n * @param {boolean} opts.manage - Manage access\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentPermissionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDocumentPermissionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPermissionContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Sync Service with the Document Permission resource to fetch\n * @param {sid_like} documentSid -\n *          The SID of the Sync Document with the Document Permission resource to fetch\n * @param {string} identity -\n *          The application-defined string that uniquely identifies the User's Document Permission resource to fetch\n */\n/* jshint ignore:end */\nDocumentPermissionContext = function DocumentPermissionContext(version,\n    serviceSid, documentSid, identity) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, documentSid: documentSid, identity: identity, };\n  this._uri = `/Services/${serviceSid}/Documents/${documentSid}/Permissions/${identity}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DocumentPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DocumentPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.documentSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a DocumentPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a DocumentPermissionInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionContext#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access\n * @param {boolean} opts.write - Write access\n * @param {boolean} opts.manage - Manage access\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentPermissionInstance\n */\n/* jshint ignore:end */\nDocumentPermissionContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['read'])) {\n    throw new Error('Required parameter \"opts[\\'read\\']\" missing.');\n  }\n  if (_.isUndefined(opts['write'])) {\n    throw new Error('Required parameter \"opts[\\'write\\']\" missing.');\n  }\n  if (_.isUndefined(opts['manage'])) {\n    throw new Error('Required parameter \"opts[\\'manage\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Read': serialize.bool(_.get(opts, 'read')),\n    'Write': serialize.bool(_.get(opts, 'write')),\n    'Manage': serialize.bool(_.get(opts, 'manage'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DocumentPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.documentSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentPermissionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDocumentPermissionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DocumentPermissionList: DocumentPermissionList,\n  DocumentPermissionPage: DocumentPermissionPage,\n  DocumentPermissionInstance: DocumentPermissionInstance,\n  DocumentPermissionContext: DocumentPermissionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DocumentPermissionList = require(\n    './document/documentPermission').DocumentPermissionList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DocumentList;\nvar DocumentPage;\nvar DocumentInstance;\nvar DocumentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.DocumentList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n */\n/* jshint ignore:end */\nDocumentList = function DocumentList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function documents\n   * @memberof Twilio.Sync.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.DocumentContext}\n   */\n  /* jshint ignore:end */\n  function DocumentListInstance(sid) {\n    return DocumentListInstance.get(sid);\n  }\n\n  DocumentListInstance._version = version;\n  // Path Solution\n  DocumentListInstance._solution = {serviceSid: serviceSid};\n  DocumentListInstance._uri = `/Services/${serviceSid}/Documents`;\n  /* jshint ignore:start */\n  /**\n   * create a DocumentInstance\n   *\n   * @function create\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the Sync Document\n   * @param {object} [opts.data] -\n   *          A JSON string that represents an arbitrary, schema-less object that the Sync Document stores\n   * @param {number} [opts.ttl] -\n   *          How long, in seconds, before the Sync Document expires and is deleted\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed DocumentInstance\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Data': serialize.object(_.get(opts, 'data')),\n      'Ttl': _.get(opts, 'ttl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams DocumentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DocumentInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DocumentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DocumentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a document\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentList#\n   *\n   * @param {string} sid - The SID of the Document resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.DocumentContext}\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.get = function get(sid) {\n    return new DocumentContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.DocumentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DocumentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DocumentListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DocumentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentPage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.DocumentPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DocumentSolution} solution - Path solution\n *\n * @returns DocumentPage\n */\n/* jshint ignore:end */\nDocumentPage = function DocumentPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DocumentPage.prototype, Page.prototype);\nDocumentPage.prototype.constructor = DocumentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DocumentInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentPage#\n *\n * @param {DocumentPayload} payload - Payload response from the API\n *\n * @returns DocumentInstance\n */\n/* jshint ignore:end */\nDocumentPage.prototype.getInstance = function getInstance(payload) {\n  return new DocumentInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDocumentPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.DocumentInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @property {string} url - The absolute URL of the Document resource\n * @property {string} links - The URLs of resources related to the Sync Document\n * @property {string} revision -\n *          The current revision of the Sync Document, represented by a string identifier\n * @property {object} data -\n *          An arbitrary, schema-less object that the Sync Document stores\n * @property {Date} dateExpires -\n *          The ISO 8601 date and time in GMT when the Sync Document expires\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} createdBy - The identity of the Sync Document's creator\n *\n * @param {V1} version - Version of the resource\n * @param {DocumentPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid_like} sid - The SID of the Document resource to fetch\n */\n/* jshint ignore:end */\nDocumentInstance = function DocumentInstance(version, payload, serviceSid, sid)\n                                              {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.dateExpires = deserialize.iso8601DateTime(payload.date_expires); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(DocumentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DocumentContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a DocumentInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a DocumentInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.data] -\n *          A JSON string that represents an arbitrary, schema-less object that the Sync Document stores\n * @param {number} [opts.ttl] -\n *          How long, in seconds, before the Document resource expires and is deleted\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the documentPermissions\n *\n * @function documentPermissions\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionList}\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.documentPermissions = function documentPermissions()\n    {\n  return this._proxy.documentPermissions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDocumentInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DocumentContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.DocumentContext\n *\n * @property {Twilio.Sync.V1.ServiceContext.DocumentContext.DocumentPermissionList} documentPermissions -\n *          documentPermissions resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Sync Service with the Document resource to fetch\n * @param {sid_like} sid - The SID of the Document resource to fetch\n */\n/* jshint ignore:end */\nDocumentContext = function DocumentContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Documents/${sid}`;\n\n  // Dependents\n  this._documentPermissions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DocumentInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a DocumentInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a DocumentInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.data] -\n *          A JSON string that represents an arbitrary, schema-less object that the Sync Document stores\n * @param {number} [opts.ttl] -\n *          How long, in seconds, before the Document resource expires and is deleted\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DocumentInstance\n */\n/* jshint ignore:end */\nDocumentContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Data': serialize.object(_.get(opts, 'data')), 'Ttl': _.get(opts, 'ttl')});\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DocumentInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(DocumentContext.prototype,\n  'documentPermissions', {\n    get: function() {\n      if (!this._documentPermissions) {\n        this._documentPermissions = new DocumentPermissionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._documentPermissions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.DocumentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDocumentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDocumentContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DocumentList: DocumentList,\n  DocumentPage: DocumentPage,\n  DocumentInstance: DocumentInstance,\n  DocumentContext: DocumentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SyncListItemList;\nvar SyncListItemPage;\nvar SyncListItemInstance;\nvar SyncListItemContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListItemList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {string} listSid - The SID of the Sync List that contains the List Item\n */\n/* jshint ignore:end */\nSyncListItemList = function SyncListItemList(version, serviceSid, listSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncListItems\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemContext}\n   */\n  /* jshint ignore:end */\n  function SyncListItemListInstance(sid) {\n    return SyncListItemListInstance.get(sid);\n  }\n\n  SyncListItemListInstance._version = version;\n  // Path Solution\n  SyncListItemListInstance._solution = {serviceSid: serviceSid, listSid: listSid};\n  SyncListItemListInstance._uri = `/Services/${serviceSid}/Lists/${listSid}/Items`;\n  /* jshint ignore:start */\n  /**\n   * create a SyncListItemInstance\n   *\n   * @function create\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {object} opts - Options for request\n   * @param {object} opts.data -\n   *          A JSON string that represents an arbitrary, schema-less object that the List Item stores\n   * @param {number} [opts.ttl] - An alias for item_ttl\n   * @param {number} [opts.itemTtl] -\n   *          How long, in seconds, before the List Item expires\n   * @param {number} [opts.collectionTtl] -\n   *          How long, in seconds, before the List Item's parent Sync List expires\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SyncListItemInstance\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['data'])) {\n      throw new Error('Required parameter \"opts[\\'data\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Data': serialize.object(_.get(opts, 'data')),\n      'Ttl': _.get(opts, 'ttl'),\n      'ItemTtl': _.get(opts, 'itemTtl'),\n      'CollectionTtl': _.get(opts, 'collectionTtl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListItemInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.listSid,\n        this._solution.index\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SyncListItemInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_list_item.query_result_order} [opts.order] -\n   *          The order to return the List Items\n   * @param {string} [opts.from] -\n   *          The index of the first Sync List Item resource to read\n   * @param {sync_list_item.query_from_bound_type} [opts.bounds] -\n   *          Whether to include the List Item referenced by the from parameter\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncListItemInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_list_item.query_result_order} [opts.order] -\n   *          The order to return the List Items\n   * @param {string} [opts.from] -\n   *          The index of the first Sync List Item resource to read\n   * @param {sync_list_item.query_from_bound_type} [opts.bounds] -\n   *          Whether to include the List Item referenced by the from parameter\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncListItemInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_list_item.query_result_order} [opts.order] -\n   *          The order to return the List Items\n   * @param {string} [opts.from] -\n   *          The index of the first Sync List Item resource to read\n   * @param {sync_list_item.query_from_bound_type} [opts.bounds] -\n   *          Whether to include the List Item referenced by the from parameter\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'From': _.get(opts, 'from'),\n      'Bounds': _.get(opts, 'bounds'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListItemPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncListItemInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListItemPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_list_item\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @param {string} index - The index of the Sync List Item resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemContext}\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.get = function get(index) {\n    return new SyncListItemContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      index\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncListItemListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncListItemListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncListItemListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListItemPage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncListItemSolution} solution - Path solution\n *\n * @returns SyncListItemPage\n */\n/* jshint ignore:end */\nSyncListItemPage = function SyncListItemPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncListItemPage.prototype, Page.prototype);\nSyncListItemPage.prototype.constructor = SyncListItemPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncListItemInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemPage#\n *\n * @param {SyncListItemPayload} payload - Payload response from the API\n *\n * @returns SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncListItemInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.listSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListItemPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListItemPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListItemContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemInstance\n *\n * @property {number} index - The automatically generated index of the List Item\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @property {string} listSid -\n *          The SID of the Sync List that contains the List Item\n * @property {string} url - The absolute URL of the List Item resource\n * @property {string} revision -\n *          The current revision of the item, represented as a string\n * @property {object} data -\n *          An arbitrary, schema-less object that the List Item stores\n * @property {Date} dateExpires -\n *          The ISO 8601 date and time in GMT when the List Item expires\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} createdBy - The identity of the List Item's creator\n *\n * @param {V1} version - Version of the resource\n * @param {SyncListItemPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid} listSid - The SID of the Sync List that contains the List Item\n * @param {integer} index - The index of the Sync List Item resource to fetch\n */\n/* jshint ignore:end */\nSyncListItemInstance = function SyncListItemInstance(version, payload,\n                                                      serviceSid, listSid,\n                                                      index) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.index = deserialize.integer(payload.index); // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.listSid = payload.list_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.dateExpires = deserialize.iso8601DateTime(payload.date_expires); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, listSid: listSid, index: index || this.index, };\n};\n\nObject.defineProperty(SyncListItemInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncListItemContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.listSid,\n          this._solution.index\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListItemInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListItemInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListItemInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.data] -\n *          A JSON string that represents an arbitrary, schema-less object that the List Item stores\n * @param {number} [opts.ttl] - An alias for item_ttl\n * @param {number} [opts.itemTtl] -\n *          How long, in seconds, before the List Item expires\n * @param {number} [opts.collectionTtl] -\n *          How long, in seconds, before the List Item's parent Sync List expires\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListItemInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListItemInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListItemContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Sync Service with the Sync List Item resource to fetch\n * @param {sid_like} listSid -\n *          The SID of the Sync List with the Sync List Item resource to fetch\n * @param {integer} index - The index of the Sync List Item resource to fetch\n */\n/* jshint ignore:end */\nSyncListItemContext = function SyncListItemContext(version, serviceSid, listSid,\n                                                    index) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, listSid: listSid, index: index, };\n  this._uri = `/Services/${serviceSid}/Lists/${listSid}/Items/${index}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListItemInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListItemInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      this._solution.index\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListItemInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListItemInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.data] -\n *          A JSON string that represents an arbitrary, schema-less object that the List Item stores\n * @param {number} [opts.ttl] - An alias for item_ttl\n * @param {number} [opts.itemTtl] -\n *          How long, in seconds, before the List Item expires\n * @param {number} [opts.collectionTtl] -\n *          How long, in seconds, before the List Item's parent Sync List expires\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListItemInstance\n */\n/* jshint ignore:end */\nSyncListItemContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Data': serialize.object(_.get(opts, 'data')),\n    'Ttl': _.get(opts, 'ttl'),\n    'ItemTtl': _.get(opts, 'itemTtl'),\n    'CollectionTtl': _.get(opts, 'collectionTtl')\n  });\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListItemInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      this._solution.index\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListItemContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncListItemContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncListItemList: SyncListItemList,\n  SyncListItemPage: SyncListItemPage,\n  SyncListItemInstance: SyncListItemInstance,\n  SyncListItemContext: SyncListItemContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SyncListPermissionList;\nvar SyncListPermissionPage;\nvar SyncListPermissionInstance;\nvar SyncListPermissionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPermissionList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {string} listSid -\n *          The SID of the Sync List to which the Permission applies\n */\n/* jshint ignore:end */\nSyncListPermissionList = function SyncListPermissionList(version, serviceSid,\n                                                          listSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncListPermissions\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionContext}\n   */\n  /* jshint ignore:end */\n  function SyncListPermissionListInstance(sid) {\n    return SyncListPermissionListInstance.get(sid);\n  }\n\n  SyncListPermissionListInstance._version = version;\n  // Path Solution\n  SyncListPermissionListInstance._solution = {serviceSid: serviceSid, listSid: listSid};\n  SyncListPermissionListInstance._uri = `/Services/${serviceSid}/Lists/${listSid}/Permissions`;\n  /* jshint ignore:start */\n  /**\n   * Streams SyncListPermissionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncListPermissionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncListPermissionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncListPermissionInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_list_permission\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @param {string} identity -\n   *          The application-defined string that uniquely identifies the User's Sync List Permission resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionContext}\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.get = function get(identity) {\n    return new SyncListPermissionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      identity\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncListPermissionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncListPermissionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncListPermissionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPermissionPage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncListPermissionSolution} solution - Path solution\n *\n * @returns SyncListPermissionPage\n */\n/* jshint ignore:end */\nSyncListPermissionPage = function SyncListPermissionPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncListPermissionPage.prototype, Page.prototype);\nSyncListPermissionPage.prototype.constructor = SyncListPermissionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncListPermissionInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionPage#\n *\n * @param {SyncListPermissionPayload} payload - Payload response from the API\n *\n * @returns SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncListPermissionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.listSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListPermissionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListPermissionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPermissionContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @property {string} listSid -\n *          The SID of the Sync List to which the Permission applies\n * @property {string} identity -\n *          The identity of the user to whom the Sync List Permission applies\n * @property {boolean} read - Read access\n * @property {boolean} write - Write access\n * @property {boolean} manage - Manage access\n * @property {string} url - The absolute URL of the Sync List Permission resource\n *\n * @param {V1} version - Version of the resource\n * @param {SyncListPermissionPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid} listSid - The SID of the Sync List to which the Permission applies\n * @param {string} identity -\n *          The application-defined string that uniquely identifies the User's Sync List Permission resource to fetch\n */\n/* jshint ignore:end */\nSyncListPermissionInstance = function SyncListPermissionInstance(version,\n    payload, serviceSid, listSid, identity) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.listSid = payload.list_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.read = payload.read; // jshint ignore:line\n  this.write = payload.write; // jshint ignore:line\n  this.manage = payload.manage; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, listSid: listSid, identity: identity || this.identity, };\n};\n\nObject.defineProperty(SyncListPermissionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncListPermissionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.listSid,\n          this._solution.identity\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListPermissionInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionInstance#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access\n * @param {boolean} opts.write - Write access\n * @param {boolean} opts.manage - Manage access\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListPermissionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListPermissionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPermissionContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Sync Service with the Sync List Permission resource to fetch\n * @param {sid_like} listSid -\n *          The SID of the Sync List with the Sync List Permission resource to fetch\n * @param {string} identity -\n *          The application-defined string that uniquely identifies the User's Sync List Permission resource to fetch\n */\n/* jshint ignore:end */\nSyncListPermissionContext = function SyncListPermissionContext(version,\n    serviceSid, listSid, identity) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, listSid: listSid, identity: identity, };\n  this._uri = `/Services/${serviceSid}/Lists/${listSid}/Permissions/${identity}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListPermissionInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionContext#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access\n * @param {boolean} opts.write - Write access\n * @param {boolean} opts.manage - Manage access\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListPermissionInstance\n */\n/* jshint ignore:end */\nSyncListPermissionContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['read'])) {\n    throw new Error('Required parameter \"opts[\\'read\\']\" missing.');\n  }\n  if (_.isUndefined(opts['write'])) {\n    throw new Error('Required parameter \"opts[\\'write\\']\" missing.');\n  }\n  if (_.isUndefined(opts['manage'])) {\n    throw new Error('Required parameter \"opts[\\'manage\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Read': serialize.bool(_.get(opts, 'read')),\n    'Write': serialize.bool(_.get(opts, 'write')),\n    'Manage': serialize.bool(_.get(opts, 'manage'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.listSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListPermissionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncListPermissionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncListPermissionList: SyncListPermissionList,\n  SyncListPermissionPage: SyncListPermissionPage,\n  SyncListPermissionInstance: SyncListPermissionInstance,\n  SyncListPermissionContext: SyncListPermissionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar SyncListItemList = require('./syncList/syncListItem').SyncListItemList;\nvar SyncListPermissionList = require(\n    './syncList/syncListPermission').SyncListPermissionList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SyncListList;\nvar SyncListPage;\nvar SyncListInstance;\nvar SyncListContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n */\n/* jshint ignore:end */\nSyncListList = function SyncListList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncLists\n   * @memberof Twilio.Sync.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncListContext}\n   */\n  /* jshint ignore:end */\n  function SyncListListInstance(sid) {\n    return SyncListListInstance.get(sid);\n  }\n\n  SyncListListInstance._version = version;\n  // Path Solution\n  SyncListListInstance._solution = {serviceSid: serviceSid};\n  SyncListListInstance._uri = `/Services/${serviceSid}/Lists`;\n  /* jshint ignore:start */\n  /**\n   * create a SyncListInstance\n   *\n   * @function create\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {number} [opts.ttl] - Alias for collection_ttl\n   * @param {number} [opts.collectionTtl] -\n   *          How long, in seconds, before the Sync List expires and is deleted\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SyncListInstance\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Ttl': _.get(opts, 'ttl'),\n      'CollectionTtl': _.get(opts, 'collectionTtl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SyncListInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncListInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_list\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListList#\n   *\n   * @param {string} sid - The SID of the Sync List resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncListContext}\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.get = function get(sid) {\n    return new SyncListContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncListList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncListListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncListListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncListListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListPage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncListSolution} solution - Path solution\n *\n * @returns SyncListPage\n */\n/* jshint ignore:end */\nSyncListPage = function SyncListPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncListPage.prototype, Page.prototype);\nSyncListPage.prototype.constructor = SyncListPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncListInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListPage#\n *\n * @param {SyncListPayload} payload - Payload response from the API\n *\n * @returns SyncListInstance\n */\n/* jshint ignore:end */\nSyncListPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncListInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @property {string} url - The absolute URL of the Sync List resource\n * @property {string} links - The URLs of the Sync List's nested resources\n * @property {string} revision -\n *          The current revision of the Sync List, represented as a string\n * @property {Date} dateExpires -\n *          The ISO 8601 date and time in GMT when the Sync List expires\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} createdBy - The identity of the Sync List's creator\n *\n * @param {V1} version - Version of the resource\n * @param {SyncListPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid_like} sid - The SID of the Sync List resource to fetch\n */\n/* jshint ignore:end */\nSyncListInstance = function SyncListInstance(version, payload, serviceSid, sid)\n                                              {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.dateExpires = deserialize.iso8601DateTime(payload.date_expires); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SyncListInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncListContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.ttl] - An alias for collection_ttl\n * @param {number} [opts.collectionTtl] -\n *          How long, in seconds, before the Sync List expires and is deleted\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncListItems\n *\n * @function syncListItems\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList}\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.syncListItems = function syncListItems() {\n  return this._proxy.syncListItems;\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncListPermissions\n *\n * @function syncListPermissions\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionList}\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.syncListPermissions = function syncListPermissions()\n    {\n  return this._proxy.syncListPermissions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncListInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncListContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncListContext\n *\n * @property {Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListItemList} syncListItems -\n *          syncListItems resource\n * @property {Twilio.Sync.V1.ServiceContext.SyncListContext.SyncListPermissionList} syncListPermissions -\n *          syncListPermissions resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Sync Service with the Sync List resource to fetch\n * @param {sid_like} sid - The SID of the Sync List resource to fetch\n */\n/* jshint ignore:end */\nSyncListContext = function SyncListContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Lists/${sid}`;\n\n  // Dependents\n  this._syncListItems = undefined;\n  this._syncListPermissions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncListInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncListInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncListInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.ttl] - An alias for collection_ttl\n * @param {number} [opts.collectionTtl] -\n *          How long, in seconds, before the Sync List expires and is deleted\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncListInstance\n */\n/* jshint ignore:end */\nSyncListContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Ttl': _.get(opts, 'ttl'), 'CollectionTtl': _.get(opts, 'collectionTtl')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncListInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SyncListContext.prototype,\n  'syncListItems', {\n    get: function() {\n      if (!this._syncListItems) {\n        this._syncListItems = new SyncListItemList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._syncListItems;\n    }\n});\n\nObject.defineProperty(SyncListContext.prototype,\n  'syncListPermissions', {\n    get: function() {\n      if (!this._syncListPermissions) {\n        this._syncListPermissions = new SyncListPermissionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._syncListPermissions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncListContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncListContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncListContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncListList: SyncListList,\n  SyncListPage: SyncListPage,\n  SyncListInstance: SyncListInstance,\n  SyncListContext: SyncListContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SyncMapItemList;\nvar SyncMapItemPage;\nvar SyncMapItemInstance;\nvar SyncMapItemContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapItemList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {string} mapSid - The SID of the Sync Map that contains the Map Item\n */\n/* jshint ignore:end */\nSyncMapItemList = function SyncMapItemList(version, serviceSid, mapSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncMapItems\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemContext}\n   */\n  /* jshint ignore:end */\n  function SyncMapItemListInstance(sid) {\n    return SyncMapItemListInstance.get(sid);\n  }\n\n  SyncMapItemListInstance._version = version;\n  // Path Solution\n  SyncMapItemListInstance._solution = {serviceSid: serviceSid, mapSid: mapSid};\n  SyncMapItemListInstance._uri = `/Services/${serviceSid}/Maps/${mapSid}/Items`;\n  /* jshint ignore:start */\n  /**\n   * create a SyncMapItemInstance\n   *\n   * @function create\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.key - The unique, user-defined key for the Map Item\n   * @param {object} opts.data -\n   *          A JSON string that represents an arbitrary, schema-less object that the Map Item stores\n   * @param {number} [opts.ttl] - An alias for item_ttl\n   * @param {number} [opts.itemTtl] -\n   *          How long, in seconds, before the Map Item expires\n   * @param {number} [opts.collectionTtl] -\n   *          How long, in seconds, before the Map Item's parent Sync Map expires and is deleted\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SyncMapItemInstance\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['key'])) {\n      throw new Error('Required parameter \"opts[\\'key\\']\" missing.');\n    }\n    if (_.isUndefined(opts['data'])) {\n      throw new Error('Required parameter \"opts[\\'data\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Key': _.get(opts, 'key'),\n      'Data': serialize.object(_.get(opts, 'data')),\n      'Ttl': _.get(opts, 'ttl'),\n      'ItemTtl': _.get(opts, 'itemTtl'),\n      'CollectionTtl': _.get(opts, 'collectionTtl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapItemInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.mapSid,\n        this._solution.key\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SyncMapItemInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_map_item.query_result_order} [opts.order] -\n   *          How to order the Map Items returned by their key value\n   * @param {string} [opts.from] -\n   *          The index of the first Sync Map Item resource to read\n   * @param {sync_map_item.query_from_bound_type} [opts.bounds] -\n   *          Whether to include the Map Item referenced by the from parameter\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncMapItemInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_map_item.query_result_order} [opts.order] -\n   *          How to order the Map Items returned by their key value\n   * @param {string} [opts.from] -\n   *          The index of the first Sync Map Item resource to read\n   * @param {sync_map_item.query_from_bound_type} [opts.bounds] -\n   *          Whether to include the Map Item referenced by the from parameter\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncMapItemInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sync_map_item.query_result_order} [opts.order] -\n   *          How to order the Map Items returned by their key value\n   * @param {string} [opts.from] -\n   *          The index of the first Sync Map Item resource to read\n   * @param {sync_map_item.query_from_bound_type} [opts.bounds] -\n   *          Whether to include the Map Item referenced by the from parameter\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Order': _.get(opts, 'order'),\n      'From': _.get(opts, 'from'),\n      'Bounds': _.get(opts, 'bounds'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapItemPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncMapItemInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapItemPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_map_item\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @param {string} key - The key value of the Sync Map Item resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemContext}\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.get = function get(key) {\n    return new SyncMapItemContext(this._version, this._solution.serviceSid, this._solution.mapSid, key);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncMapItemListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncMapItemListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncMapItemListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapItemPage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncMapItemSolution} solution - Path solution\n *\n * @returns SyncMapItemPage\n */\n/* jshint ignore:end */\nSyncMapItemPage = function SyncMapItemPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncMapItemPage.prototype, Page.prototype);\nSyncMapItemPage.prototype.constructor = SyncMapItemPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncMapItemInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemPage#\n *\n * @param {SyncMapItemPayload} payload - Payload response from the API\n *\n * @returns SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncMapItemInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.mapSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapItemPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapItemPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapItemContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemInstance\n *\n * @property {string} key - The unique, user-defined key for the Map Item\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @property {string} mapSid - The SID of the Sync Map that contains the Map Item\n * @property {string} url - The absolute URL of the Map Item resource\n * @property {string} revision -\n *          The current revision of the Map Item, represented as a string\n * @property {object} data -\n *          An arbitrary, schema-less object that the Map Item stores\n * @property {Date} dateExpires -\n *          The ISO 8601 date and time in GMT when the Map Item expires\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} createdBy - The identity of the Map Item's creator\n *\n * @param {V1} version - Version of the resource\n * @param {SyncMapItemPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid} mapSid - The SID of the Sync Map that contains the Map Item\n * @param {string} key - The key value of the Sync Map Item resource to fetch\n */\n/* jshint ignore:end */\nSyncMapItemInstance = function SyncMapItemInstance(version, payload, serviceSid,\n                                                    mapSid, key) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.key = payload.key; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.mapSid = payload.map_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n  this.dateExpires = deserialize.iso8601DateTime(payload.date_expires); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, mapSid: mapSid, key: key || this.key, };\n};\n\nObject.defineProperty(SyncMapItemInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncMapItemContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.mapSid,\n          this._solution.key\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapItemInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapItemInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapItemInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.data] -\n *          A JSON string that represents an arbitrary, schema-less object that the Map Item stores\n * @param {number} [opts.ttl] - An alias for item_ttl\n * @param {number} [opts.itemTtl] -\n *          How long, in seconds, before the Map Item expires\n * @param {number} [opts.collectionTtl] -\n *          How long, in seconds, before the Map Item's parent Sync Map expires and is deleted\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapItemInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapItemInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapItemContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Sync Service with the Sync Map Item resource to fetch\n * @param {sid_like} mapSid -\n *          The SID of the Sync Map with the Sync Map Item resource to fetch\n * @param {string} key - The key value of the Sync Map Item resource to fetch\n */\n/* jshint ignore:end */\nSyncMapItemContext = function SyncMapItemContext(version, serviceSid, mapSid,\n                                                  key) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, mapSid: mapSid, key: key, };\n  this._uri = `/Services/${serviceSid}/Maps/${mapSid}/Items/${key}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapItemInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapItemInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      this._solution.key\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapItemInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapItemInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemContext#\n *\n * @param {object} [opts] - Options for request\n * @param {object} [opts.data] -\n *          A JSON string that represents an arbitrary, schema-less object that the Map Item stores\n * @param {number} [opts.ttl] - An alias for item_ttl\n * @param {number} [opts.itemTtl] -\n *          How long, in seconds, before the Map Item expires\n * @param {number} [opts.collectionTtl] -\n *          How long, in seconds, before the Map Item's parent Sync Map expires and is deleted\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapItemInstance\n */\n/* jshint ignore:end */\nSyncMapItemContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Data': serialize.object(_.get(opts, 'data')),\n    'Ttl': _.get(opts, 'ttl'),\n    'ItemTtl': _.get(opts, 'itemTtl'),\n    'CollectionTtl': _.get(opts, 'collectionTtl')\n  });\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapItemInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      this._solution.key\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapItemContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncMapItemContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncMapItemList: SyncMapItemList,\n  SyncMapItemPage: SyncMapItemPage,\n  SyncMapItemInstance: SyncMapItemInstance,\n  SyncMapItemContext: SyncMapItemContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SyncMapPermissionList;\nvar SyncMapPermissionPage;\nvar SyncMapPermissionInstance;\nvar SyncMapPermissionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPermissionList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {string} mapSid - Sync Map SID\n */\n/* jshint ignore:end */\nSyncMapPermissionList = function SyncMapPermissionList(version, serviceSid,\n                                                        mapSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncMapPermissions\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionContext}\n   */\n  /* jshint ignore:end */\n  function SyncMapPermissionListInstance(sid) {\n    return SyncMapPermissionListInstance.get(sid);\n  }\n\n  SyncMapPermissionListInstance._version = version;\n  // Path Solution\n  SyncMapPermissionListInstance._solution = {serviceSid: serviceSid, mapSid: mapSid};\n  SyncMapPermissionListInstance._uri = `/Services/${serviceSid}/Maps/${mapSid}/Permissions`;\n  /* jshint ignore:start */\n  /**\n   * Streams SyncMapPermissionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncMapPermissionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncMapPermissionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncMapPermissionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapPermissionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_map_permission\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @param {string} identity -\n   *          The application-defined string that uniquely identifies the User's Sync Map Permission resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionContext}\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.get = function get(identity) {\n    return new SyncMapPermissionContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      identity\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncMapPermissionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncMapPermissionListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncMapPermissionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPermissionPage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncMapPermissionSolution} solution - Path solution\n *\n * @returns SyncMapPermissionPage\n */\n/* jshint ignore:end */\nSyncMapPermissionPage = function SyncMapPermissionPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncMapPermissionPage.prototype, Page.prototype);\nSyncMapPermissionPage.prototype.constructor = SyncMapPermissionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncMapPermissionInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionPage#\n *\n * @param {SyncMapPermissionPayload} payload - Payload response from the API\n *\n * @returns SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncMapPermissionInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.mapSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapPermissionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapPermissionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPermissionContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @property {string} mapSid - Sync Map SID\n * @property {string} identity -\n *          The identity of the user to whom the Sync Document Permission applies\n * @property {boolean} read - Read access\n * @property {boolean} write - Write access\n * @property {boolean} manage - Manage access\n * @property {string} url - The absolute URL of the Sync Map Permission resource\n *\n * @param {V1} version - Version of the resource\n * @param {SyncMapPermissionPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid} mapSid - Sync Map SID\n * @param {string} identity -\n *          The application-defined string that uniquely identifies the User's Sync Map Permission resource to fetch\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance = function SyncMapPermissionInstance(version, payload,\n    serviceSid, mapSid, identity) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.mapSid = payload.map_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.read = payload.read; // jshint ignore:line\n  this.write = payload.write; // jshint ignore:line\n  this.manage = payload.manage; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, mapSid: mapSid, identity: identity || this.identity, };\n};\n\nObject.defineProperty(SyncMapPermissionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncMapPermissionContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.mapSid,\n          this._solution.identity\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapPermissionInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionInstance#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access\n * @param {boolean} opts.write - Write access\n * @param {boolean} opts.manage - Manage access\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapPermissionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapPermissionInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPermissionContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Sync Service with the Sync Map Permission resource to fetch\n * @param {sid_like} mapSid -\n *          The SID of the Sync Map with the Sync Map Permission resource to fetch\n * @param {string} identity -\n *          The application-defined string that uniquely identifies the User's Sync Map Permission resource to fetch\n */\n/* jshint ignore:end */\nSyncMapPermissionContext = function SyncMapPermissionContext(version,\n    serviceSid, mapSid, identity) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, mapSid: mapSid, identity: identity, };\n  this._uri = `/Services/${serviceSid}/Maps/${mapSid}/Permissions/${identity}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapPermissionInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapPermissionInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapPermissionInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionContext#\n *\n * @param {object} opts - Options for request\n * @param {boolean} opts.read - Read access\n * @param {boolean} opts.write - Write access\n * @param {boolean} opts.manage - Manage access\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapPermissionInstance\n */\n/* jshint ignore:end */\nSyncMapPermissionContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['read'])) {\n    throw new Error('Required parameter \"opts[\\'read\\']\" missing.');\n  }\n  if (_.isUndefined(opts['write'])) {\n    throw new Error('Required parameter \"opts[\\'write\\']\" missing.');\n  }\n  if (_.isUndefined(opts['manage'])) {\n    throw new Error('Required parameter \"opts[\\'manage\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Read': serialize.bool(_.get(opts, 'read')),\n    'Write': serialize.bool(_.get(opts, 'write')),\n    'Manage': serialize.bool(_.get(opts, 'manage'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapPermissionInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.mapSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapPermissionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncMapPermissionContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncMapPermissionList: SyncMapPermissionList,\n  SyncMapPermissionPage: SyncMapPermissionPage,\n  SyncMapPermissionInstance: SyncMapPermissionInstance,\n  SyncMapPermissionContext: SyncMapPermissionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar SyncMapItemList = require('./syncMap/syncMapItem').SyncMapItemList;\nvar SyncMapPermissionList = require(\n    './syncMap/syncMapPermission').SyncMapPermissionList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SyncMapList;\nvar SyncMapPage;\nvar SyncMapInstance;\nvar SyncMapContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n */\n/* jshint ignore:end */\nSyncMapList = function SyncMapList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncMaps\n   * @memberof Twilio.Sync.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncMapContext}\n   */\n  /* jshint ignore:end */\n  function SyncMapListInstance(sid) {\n    return SyncMapListInstance.get(sid);\n  }\n\n  SyncMapListInstance._version = version;\n  // Path Solution\n  SyncMapListInstance._solution = {serviceSid: serviceSid};\n  SyncMapListInstance._uri = `/Services/${serviceSid}/Maps`;\n  /* jshint ignore:start */\n  /**\n   * create a SyncMapInstance\n   *\n   * @function create\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {number} [opts.ttl] - An alias for collection_ttl\n   * @param {number} [opts.collectionTtl] -\n   *          How long, in seconds, before the Sync Map expires and is deleted\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SyncMapInstance\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Ttl': _.get(opts, 'ttl'),\n      'CollectionTtl': _.get(opts, 'collectionTtl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SyncMapInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncMapInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncMapInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncMapInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncMapPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_map\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapList#\n   *\n   * @param {string} sid - The SID of the Sync Map resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncMapContext}\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.get = function get(sid) {\n    return new SyncMapContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncMapList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncMapListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncMapListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncMapListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapPage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncMapSolution} solution - Path solution\n *\n * @returns SyncMapPage\n */\n/* jshint ignore:end */\nSyncMapPage = function SyncMapPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncMapPage.prototype, Page.prototype);\nSyncMapPage.prototype.constructor = SyncMapPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncMapInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapPage#\n *\n * @param {SyncMapPayload} payload - Payload response from the API\n *\n * @returns SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncMapInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @property {string} url - The absolute URL of the Sync Map resource\n * @property {string} links - The URLs of the Sync Map's nested resources\n * @property {string} revision -\n *          The current revision of the Sync Map, represented as a string\n * @property {Date} dateExpires -\n *          The ISO 8601 date and time in GMT when the Sync Map expires\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} createdBy - The identity of the Sync Map's creator\n *\n * @param {V1} version - Version of the resource\n * @param {SyncMapPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid_like} sid - The SID of the Sync Map resource to fetch\n */\n/* jshint ignore:end */\nSyncMapInstance = function SyncMapInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.revision = payload.revision; // jshint ignore:line\n  this.dateExpires = deserialize.iso8601DateTime(payload.date_expires); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SyncMapInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncMapContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.ttl] - An alias for collection_ttl\n * @param {number} [opts.collectionTtl] -\n *          How long, in seconds, before the Sync Map expires and is deleted\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncMapItems\n *\n * @function syncMapItems\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList}\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.syncMapItems = function syncMapItems() {\n  return this._proxy.syncMapItems;\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncMapPermissions\n *\n * @function syncMapPermissions\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionList}\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.syncMapPermissions = function syncMapPermissions() {\n  return this._proxy.syncMapPermissions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncMapInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncMapContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncMapContext\n *\n * @property {Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapItemList} syncMapItems -\n *          syncMapItems resource\n * @property {Twilio.Sync.V1.ServiceContext.SyncMapContext.SyncMapPermissionList} syncMapPermissions -\n *          syncMapPermissions resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Sync Service with the Sync Map resource to fetch\n * @param {sid_like} sid - The SID of the Sync Map resource to fetch\n */\n/* jshint ignore:end */\nSyncMapContext = function SyncMapContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Maps/${sid}`;\n\n  // Dependents\n  this._syncMapItems = undefined;\n  this._syncMapPermissions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncMapInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncMapInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncMapInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.ttl] - An alias for collection_ttl\n * @param {number} [opts.collectionTtl] -\n *          How long, in seconds, before the Sync Map expires and is deleted\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncMapInstance\n */\n/* jshint ignore:end */\nSyncMapContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Ttl': _.get(opts, 'ttl'), 'CollectionTtl': _.get(opts, 'collectionTtl')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncMapInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SyncMapContext.prototype,\n  'syncMapItems', {\n    get: function() {\n      if (!this._syncMapItems) {\n        this._syncMapItems = new SyncMapItemList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._syncMapItems;\n    }\n});\n\nObject.defineProperty(SyncMapContext.prototype,\n  'syncMapPermissions', {\n    get: function() {\n      if (!this._syncMapPermissions) {\n        this._syncMapPermissions = new SyncMapPermissionList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._syncMapPermissions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncMapContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncMapContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncMapContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncMapList: SyncMapList,\n  SyncMapPage: SyncMapPage,\n  SyncMapInstance: SyncMapInstance,\n  SyncMapContext: SyncMapContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar StreamMessageList;\nvar StreamMessagePage;\nvar StreamMessageInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the StreamMessageList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessageList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {string} streamSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nStreamMessageList = function StreamMessageList(version, serviceSid, streamSid) {\n  /* jshint ignore:start */\n  /**\n   * @function streamMessages\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessageContext}\n   */\n  /* jshint ignore:end */\n  function StreamMessageListInstance(sid) {\n    return StreamMessageListInstance.get(sid);\n  }\n\n  StreamMessageListInstance._version = version;\n  // Path Solution\n  StreamMessageListInstance._solution = {serviceSid: serviceSid, streamSid: streamSid};\n  StreamMessageListInstance._uri = `/Services/${serviceSid}/Streams/${streamSid}/Messages`;\n  /* jshint ignore:start */\n  /**\n   * create a StreamMessageInstance\n   *\n   * @function create\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessageList#\n   *\n   * @param {object} opts - Options for request\n   * @param {object} opts.data -\n   *          A JSON string that represents an arbitrary, schema-less object that makes up the Stream Message body\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed StreamMessageInstance\n   */\n  /* jshint ignore:end */\n  StreamMessageListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['data'])) {\n      throw new Error('Required parameter \"opts[\\'data\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Data': serialize.object(_.get(opts, 'data'))});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new StreamMessageInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessageList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  StreamMessageListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  StreamMessageListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return StreamMessageListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StreamMessagePage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessagePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {StreamMessageSolution} solution - Path solution\n *\n * @returns StreamMessagePage\n */\n/* jshint ignore:end */\nStreamMessagePage = function StreamMessagePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(StreamMessagePage.prototype, Page.prototype);\nStreamMessagePage.prototype.constructor = StreamMessagePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of StreamMessageInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessagePage#\n *\n * @param {StreamMessagePayload} payload - Payload response from the API\n *\n * @returns StreamMessageInstance\n */\n/* jshint ignore:end */\nStreamMessagePage.prototype.getInstance = function getInstance(payload) {\n  return new StreamMessageInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.streamSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessagePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStreamMessagePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStreamMessagePage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the StreamMessageContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessageInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {object} data - Stream Message body\n *\n * @param {V1} version - Version of the resource\n * @param {StreamMessagePayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid} streamSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nStreamMessageInstance = function StreamMessageInstance(version, payload,\n                                                        serviceSid, streamSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, streamSid: streamSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessageInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nStreamMessageInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nStreamMessageInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  StreamMessageList: StreamMessageList,\n  StreamMessagePage: StreamMessagePage,\n  StreamMessageInstance: StreamMessageInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar StreamMessageList = require('./syncStream/streamMessage').StreamMessageList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SyncStreamList;\nvar SyncStreamPage;\nvar SyncStreamInstance;\nvar SyncStreamContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncStreamList\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncStreamList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n */\n/* jshint ignore:end */\nSyncStreamList = function SyncStreamList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function syncStreams\n   * @memberof Twilio.Sync.V1.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncStreamContext}\n   */\n  /* jshint ignore:end */\n  function SyncStreamListInstance(sid) {\n    return SyncStreamListInstance.get(sid);\n  }\n\n  SyncStreamListInstance._version = version;\n  // Path Solution\n  SyncStreamListInstance._solution = {serviceSid: serviceSid};\n  SyncStreamListInstance._uri = `/Services/${serviceSid}/Streams`;\n  /* jshint ignore:start */\n  /**\n   * create a SyncStreamInstance\n   *\n   * @function create\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {number} [opts.ttl] -\n   *          How long, in seconds, before the Stream expires and is deleted\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SyncStreamInstance\n   */\n  /* jshint ignore:end */\n  SyncStreamListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'UniqueName': _.get(opts, 'uniqueName'), 'Ttl': _.get(opts, 'ttl')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncStreamInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SyncStreamInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SyncStreamListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SyncStreamInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncStreamListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SyncStreamInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncStreamListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncStreamPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SyncStreamInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SyncStreamListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SyncStreamPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sync_stream\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamList#\n   *\n   * @param {string} sid - The SID of the Stream resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext.SyncStreamContext}\n   */\n  /* jshint ignore:end */\n  SyncStreamListInstance.get = function get(sid) {\n    return new SyncStreamContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SyncStreamListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SyncStreamListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SyncStreamListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncStreamPage\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncStreamPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SyncStreamSolution} solution - Path solution\n *\n * @returns SyncStreamPage\n */\n/* jshint ignore:end */\nSyncStreamPage = function SyncStreamPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SyncStreamPage.prototype, Page.prototype);\nSyncStreamPage.prototype.constructor = SyncStreamPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SyncStreamInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamPage#\n *\n * @param {SyncStreamPayload} payload - Payload response from the API\n *\n * @returns SyncStreamInstance\n */\n/* jshint ignore:end */\nSyncStreamPage.prototype.getInstance = function getInstance(payload) {\n  return new SyncStreamInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncStreamPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncStreamPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncStreamContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncStreamInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @property {string} url - The absolute URL of the Message Stream resource\n * @property {string} links - The URLs of the Stream's nested resources\n * @property {Date} dateExpires -\n *          The ISO 8601 date and time in GMT when the Message Stream expires\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} createdBy - The Identity of the Stream's creator\n *\n * @param {V1} version - Version of the resource\n * @param {SyncStreamPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Sync Service that the resource is associated with\n * @param {sid_like} sid - The SID of the Stream resource to fetch\n */\n/* jshint ignore:end */\nSyncStreamInstance = function SyncStreamInstance(version, payload, serviceSid,\n                                                  sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.dateExpires = deserialize.iso8601DateTime(payload.date_expires); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.createdBy = payload.created_by; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SyncStreamInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SyncStreamContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SyncStreamInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncStreamInstance\n */\n/* jshint ignore:end */\nSyncStreamInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncStreamInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncStreamInstance\n */\n/* jshint ignore:end */\nSyncStreamInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncStreamInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.ttl] -\n *          How long, in seconds, before the Stream expires and is deleted\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncStreamInstance\n */\n/* jshint ignore:end */\nSyncStreamInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the streamMessages\n *\n * @function streamMessages\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessageList}\n */\n/* jshint ignore:end */\nSyncStreamInstance.prototype.streamMessages = function streamMessages() {\n  return this._proxy.streamMessages;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncStreamInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSyncStreamInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SyncStreamContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext.SyncStreamContext\n *\n * @property {Twilio.Sync.V1.ServiceContext.SyncStreamContext.StreamMessageList} streamMessages -\n *          streamMessages resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} serviceSid -\n *          The SID of the Sync Service with the Sync Stream resource to fetch\n * @param {sid_like} sid - The SID of the Stream resource to fetch\n */\n/* jshint ignore:end */\nSyncStreamContext = function SyncStreamContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Streams/${sid}`;\n\n  // Dependents\n  this._streamMessages = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SyncStreamInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncStreamInstance\n */\n/* jshint ignore:end */\nSyncStreamContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncStreamInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SyncStreamInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncStreamInstance\n */\n/* jshint ignore:end */\nSyncStreamContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SyncStreamInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.ttl] -\n *          How long, in seconds, before the Stream expires and is deleted\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SyncStreamInstance\n */\n/* jshint ignore:end */\nSyncStreamContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Ttl': _.get(opts, 'ttl')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SyncStreamInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SyncStreamContext.prototype,\n  'streamMessages', {\n    get: function() {\n      if (!this._streamMessages) {\n        this._streamMessages = new StreamMessageList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n      return this._streamMessages;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext.SyncStreamContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSyncStreamContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSyncStreamContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SyncStreamList: SyncStreamList,\n  SyncStreamPage: SyncStreamPage,\n  SyncStreamInstance: SyncStreamInstance,\n  SyncStreamContext: SyncStreamContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DocumentList = require('./service/document').DocumentList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar SyncListList = require('./service/syncList').SyncListList;\nvar SyncMapList = require('./service/syncMap').SyncMapList;\nvar SyncStreamList = require('./service/syncStream').SyncStreamList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * @constructor Twilio.Sync.V1.ServiceList\n *\n * @param {Twilio.Sync.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Sync.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Sync.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          A string that you assign to describe the resource\n   * @param {string} [opts.webhookUrl] -\n   *          The URL we should call when Sync objects are manipulated\n   * @param {boolean} [opts.reachabilityWebhooksEnabled] -\n   *          Whether the service instance should call webhook_url when client endpoints connect to Sync\n   * @param {boolean} [opts.aclEnabled] -\n   *          Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource\n   * @param {boolean} [opts.reachabilityDebouncingEnabled] -\n   *          Whether every endpoint_disconnected event occurs after a configurable delay\n   * @param {number} [opts.reachabilityDebouncingWindow] -\n   *          The reachability event delay in milliseconds\n   * @param {boolean} [opts.webhooksFromRestEnabled] -\n   *          Whether the Service instance should call webhook_url when the REST API is used to update Sync objects\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'WebhookUrl': _.get(opts, 'webhookUrl'),\n      'ReachabilityWebhooksEnabled': serialize.bool(_.get(opts, 'reachabilityWebhooksEnabled')),\n      'AclEnabled': serialize.bool(_.get(opts, 'aclEnabled')),\n      'ReachabilityDebouncingEnabled': serialize.bool(_.get(opts, 'reachabilityDebouncingEnabled')),\n      'ReachabilityDebouncingWindow': _.get(opts, 'reachabilityDebouncingWindow'),\n      'WebhooksFromRestEnabled': serialize.bool(_.get(opts, 'webhooksFromRestEnabled'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Sync.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Sync.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Sync.V1.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Sync.V1.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Sync.V1.ServiceList#\n   *\n   * @param {string} sid - The SID of the Service resource to fetch\n   *\n   * @returns {Twilio.Sync.V1.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Sync.V1.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * @constructor Twilio.Sync.V1.ServicePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Sync.V1.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Sync.V1.ServiceInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Service resource\n * @property {string} webhookUrl -\n *          The URL we call when Sync objects are manipulated\n * @property {boolean} webhooksFromRestEnabled -\n *          Whether the Service instance should call webhook_url when the REST API is used to update Sync objects\n * @property {boolean} reachabilityWebhooksEnabled -\n *          Whether the service instance calls webhook_url when client endpoints connect to Sync\n * @property {boolean} aclEnabled -\n *          Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource\n * @property {boolean} reachabilityDebouncingEnabled -\n *          Whether every endpoint_disconnected event occurs after a configurable delay\n * @property {number} reachabilityDebouncingWindow -\n *          The reachability event delay in milliseconds\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid_like} sid - The SID of the Service resource to fetch\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.webhooksFromRestEnabled = payload.webhooks_from_rest_enabled; // jshint ignore:line\n  this.reachabilityWebhooksEnabled = payload.reachability_webhooks_enabled; // jshint ignore:line\n  this.aclEnabled = payload.acl_enabled; // jshint ignore:line\n  this.reachabilityDebouncingEnabled = payload.reachability_debouncing_enabled; // jshint ignore:line\n  this.reachabilityDebouncingWindow = deserialize.integer(payload.reachability_debouncing_window); // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.webhookUrl] -\n *          The URL we should call when Sync objects are manipulated\n * @param {string} [opts.friendlyName] -\n *          A string that you assign to describe the resource\n * @param {boolean} [opts.reachabilityWebhooksEnabled] -\n *          Whether the service instance should call webhook_url when client endpoints connect to Sync\n * @param {boolean} [opts.aclEnabled] -\n *          Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource\n * @param {boolean} [opts.reachabilityDebouncingEnabled] -\n *          Whether every endpoint_disconnected event occurs after a configurable delay\n * @param {number} [opts.reachabilityDebouncingWindow] -\n *          The reachability event delay in milliseconds\n * @param {boolean} [opts.webhooksFromRestEnabled] -\n *          Whether the Service instance should call webhook_url when the REST API is used to update Sync objects\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the documents\n *\n * @function documents\n * @memberof Twilio.Sync.V1.ServiceInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.DocumentList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.documents = function documents() {\n  return this._proxy.documents;\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncLists\n *\n * @function syncLists\n * @memberof Twilio.Sync.V1.ServiceInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.SyncListList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.syncLists = function syncLists() {\n  return this._proxy.syncLists;\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncMaps\n *\n * @function syncMaps\n * @memberof Twilio.Sync.V1.ServiceInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.SyncMapList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.syncMaps = function syncMaps() {\n  return this._proxy.syncMaps;\n};\n\n/* jshint ignore:start */\n/**\n * Access the syncStreams\n *\n * @function syncStreams\n * @memberof Twilio.Sync.V1.ServiceInstance#\n *\n * @returns {Twilio.Sync.V1.ServiceContext.SyncStreamList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.syncStreams = function syncStreams() {\n  return this._proxy.syncStreams;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Sync.V1.ServiceContext\n *\n * @property {Twilio.Sync.V1.ServiceContext.DocumentList} documents -\n *          documents resource\n * @property {Twilio.Sync.V1.ServiceContext.SyncListList} syncLists -\n *          syncLists resource\n * @property {Twilio.Sync.V1.ServiceContext.SyncMapList} syncMaps -\n *          syncMaps resource\n * @property {Twilio.Sync.V1.ServiceContext.SyncStreamList} syncStreams -\n *          syncStreams resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID of the Service resource to fetch\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._documents = undefined;\n  this._syncLists = undefined;\n  this._syncMaps = undefined;\n  this._syncStreams = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Sync.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Sync.V1.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Sync.V1.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.webhookUrl] -\n *          The URL we should call when Sync objects are manipulated\n * @param {string} [opts.friendlyName] -\n *          A string that you assign to describe the resource\n * @param {boolean} [opts.reachabilityWebhooksEnabled] -\n *          Whether the service instance should call webhook_url when client endpoints connect to Sync\n * @param {boolean} [opts.aclEnabled] -\n *          Whether token identities in the Service must be granted access to Sync objects by using the Permissions resource\n * @param {boolean} [opts.reachabilityDebouncingEnabled] -\n *          Whether every endpoint_disconnected event occurs after a configurable delay\n * @param {number} [opts.reachabilityDebouncingWindow] -\n *          The reachability event delay in milliseconds\n * @param {boolean} [opts.webhooksFromRestEnabled] -\n *          Whether the Service instance should call webhook_url when the REST API is used to update Sync objects\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'WebhookUrl': _.get(opts, 'webhookUrl'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'ReachabilityWebhooksEnabled': serialize.bool(_.get(opts, 'reachabilityWebhooksEnabled')),\n    'AclEnabled': serialize.bool(_.get(opts, 'aclEnabled')),\n    'ReachabilityDebouncingEnabled': serialize.bool(_.get(opts, 'reachabilityDebouncingEnabled')),\n    'ReachabilityDebouncingWindow': _.get(opts, 'reachabilityDebouncingWindow'),\n    'WebhooksFromRestEnabled': serialize.bool(_.get(opts, 'webhooksFromRestEnabled'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'documents', {\n    get: function() {\n      if (!this._documents) {\n        this._documents = new DocumentList(this._version, this._solution.sid);\n      }\n      return this._documents;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'syncLists', {\n    get: function() {\n      if (!this._syncLists) {\n        this._syncLists = new SyncListList(this._version, this._solution.sid);\n      }\n      return this._syncLists;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'syncMaps', {\n    get: function() {\n      if (!this._syncMaps) {\n        this._syncMaps = new SyncMapList(this._version, this._solution.sid);\n      }\n      return this._syncMaps;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'syncStreams', {\n    get: function() {\n      if (!this._syncStreams) {\n        this._syncStreams = new SyncStreamList(this._version, this._solution.sid);\n      }\n      return this._syncStreams;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Sync.V1.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar ServiceList = require('./v1/service').ServiceList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Sync\n *\n * @constructor Twilio.Sync.V1\n *\n * @property {Twilio.Sync.V1.ServiceList} services - services resource\n *\n * @param {Twilio.Sync} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._services = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./sync/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize sync domain\n *\n * @constructor Twilio.Sync\n *\n * @property {Twilio.Sync.V1} v1 - v1 version\n * @property {Twilio.Sync.V1.ServiceList} services - services resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Sync(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://sync.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Sync.prototype, Domain.prototype);\nSync.prototype.constructor = Sync;\n\nObject.defineProperty(Sync.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Sync.prototype,\n  'services', {\n    get: function() {\n      return this.v1.services;\n    }\n});\n\nmodule.exports = Sync;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ActivityList;\nvar ActivityPage;\nvar ActivityInstance;\nvar ActivityContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ActivityList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.ActivityList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the Activity\n */\n/* jshint ignore:end */\nActivityList = function ActivityList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function activities\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.ActivityContext}\n   */\n  /* jshint ignore:end */\n  function ActivityListInstance(sid) {\n    return ActivityListInstance.get(sid);\n  }\n\n  ActivityListInstance._version = version;\n  // Path Solution\n  ActivityListInstance._solution = {workspaceSid: workspaceSid};\n  ActivityListInstance._uri = `/Workspaces/${workspaceSid}/Activities`;\n  /* jshint ignore:start */\n  /**\n   * Streams ActivityInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Activity resources to read\n   * @param {string} [opts.available] -\n   *          Whether to return activities that are available or unavailable\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ActivityListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ActivityInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Activity resources to read\n   * @param {string} [opts.available] -\n   *          Whether to return activities that are available or unavailable\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ActivityListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ActivityInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Activity resources to read\n   * @param {string} [opts.available] -\n   *          Whether to return activities that are available or unavailable\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ActivityListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Available': _.get(opts, 'available'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ActivityPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ActivityInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ActivityListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ActivityPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ActivityInstance\n   *\n   * @function create\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the Activity resource\n   * @param {boolean} [opts.available] -\n   *          Whether the Worker should be eligible to receive a Task when it occupies the Activity\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ActivityInstance\n   */\n  /* jshint ignore:end */\n  ActivityListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Available': serialize.bool(_.get(opts, 'available'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ActivityInstance(\n        this._version,\n        payload,\n        this._solution.workspaceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a activity\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityList#\n   *\n   * @param {string} sid - The SID of the resource to fetch\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.ActivityContext}\n   */\n  /* jshint ignore:end */\n  ActivityListInstance.get = function get(sid) {\n    return new ActivityContext(this._version, this._solution.workspaceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ActivityListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ActivityListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ActivityListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ActivityPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.ActivityPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ActivitySolution} solution - Path solution\n *\n * @returns ActivityPage\n */\n/* jshint ignore:end */\nActivityPage = function ActivityPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ActivityPage.prototype, Page.prototype);\nActivityPage.prototype.constructor = ActivityPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ActivityInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityPage#\n *\n * @param {ActivityPayload} payload - Payload response from the API\n *\n * @returns ActivityInstance\n */\n/* jshint ignore:end */\nActivityPage.prototype.getInstance = function getInstance(payload) {\n  return new ActivityInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nActivityPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nActivityPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ActivityContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.ActivityInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {boolean} available -\n *          Whether the Worker should be eligible to receive a Task when it occupies the Activity\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Activity resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Activity\n * @property {string} url - The absolute URL of the Activity resource\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {ActivityPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Activity\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nActivityInstance = function ActivityInstance(version, payload, workspaceSid,\n                                              sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.available = payload.available; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ActivityInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ActivityContext(this._version, this._solution.workspaceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ActivityInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ActivityInstance\n */\n/* jshint ignore:end */\nActivityInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ActivityInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the Activity resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ActivityInstance\n */\n/* jshint ignore:end */\nActivityInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ActivityInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ActivityInstance\n */\n/* jshint ignore:end */\nActivityInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nActivityInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nActivityInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ActivityContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.ActivityContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid -\n *          The SID of the Workspace with the Activity resources to fetch\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nActivityContext = function ActivityContext(version, workspaceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/Activities/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ActivityInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ActivityInstance\n */\n/* jshint ignore:end */\nActivityContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ActivityInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ActivityInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the Activity resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ActivityInstance\n */\n/* jshint ignore:end */\nActivityContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ActivityInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ActivityInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ActivityInstance\n */\n/* jshint ignore:end */\nActivityContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.ActivityContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nActivityContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nActivityContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ActivityList: ActivityList,\n  ActivityPage: ActivityPage,\n  ActivityInstance: ActivityInstance,\n  ActivityContext: ActivityContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar EventList;\nvar EventPage;\nvar EventInstance;\nvar EventContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EventList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.EventList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid - The SID of the Workspace that contains the Event\n */\n/* jshint ignore:end */\nEventList = function EventList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function events\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.EventContext}\n   */\n  /* jshint ignore:end */\n  function EventListInstance(sid) {\n    return EventListInstance.get(sid);\n  }\n\n  EventListInstance._version = version;\n  // Path Solution\n  EventListInstance._solution = {workspaceSid: workspaceSid};\n  EventListInstance._uri = `/Workspaces/${workspaceSid}/Events`;\n  /* jshint ignore:start */\n  /**\n   * Streams EventInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {string} [opts.eventType] - The type of Events to read\n   * @param {number} [opts.minutes] - The period of events to read in minutes\n   * @param {string} [opts.reservationSid] -\n   *          The SID of the Reservation with the Events to read\n   * @param {Date} [opts.startDate] - Only include Events from on or after this date\n   * @param {string} [opts.taskQueueSid] -\n   *          The SID of the TaskQueue with the Events to read\n   * @param {string} [opts.taskSid] - The SID of the Task with the Events to read\n   * @param {string} [opts.workerSid] - The SID of the Worker with the Events to read\n   * @param {string} [opts.workflowSid] -\n   *          The SID of the Worker with the Events to read\n   * @param {string} [opts.taskChannel] - The TaskChannel with the Events to read\n   * @param {string} [opts.sid] - The unique string that identifies the resource\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EventListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EventInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {string} [opts.eventType] - The type of Events to read\n   * @param {number} [opts.minutes] - The period of events to read in minutes\n   * @param {string} [opts.reservationSid] -\n   *          The SID of the Reservation with the Events to read\n   * @param {Date} [opts.startDate] - Only include Events from on or after this date\n   * @param {string} [opts.taskQueueSid] -\n   *          The SID of the TaskQueue with the Events to read\n   * @param {string} [opts.taskSid] - The SID of the Task with the Events to read\n   * @param {string} [opts.workerSid] - The SID of the Worker with the Events to read\n   * @param {string} [opts.workflowSid] -\n   *          The SID of the Worker with the Events to read\n   * @param {string} [opts.taskChannel] - The TaskChannel with the Events to read\n   * @param {string} [opts.sid] - The unique string that identifies the resource\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.endDate] -\n   *          Only include usage that occurred on or before this date\n   * @param {string} [opts.eventType] - The type of Events to read\n   * @param {number} [opts.minutes] - The period of events to read in minutes\n   * @param {string} [opts.reservationSid] -\n   *          The SID of the Reservation with the Events to read\n   * @param {Date} [opts.startDate] - Only include Events from on or after this date\n   * @param {string} [opts.taskQueueSid] -\n   *          The SID of the TaskQueue with the Events to read\n   * @param {string} [opts.taskSid] - The SID of the Task with the Events to read\n   * @param {string} [opts.workerSid] - The SID of the Worker with the Events to read\n   * @param {string} [opts.workflowSid] -\n   *          The SID of the Worker with the Events to read\n   * @param {string} [opts.taskChannel] - The TaskChannel with the Events to read\n   * @param {string} [opts.sid] - The unique string that identifies the resource\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n      'EventType': _.get(opts, 'eventType'),\n      'Minutes': _.get(opts, 'minutes'),\n      'ReservationSid': _.get(opts, 'reservationSid'),\n      'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n      'TaskQueueSid': _.get(opts, 'taskQueueSid'),\n      'TaskSid': _.get(opts, 'taskSid'),\n      'WorkerSid': _.get(opts, 'workerSid'),\n      'WorkflowSid': _.get(opts, 'workflowSid'),\n      'TaskChannel': _.get(opts, 'taskChannel'),\n      'Sid': _.get(opts, 'sid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EventInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EventListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EventPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a event\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventList#\n   *\n   * @param {string} sid - The SID of the resource to fetch\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.EventContext}\n   */\n  /* jshint ignore:end */\n  EventListInstance.get = function get(sid) {\n    return new EventContext(this._version, this._solution.workspaceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EventListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EventListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EventListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.EventPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EventSolution} solution - Path solution\n *\n * @returns EventPage\n */\n/* jshint ignore:end */\nEventPage = function EventPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EventPage.prototype, Page.prototype);\nEventPage.prototype.constructor = EventPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EventInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventPage#\n *\n * @param {EventPayload} payload - Payload response from the API\n *\n * @returns EventInstance\n */\n/* jshint ignore:end */\nEventPage.prototype.getInstance = function getInstance(payload) {\n  return new EventInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.EventInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} actorSid - The SID of the resource that triggered the event\n * @property {string} actorType - The type of resource that triggered the event\n * @property {string} actorUrl -\n *          The absolute URL of the resource that triggered the event\n * @property {string} description - A description of the event\n * @property {object} eventData - Data about the event\n * @property {Date} eventDate - The time the event was sent\n * @property {number} eventDateMs - The time the event was sent in milliseconds\n * @property {string} eventType - The identifier for the event\n * @property {string} resourceSid -\n *          The SID of the object the event is most relevant to\n * @property {string} resourceType -\n *          The type of object the event is most relevant to\n * @property {string} resourceUrl -\n *          The URL of the resource the event is most relevant to\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} source - Where the Event originated\n * @property {string} sourceIpAddress - The IP from which the Event originated\n * @property {string} url - The absolute URL of the Event resource\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Event\n *\n * @param {V1} version - Version of the resource\n * @param {EventPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Event\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nEventInstance = function EventInstance(version, payload, workspaceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.actorSid = payload.actor_sid; // jshint ignore:line\n  this.actorType = payload.actor_type; // jshint ignore:line\n  this.actorUrl = payload.actor_url; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.eventData = payload.event_data; // jshint ignore:line\n  this.eventDate = deserialize.iso8601DateTime(payload.event_date); // jshint ignore:line\n  this.eventDateMs = deserialize.integer(payload.event_date_ms); // jshint ignore:line\n  this.eventType = payload.event_type; // jshint ignore:line\n  this.resourceSid = payload.resource_sid; // jshint ignore:line\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.resourceUrl = payload.resource_url; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.source = payload.source; // jshint ignore:line\n  this.sourceIpAddress = payload.source_ip_address; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(EventInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EventContext(this._version, this._solution.workspaceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EventInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EventInstance\n */\n/* jshint ignore:end */\nEventInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEventInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EventContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.EventContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the Event to fetch\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nEventContext = function EventContext(version, workspaceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/Events/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EventInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EventInstance\n */\n/* jshint ignore:end */\nEventContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EventInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.EventContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEventContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEventContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EventList: EventList,\n  EventPage: EventPage,\n  EventInstance: EventInstance,\n  EventContext: EventContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TaskChannelList;\nvar TaskChannelPage;\nvar TaskChannelInstance;\nvar TaskChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskChannelList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the Task Channel\n */\n/* jshint ignore:end */\nTaskChannelList = function TaskChannelList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function taskChannels\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelContext}\n   */\n  /* jshint ignore:end */\n  function TaskChannelListInstance(sid) {\n    return TaskChannelListInstance.get(sid);\n  }\n\n  TaskChannelListInstance._version = version;\n  // Path Solution\n  TaskChannelListInstance._solution = {workspaceSid: workspaceSid};\n  TaskChannelListInstance._uri = `/Workspaces/${workspaceSid}/TaskChannels`;\n  /* jshint ignore:start */\n  /**\n   * Streams TaskChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TaskChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TaskChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TaskChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TaskChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a TaskChannelInstance\n   *\n   * @function create\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          A string to describe the Task Channel resource\n   * @param {string} opts.uniqueName -\n   *          An application-defined string that uniquely identifies the Task Channel\n   * @param {boolean} [opts.channelOptimizedRouting] -\n   *          Whether the Task Channel should prioritize Workers that have been idle\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TaskChannelInstance\n   */\n  /* jshint ignore:end */\n  TaskChannelListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'ChannelOptimizedRouting': serialize.bool(_.get(opts, 'channelOptimizedRouting'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskChannelInstance(\n        this._version,\n        payload,\n        this._solution.workspaceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a task_channel\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList#\n   *\n   * @param {string} sid - The SID of the Task Channel resource to fetch\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelContext}\n   */\n  /* jshint ignore:end */\n  TaskChannelListInstance.get = function get(sid) {\n    return new TaskChannelContext(this._version, this._solution.workspaceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskChannelListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskChannelPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskChannelSolution} solution - Path solution\n *\n * @returns TaskChannelPage\n */\n/* jshint ignore:end */\nTaskChannelPage = function TaskChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskChannelPage.prototype, Page.prototype);\nTaskChannelPage.prototype.constructor = TaskChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelPage#\n *\n * @param {TaskChannelPayload} payload - Payload response from the API\n *\n * @returns TaskChannelInstance\n */\n/* jshint ignore:end */\nTaskChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskChannelInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskChannelPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskChannelContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the Task Channel\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Task Channel\n * @property {boolean} channelOptimizedRouting -\n *          Whether the Task Channel will prioritize Workers that have been idle\n * @property {string} url - The absolute URL of the Task Channel resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {TaskChannelPayload} payload - The instance payload\n * @param {sid} workspaceSid -\n *          The SID of the Workspace that contains the Task Channel\n * @param {sid_like} sid - The SID of the Task Channel resource to fetch\n */\n/* jshint ignore:end */\nTaskChannelInstance = function TaskChannelInstance(version, payload,\n                                                    workspaceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.channelOptimizedRouting = payload.channel_optimized_routing; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TaskChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskChannelContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskChannelInstance\n */\n/* jshint ignore:end */\nTaskChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskChannelInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A string to describe the Task Channel resource\n * @param {boolean} [opts.channelOptimizedRouting] -\n *          Whether the TaskChannel should prioritize Workers that have been idle\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskChannelInstance\n */\n/* jshint ignore:end */\nTaskChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskChannelInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskChannelInstance\n */\n/* jshint ignore:end */\nTaskChannelInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskChannelContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid -\n *          The SID of the Workspace with the Task Channel to fetch\n * @param {sid_like} sid - The SID of the Task Channel resource to fetch\n */\n/* jshint ignore:end */\nTaskChannelContext = function TaskChannelContext(version, workspaceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/TaskChannels/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskChannelInstance\n */\n/* jshint ignore:end */\nTaskChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskChannelInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskChannelInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A string to describe the Task Channel resource\n * @param {boolean} [opts.channelOptimizedRouting] -\n *          Whether the TaskChannel should prioritize Workers that have been idle\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskChannelInstance\n */\n/* jshint ignore:end */\nTaskChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'ChannelOptimizedRouting': serialize.bool(_.get(opts, 'channelOptimizedRouting'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskChannelInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskChannelInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskChannelInstance\n */\n/* jshint ignore:end */\nTaskChannelContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskChannelContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskChannelList: TaskChannelList,\n  TaskChannelPage: TaskChannelPage,\n  TaskChannelInstance: TaskChannelInstance,\n  TaskChannelContext: TaskChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ReservationList;\nvar ReservationPage;\nvar ReservationInstance;\nvar ReservationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ReservationList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that this task is contained within.\n * @param {string} taskSid - The SID of the reserved Task resource\n */\n/* jshint ignore:end */\nReservationList = function ReservationList(version, workspaceSid, taskSid) {\n  /* jshint ignore:start */\n  /**\n   * @function reservations\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationContext}\n   */\n  /* jshint ignore:end */\n  function ReservationListInstance(sid) {\n    return ReservationListInstance.get(sid);\n  }\n\n  ReservationListInstance._version = version;\n  // Path Solution\n  ReservationListInstance._solution = {workspaceSid: workspaceSid, taskSid: taskSid};\n  ReservationListInstance._uri = `/Workspaces/${workspaceSid}/Tasks/${taskSid}/Reservations`;\n  /* jshint ignore:start */\n  /**\n   * Streams ReservationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {reservation.status} [opts.reservationStatus] -\n   *          Returns the list of reservations for a task with a specified ReservationStatus\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ReservationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {reservation.status} [opts.reservationStatus] -\n   *          Returns the list of reservations for a task with a specified ReservationStatus\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ReservationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {reservation.status} [opts.reservationStatus] -\n   *          Returns the list of reservations for a task with a specified ReservationStatus\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ReservationStatus': _.get(opts, 'reservationStatus'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ReservationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ReservationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ReservationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a reservation\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationList#\n   *\n   * @param {string} sid - The SID of the TaskReservation resource to fetch\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationContext}\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.get = function get(sid) {\n    return new ReservationContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.taskSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ReservationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ReservationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ReservationPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ReservationSolution} solution - Path solution\n *\n * @returns ReservationPage\n */\n/* jshint ignore:end */\nReservationPage = function ReservationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ReservationPage.prototype, Page.prototype);\nReservationPage.prototype.constructor = ReservationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ReservationInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationPage#\n *\n * @param {ReservationPayload} payload - Payload response from the API\n *\n * @returns ReservationInstance\n */\n/* jshint ignore:end */\nReservationPage.prototype.getInstance = function getInstance(payload) {\n  return new ReservationInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.taskSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nReservationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nReservationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ReservationContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {reservation.status} reservationStatus -\n *          The current status of the reservation\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} taskSid - The SID of the reserved Task resource\n * @property {string} workerName - The friendly_name of the Worker that is reserved\n * @property {string} workerSid - The SID of the reserved Worker resource\n * @property {string} workspaceSid -\n *          The SID of the Workspace that this task is contained within.\n * @property {string} url - The absolute URL of the TaskReservation reservation\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {ReservationPayload} payload - The instance payload\n * @param {sid} workspaceSid -\n *          The SID of the Workspace that this task is contained within.\n * @param {sid} taskSid - The SID of the reserved Task resource\n * @param {sid} sid - The SID of the TaskReservation resource to fetch\n */\n/* jshint ignore:end */\nReservationInstance = function ReservationInstance(version, payload,\n                                                    workspaceSid, taskSid, sid)\n                                                    {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.reservationStatus = payload.reservation_status; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.workerName = payload.worker_name; // jshint ignore:line\n  this.workerSid = payload.worker_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, taskSid: taskSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ReservationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ReservationContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.taskSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ReservationInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ReservationInstance\n */\n/* jshint ignore:end */\nReservationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ReservationInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {reservation.status} [opts.reservationStatus] -\n *          The new status of the reservation\n * @param {string} [opts.workerActivitySid] -\n *          The new worker activity SID if rejecting a reservation\n * @param {string} [opts.instruction] - The assignment instruction for reservation\n * @param {string} [opts.dequeuePostWorkActivitySid] -\n *          The SID of the Activity resource to start after executing a Dequeue instruction\n * @param {string} [opts.dequeueFrom] -\n *          The Caller ID of the call to the worker when executing a Dequeue instruction\n * @param {string} [opts.dequeueRecord] -\n *          Whether to record both legs of a call when executing a Dequeue instruction\n * @param {number} [opts.dequeueTimeout] -\n *          Timeout for call when executing a Dequeue instruction\n * @param {string} [opts.dequeueTo] -\n *          The Contact URI of the worker when executing a Dequeue instruction\n * @param {string} [opts.dequeueStatusCallbackUrl] -\n *          The Callback URL for completed call event when executing a Dequeue instruction\n * @param {string} [opts.callFrom] -\n *          The Caller ID of the outbound call when executing a Call instruction\n * @param {string} [opts.callRecord] -\n *          Whether to record both legs of a call when executing a Call instruction\n * @param {number} [opts.callTimeout] -\n *          Timeout for call when executing a Call instruction\n * @param {string} [opts.callTo] -\n *          The Contact URI of the worker when executing a Call instruction\n * @param {string} [opts.callUrl] -\n *          TwiML URI executed on answering the worker's leg as a result of the Call instruction\n * @param {string} [opts.callStatusCallbackUrl] -\n *          The URL to call  for the completed call event when executing a Call instruction\n * @param {boolean} [opts.callAccept] -\n *          Whether to accept a reservation when executing a Call instruction\n * @param {string} [opts.redirectCallSid] -\n *          The Call SID of the call parked in the queue when executing a Redirect instruction\n * @param {boolean} [opts.redirectAccept] -\n *          Whether the reservation should be accepted when executing a Redirect instruction\n * @param {string} [opts.redirectUrl] -\n *          TwiML URI to redirect the call to when executing the Redirect instruction\n * @param {string} [opts.to] -\n *          The Contact URI of the worker when executing a Conference instruction\n * @param {string} [opts.from] -\n *          The Caller ID of the call to the worker when executing a Conference instruction\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback\n * @param {reservation.call_status|list} [opts.statusCallbackEvent] -\n *          The call progress events that we will send to status_callback\n * @param {number} [opts.timeout] -\n *          Timeout for call when executing a Conference instruction\n * @param {boolean} [opts.record] -\n *          Whether to record the participant and their conferences\n * @param {boolean} [opts.muted] - Whether to mute the agent\n * @param {string} [opts.beep] -\n *          Whether to play a notification beep when the participant joins\n * @param {boolean} [opts.startConferenceOnEnter] -\n *          Whether the conference starts when the participant joins the conference\n * @param {boolean} [opts.endConferenceOnExit] -\n *          Whether to end the conference when the agent leaves\n * @param {string} [opts.waitUrl] - URL that hosts pre-conference hold music\n * @param {string} [opts.waitMethod] -\n *          The HTTP method we should use to call `wait_url`\n * @param {boolean} [opts.earlyMedia] -\n *          Whether agents can hear the state of the outbound call\n * @param {number} [opts.maxParticipants] -\n *          The maximum number of agent conference participants\n * @param {string} [opts.conferenceStatusCallback] -\n *          The callback URL for conference events\n * @param {string} [opts.conferenceStatusCallbackMethod] -\n *          HTTP method for requesting `conference_status_callback` URL\n * @param {reservation.conference_event|list} [opts.conferenceStatusCallbackEvent] -\n *          The conference status events that we will send to conference_status_callback\n * @param {string} [opts.conferenceRecord] -\n *          Whether to record the conference the participant is joining\n * @param {string} [opts.conferenceTrim] -\n *          How to trim leading and trailing silence from your recorded conference audio files\n * @param {string} [opts.recordingChannels] -\n *          Specify `mono` or `dual` recording channels\n * @param {string} [opts.recordingStatusCallback] -\n *          The URL that we should call using the `recording_status_callback_method` when the recording status changes\n * @param {string} [opts.recordingStatusCallbackMethod] -\n *          The HTTP method we should use when we call `recording_status_callback`\n * @param {string} [opts.conferenceRecordingStatusCallback] -\n *          The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available\n * @param {string} [opts.conferenceRecordingStatusCallbackMethod] -\n *          The HTTP method we should use to call `conference_recording_status_callback`\n * @param {string} [opts.region] -\n *          The region where we should mix the conference audio\n * @param {string} [opts.sipAuthUsername] -\n *          The SIP username used for authentication\n * @param {string} [opts.sipAuthPassword] - The SIP password for authentication\n * @param {string|list} [opts.dequeueStatusCallbackEvent] -\n *          The Call progress events sent via webhooks as a result of a Dequeue instruction\n * @param {string} [opts.postWorkActivitySid] -\n *          The new worker activity SID after executing a Conference instruction\n * @param {reservation.supervisor_mode} [opts.supervisorMode] -\n *          The Supervisor mode when executing the Supervise instruction\n * @param {string} [opts.supervisor] -\n *          The Supervisor SID/URI when executing the Supervise instruction\n * @param {boolean} [opts.endConferenceOnCustomerExit] -\n *          Whether to end the conference when the customer leaves\n * @param {boolean} [opts.beepOnCustomerEntrance] -\n *          Whether to play a notification beep when the customer joins\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ReservationInstance\n */\n/* jshint ignore:end */\nReservationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nReservationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nReservationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ReservationContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid -\n *          The SID of the Workspace with the TaskReservation resource to fetch\n * @param {sid} taskSid -\n *          The SID of the reserved Task resource with the TaskReservation resource to fetch\n * @param {sid} sid - The SID of the TaskReservation resource to fetch\n */\n/* jshint ignore:end */\nReservationContext = function ReservationContext(version, workspaceSid, taskSid,\n                                                  sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, taskSid: taskSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/Tasks/${taskSid}/Reservations/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ReservationInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ReservationInstance\n */\n/* jshint ignore:end */\nReservationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ReservationInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.taskSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ReservationInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {reservation.status} [opts.reservationStatus] -\n *          The new status of the reservation\n * @param {string} [opts.workerActivitySid] -\n *          The new worker activity SID if rejecting a reservation\n * @param {string} [opts.instruction] - The assignment instruction for reservation\n * @param {string} [opts.dequeuePostWorkActivitySid] -\n *          The SID of the Activity resource to start after executing a Dequeue instruction\n * @param {string} [opts.dequeueFrom] -\n *          The Caller ID of the call to the worker when executing a Dequeue instruction\n * @param {string} [opts.dequeueRecord] -\n *          Whether to record both legs of a call when executing a Dequeue instruction\n * @param {number} [opts.dequeueTimeout] -\n *          Timeout for call when executing a Dequeue instruction\n * @param {string} [opts.dequeueTo] -\n *          The Contact URI of the worker when executing a Dequeue instruction\n * @param {string} [opts.dequeueStatusCallbackUrl] -\n *          The Callback URL for completed call event when executing a Dequeue instruction\n * @param {string} [opts.callFrom] -\n *          The Caller ID of the outbound call when executing a Call instruction\n * @param {string} [opts.callRecord] -\n *          Whether to record both legs of a call when executing a Call instruction\n * @param {number} [opts.callTimeout] -\n *          Timeout for call when executing a Call instruction\n * @param {string} [opts.callTo] -\n *          The Contact URI of the worker when executing a Call instruction\n * @param {string} [opts.callUrl] -\n *          TwiML URI executed on answering the worker's leg as a result of the Call instruction\n * @param {string} [opts.callStatusCallbackUrl] -\n *          The URL to call  for the completed call event when executing a Call instruction\n * @param {boolean} [opts.callAccept] -\n *          Whether to accept a reservation when executing a Call instruction\n * @param {string} [opts.redirectCallSid] -\n *          The Call SID of the call parked in the queue when executing a Redirect instruction\n * @param {boolean} [opts.redirectAccept] -\n *          Whether the reservation should be accepted when executing a Redirect instruction\n * @param {string} [opts.redirectUrl] -\n *          TwiML URI to redirect the call to when executing the Redirect instruction\n * @param {string} [opts.to] -\n *          The Contact URI of the worker when executing a Conference instruction\n * @param {string} [opts.from] -\n *          The Caller ID of the call to the worker when executing a Conference instruction\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback\n * @param {reservation.call_status|list} [opts.statusCallbackEvent] -\n *          The call progress events that we will send to status_callback\n * @param {number} [opts.timeout] -\n *          Timeout for call when executing a Conference instruction\n * @param {boolean} [opts.record] -\n *          Whether to record the participant and their conferences\n * @param {boolean} [opts.muted] - Whether to mute the agent\n * @param {string} [opts.beep] -\n *          Whether to play a notification beep when the participant joins\n * @param {boolean} [opts.startConferenceOnEnter] -\n *          Whether the conference starts when the participant joins the conference\n * @param {boolean} [opts.endConferenceOnExit] -\n *          Whether to end the conference when the agent leaves\n * @param {string} [opts.waitUrl] - URL that hosts pre-conference hold music\n * @param {string} [opts.waitMethod] -\n *          The HTTP method we should use to call `wait_url`\n * @param {boolean} [opts.earlyMedia] -\n *          Whether agents can hear the state of the outbound call\n * @param {number} [opts.maxParticipants] -\n *          The maximum number of agent conference participants\n * @param {string} [opts.conferenceStatusCallback] -\n *          The callback URL for conference events\n * @param {string} [opts.conferenceStatusCallbackMethod] -\n *          HTTP method for requesting `conference_status_callback` URL\n * @param {reservation.conference_event|list} [opts.conferenceStatusCallbackEvent] -\n *          The conference status events that we will send to conference_status_callback\n * @param {string} [opts.conferenceRecord] -\n *          Whether to record the conference the participant is joining\n * @param {string} [opts.conferenceTrim] -\n *          How to trim leading and trailing silence from your recorded conference audio files\n * @param {string} [opts.recordingChannels] -\n *          Specify `mono` or `dual` recording channels\n * @param {string} [opts.recordingStatusCallback] -\n *          The URL that we should call using the `recording_status_callback_method` when the recording status changes\n * @param {string} [opts.recordingStatusCallbackMethod] -\n *          The HTTP method we should use when we call `recording_status_callback`\n * @param {string} [opts.conferenceRecordingStatusCallback] -\n *          The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available\n * @param {string} [opts.conferenceRecordingStatusCallbackMethod] -\n *          The HTTP method we should use to call `conference_recording_status_callback`\n * @param {string} [opts.region] -\n *          The region where we should mix the conference audio\n * @param {string} [opts.sipAuthUsername] -\n *          The SIP username used for authentication\n * @param {string} [opts.sipAuthPassword] - The SIP password for authentication\n * @param {string|list} [opts.dequeueStatusCallbackEvent] -\n *          The Call progress events sent via webhooks as a result of a Dequeue instruction\n * @param {string} [opts.postWorkActivitySid] -\n *          The new worker activity SID after executing a Conference instruction\n * @param {reservation.supervisor_mode} [opts.supervisorMode] -\n *          The Supervisor mode when executing the Supervise instruction\n * @param {string} [opts.supervisor] -\n *          The Supervisor SID/URI when executing the Supervise instruction\n * @param {boolean} [opts.endConferenceOnCustomerExit] -\n *          Whether to end the conference when the customer leaves\n * @param {boolean} [opts.beepOnCustomerEntrance] -\n *          Whether to play a notification beep when the customer joins\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ReservationInstance\n */\n/* jshint ignore:end */\nReservationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'ReservationStatus': _.get(opts, 'reservationStatus'),\n    'WorkerActivitySid': _.get(opts, 'workerActivitySid'),\n    'Instruction': _.get(opts, 'instruction'),\n    'DequeuePostWorkActivitySid': _.get(opts, 'dequeuePostWorkActivitySid'),\n    'DequeueFrom': _.get(opts, 'dequeueFrom'),\n    'DequeueRecord': _.get(opts, 'dequeueRecord'),\n    'DequeueTimeout': _.get(opts, 'dequeueTimeout'),\n    'DequeueTo': _.get(opts, 'dequeueTo'),\n    'DequeueStatusCallbackUrl': _.get(opts, 'dequeueStatusCallbackUrl'),\n    'CallFrom': _.get(opts, 'callFrom'),\n    'CallRecord': _.get(opts, 'callRecord'),\n    'CallTimeout': _.get(opts, 'callTimeout'),\n    'CallTo': _.get(opts, 'callTo'),\n    'CallUrl': _.get(opts, 'callUrl'),\n    'CallStatusCallbackUrl': _.get(opts, 'callStatusCallbackUrl'),\n    'CallAccept': serialize.bool(_.get(opts, 'callAccept')),\n    'RedirectCallSid': _.get(opts, 'redirectCallSid'),\n    'RedirectAccept': serialize.bool(_.get(opts, 'redirectAccept')),\n    'RedirectUrl': _.get(opts, 'redirectUrl'),\n    'To': _.get(opts, 'to'),\n    'From': _.get(opts, 'from'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n    'StatusCallbackEvent': serialize.map(_.get(opts, 'statusCallbackEvent'), function(e) { return e; }),\n    'Timeout': _.get(opts, 'timeout'),\n    'Record': serialize.bool(_.get(opts, 'record')),\n    'Muted': serialize.bool(_.get(opts, 'muted')),\n    'Beep': _.get(opts, 'beep'),\n    'StartConferenceOnEnter': serialize.bool(_.get(opts, 'startConferenceOnEnter')),\n    'EndConferenceOnExit': serialize.bool(_.get(opts, 'endConferenceOnExit')),\n    'WaitUrl': _.get(opts, 'waitUrl'),\n    'WaitMethod': _.get(opts, 'waitMethod'),\n    'EarlyMedia': serialize.bool(_.get(opts, 'earlyMedia')),\n    'MaxParticipants': _.get(opts, 'maxParticipants'),\n    'ConferenceStatusCallback': _.get(opts, 'conferenceStatusCallback'),\n    'ConferenceStatusCallbackMethod': _.get(opts, 'conferenceStatusCallbackMethod'),\n    'ConferenceStatusCallbackEvent': serialize.map(_.get(opts, 'conferenceStatusCallbackEvent'), function(e) { return e; }),\n    'ConferenceRecord': _.get(opts, 'conferenceRecord'),\n    'ConferenceTrim': _.get(opts, 'conferenceTrim'),\n    'RecordingChannels': _.get(opts, 'recordingChannels'),\n    'RecordingStatusCallback': _.get(opts, 'recordingStatusCallback'),\n    'RecordingStatusCallbackMethod': _.get(opts, 'recordingStatusCallbackMethod'),\n    'ConferenceRecordingStatusCallback': _.get(opts, 'conferenceRecordingStatusCallback'),\n    'ConferenceRecordingStatusCallbackMethod': _.get(opts, 'conferenceRecordingStatusCallbackMethod'),\n    'Region': _.get(opts, 'region'),\n    'SipAuthUsername': _.get(opts, 'sipAuthUsername'),\n    'SipAuthPassword': _.get(opts, 'sipAuthPassword'),\n    'DequeueStatusCallbackEvent': serialize.map(_.get(opts, 'dequeueStatusCallbackEvent'), function(e) { return e; }),\n    'PostWorkActivitySid': _.get(opts, 'postWorkActivitySid'),\n    'SupervisorMode': _.get(opts, 'supervisorMode'),\n    'Supervisor': _.get(opts, 'supervisor'),\n    'EndConferenceOnCustomerExit': serialize.bool(_.get(opts, 'endConferenceOnCustomerExit')),\n    'BeepOnCustomerEntrance': serialize.bool(_.get(opts, 'beepOnCustomerEntrance'))\n  });\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ReservationInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.taskSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nReservationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nReservationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ReservationList: ReservationList,\n  ReservationPage: ReservationPage,\n  ReservationInstance: ReservationInstance,\n  ReservationContext: ReservationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar ReservationList = require('./task/reservation').ReservationList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TaskList;\nvar TaskPage;\nvar TaskInstance;\nvar TaskContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid - The SID of the Workspace that contains the Task\n */\n/* jshint ignore:end */\nTaskList = function TaskList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function tasks\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskContext}\n   */\n  /* jshint ignore:end */\n  function TaskListInstance(sid) {\n    return TaskListInstance.get(sid);\n  }\n\n  TaskListInstance._version = version;\n  // Path Solution\n  TaskListInstance._solution = {workspaceSid: workspaceSid};\n  TaskListInstance._uri = `/Workspaces/${workspaceSid}/Tasks`;\n  /* jshint ignore:start */\n  /**\n   * Streams TaskInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.priority] - The priority value of the Tasks to read\n   * @param {string|list} [opts.assignmentStatus] -\n   *          Returns the list of all Tasks in the Workspace with the specified assignment_status\n   * @param {string} [opts.workflowSid] -\n   *          The SID of the Workflow with the Tasks to read\n   * @param {string} [opts.workflowName] -\n   *          The friendly name of the Workflow with the Tasks to read\n   * @param {string} [opts.taskQueueSid] -\n   *          The SID of the TaskQueue with the Tasks to read\n   * @param {string} [opts.taskQueueName] -\n   *          The friendly_name of the TaskQueue with the Tasks to read\n   * @param {string} [opts.evaluateTaskAttributes] -\n   *          The task attributes of the Tasks to read\n   * @param {string} [opts.ordering] - Controls the order of the Tasks returned\n   * @param {boolean} [opts.hasAddons] - Whether to read Tasks with addons\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TaskListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TaskInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.priority] - The priority value of the Tasks to read\n   * @param {string|list} [opts.assignmentStatus] -\n   *          Returns the list of all Tasks in the Workspace with the specified assignment_status\n   * @param {string} [opts.workflowSid] -\n   *          The SID of the Workflow with the Tasks to read\n   * @param {string} [opts.workflowName] -\n   *          The friendly name of the Workflow with the Tasks to read\n   * @param {string} [opts.taskQueueSid] -\n   *          The SID of the TaskQueue with the Tasks to read\n   * @param {string} [opts.taskQueueName] -\n   *          The friendly_name of the TaskQueue with the Tasks to read\n   * @param {string} [opts.evaluateTaskAttributes] -\n   *          The task attributes of the Tasks to read\n   * @param {string} [opts.ordering] - Controls the order of the Tasks returned\n   * @param {boolean} [opts.hasAddons] - Whether to read Tasks with addons\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TaskInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.priority] - The priority value of the Tasks to read\n   * @param {string|list} [opts.assignmentStatus] -\n   *          Returns the list of all Tasks in the Workspace with the specified assignment_status\n   * @param {string} [opts.workflowSid] -\n   *          The SID of the Workflow with the Tasks to read\n   * @param {string} [opts.workflowName] -\n   *          The friendly name of the Workflow with the Tasks to read\n   * @param {string} [opts.taskQueueSid] -\n   *          The SID of the TaskQueue with the Tasks to read\n   * @param {string} [opts.taskQueueName] -\n   *          The friendly_name of the TaskQueue with the Tasks to read\n   * @param {string} [opts.evaluateTaskAttributes] -\n   *          The task attributes of the Tasks to read\n   * @param {string} [opts.ordering] - Controls the order of the Tasks returned\n   * @param {boolean} [opts.hasAddons] - Whether to read Tasks with addons\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Priority': _.get(opts, 'priority'),\n      'AssignmentStatus': serialize.map(_.get(opts, 'assignmentStatus'), function(e) { return e; }),\n      'WorkflowSid': _.get(opts, 'workflowSid'),\n      'WorkflowName': _.get(opts, 'workflowName'),\n      'TaskQueueSid': _.get(opts, 'taskQueueSid'),\n      'TaskQueueName': _.get(opts, 'taskQueueName'),\n      'EvaluateTaskAttributes': _.get(opts, 'evaluateTaskAttributes'),\n      'Ordering': _.get(opts, 'ordering'),\n      'HasAddons': serialize.bool(_.get(opts, 'hasAddons')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TaskInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a TaskInstance\n   *\n   * @function create\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.timeout] -\n   *          The amount of time in seconds the task can live before being assigned\n   * @param {number} [opts.priority] -\n   *          The priority to assign the new task and override the default\n   * @param {string} [opts.taskChannel] -\n   *          When MultiTasking is enabled specify the TaskChannel by passing either its unique_name or SID\n   * @param {string} [opts.workflowSid] -\n   *          The SID of the Workflow that you would like to handle routing for the new Task\n   * @param {string} [opts.attributes] -\n   *          A URL-encoded JSON string describing the attributes of the task\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TaskInstance\n   */\n  /* jshint ignore:end */\n  TaskListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Timeout': _.get(opts, 'timeout'),\n      'Priority': _.get(opts, 'priority'),\n      'TaskChannel': _.get(opts, 'taskChannel'),\n      'WorkflowSid': _.get(opts, 'workflowSid'),\n      'Attributes': _.get(opts, 'attributes')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskInstance(\n        this._version,\n        payload,\n        this._solution.workspaceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a task\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskList#\n   *\n   * @param {string} sid - The SID of the resource to fetch\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskContext}\n   */\n  /* jshint ignore:end */\n  TaskListInstance.get = function get(sid) {\n    return new TaskContext(this._version, this._solution.workspaceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskSolution} solution - Path solution\n *\n * @returns TaskPage\n */\n/* jshint ignore:end */\nTaskPage = function TaskPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskPage.prototype, Page.prototype);\nTaskPage.prototype.constructor = TaskPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskPage#\n *\n * @param {TaskPayload} payload - Payload response from the API\n *\n * @returns TaskInstance\n */\n/* jshint ignore:end */\nTaskPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {number} age - The number of seconds since the Task was created\n * @property {task.status} assignmentStatus -\n *          The current status of the Task's assignment\n * @property {string} attributes -\n *          The JSON string with custom attributes of the work\n * @property {string} addons -\n *          An object that contains the addon data for all installed addons\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {Date} taskQueueEnteredDate -\n *          The ISO 8601 date and time in GMT when the Task entered the TaskQueue.\n * @property {number} priority -\n *          Retrieve the list of all Tasks in the Workspace with the specified priority\n * @property {string} reason - The reason the Task was canceled or completed\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} taskQueueSid - The SID of the TaskQueue\n * @property {string} taskQueueFriendlyName - The friendly name of the TaskQueue\n * @property {string} taskChannelSid - The SID of the TaskChannel\n * @property {string} taskChannelUniqueName - The unique name of the TaskChannel\n * @property {number} timeout -\n *          The amount of time in seconds that the Task can live before being assigned\n * @property {string} workflowSid -\n *          The SID of the Workflow that is controlling the Task\n * @property {string} workflowFriendlyName -\n *          The friendly name of the Workflow that is controlling the Task\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Task\n * @property {string} url - The absolute URL of the Task resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {TaskPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Task\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nTaskInstance = function TaskInstance(version, payload, workspaceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.age = deserialize.integer(payload.age); // jshint ignore:line\n  this.assignmentStatus = payload.assignment_status; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.addons = payload.addons; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.taskQueueEnteredDate = deserialize.iso8601DateTime(payload.task_queue_entered_date); // jshint ignore:line\n  this.priority = deserialize.integer(payload.priority); // jshint ignore:line\n  this.reason = payload.reason; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.taskQueueSid = payload.task_queue_sid; // jshint ignore:line\n  this.taskQueueFriendlyName = payload.task_queue_friendly_name; // jshint ignore:line\n  this.taskChannelSid = payload.task_channel_sid; // jshint ignore:line\n  this.taskChannelUniqueName = payload.task_channel_unique_name; // jshint ignore:line\n  this.timeout = deserialize.integer(payload.timeout); // jshint ignore:line\n  this.workflowSid = payload.workflow_sid; // jshint ignore:line\n  this.workflowFriendlyName = payload.workflow_friendly_name; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TaskInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskContext(this._version, this._solution.workspaceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.attributes] -\n *          The JSON string that describes the custom attributes of the task\n * @param {task.status} [opts.assignmentStatus] - The new status of the task\n * @param {string} [opts.reason] -\n *          The reason that the Task was canceled or complete\n * @param {number} [opts.priority] - The Task's new priority value\n * @param {string} [opts.taskChannel] -\n *          When MultiTasking is enabled, specify the TaskChannel with the task to update\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the reservations\n *\n * @function reservations\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationList}\n */\n/* jshint ignore:end */\nTaskInstance.prototype.reservations = function reservations() {\n  return this._proxy.reservations;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskContext\n *\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.TaskContext.ReservationList} reservations -\n *          reservations resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the Task to fetch\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nTaskContext = function TaskContext(version, workspaceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/Tasks/${sid}`;\n\n  // Dependents\n  this._reservations = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.attributes] -\n *          The JSON string that describes the custom attributes of the task\n * @param {task.status} [opts.assignmentStatus] - The new status of the task\n * @param {string} [opts.reason] -\n *          The reason that the Task was canceled or complete\n * @param {number} [opts.priority] - The Task's new priority value\n * @param {string} [opts.taskChannel] -\n *          When MultiTasking is enabled, specify the TaskChannel with the task to update\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Attributes': _.get(opts, 'attributes'),\n    'AssignmentStatus': _.get(opts, 'assignmentStatus'),\n    'Reason': _.get(opts, 'reason'),\n    'Priority': _.get(opts, 'priority'),\n    'TaskChannel': _.get(opts, 'taskChannel')\n  });\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskInstance\n */\n/* jshint ignore:end */\nTaskContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(TaskContext.prototype,\n  'reservations', {\n    get: function() {\n      if (!this._reservations) {\n        this._reservations = new ReservationList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._reservations;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskList: TaskList,\n  TaskPage: TaskPage,\n  TaskInstance: TaskInstance,\n  TaskContext: TaskContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TaskQueueCumulativeStatisticsList;\nvar TaskQueueCumulativeStatisticsPage;\nvar TaskQueueCumulativeStatisticsInstance;\nvar TaskQueueCumulativeStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueCumulativeStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueue\n * @param {string} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsList = function\n    TaskQueueCumulativeStatisticsList(version, workspaceSid, taskQueueSid) {\n  /* jshint ignore:start */\n  /**\n   * @function cumulativeStatistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function TaskQueueCumulativeStatisticsListInstance(sid) {\n    return TaskQueueCumulativeStatisticsListInstance.get(sid);\n  }\n\n  TaskQueueCumulativeStatisticsListInstance._version = version;\n  // Path Solution\n  TaskQueueCumulativeStatisticsListInstance._solution = {\n    workspaceSid: workspaceSid,\n    taskQueueSid: taskQueueSid\n  };\n  /* jshint ignore:start */\n  /**\n   * Constructs a task_queue_cumulative_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  TaskQueueCumulativeStatisticsListInstance.get = function get() {\n    return new TaskQueueCumulativeStatisticsContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.taskQueueSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskQueueCumulativeStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskQueueCumulativeStatisticsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskQueueCumulativeStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueCumulativeStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskQueueCumulativeStatisticsSolution} solution - Path solution\n *\n * @returns TaskQueueCumulativeStatisticsPage\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsPage = function\n    TaskQueueCumulativeStatisticsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskQueueCumulativeStatisticsPage.prototype, Page.prototype);\nTaskQueueCumulativeStatisticsPage.prototype.constructor = TaskQueueCumulativeStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskQueueCumulativeStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsPage#\n *\n * @param {TaskQueueCumulativeStatisticsPayload} payload -\n *          Payload response from the API\n *\n * @returns TaskQueueCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new TaskQueueCumulativeStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.taskQueueSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueueCumulativeStatisticsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueCumulativeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {number} avgTaskAcceptanceTime -\n *          The average time in seconds between Task creation and acceptance\n * @property {Date} startTime -\n *          The beginning of the interval during which these statistics were calculated\n * @property {Date} endTime -\n *          The end of the interval during which these statistics were calculated\n * @property {number} reservationsCreated -\n *          The total number of Reservations created for Tasks in the TaskQueue\n * @property {number} reservationsAccepted -\n *          The total number of Reservations accepted for Tasks in the TaskQueue\n * @property {number} reservationsRejected -\n *          The total number of Reservations rejected for Tasks in the TaskQueue\n * @property {number} reservationsTimedOut -\n *          The total number of Reservations that timed out for Tasks in the TaskQueue\n * @property {number} reservationsCanceled -\n *          The total number of Reservations canceled for Tasks in the TaskQueue\n * @property {number} reservationsRescinded -\n *          The total number of Reservations rescinded\n * @property {object} splitByWaitTime -\n *          A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds\n * @property {string} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n * @property {object} waitDurationUntilAccepted -\n *          The wait duration statistics for Tasks accepted while in the TaskQueue\n * @property {object} waitDurationUntilCanceled -\n *          The wait duration statistics for Tasks canceled while in the TaskQueue\n * @property {object} waitDurationInQueueUntilAccepted -\n *          The relative wait duration statistics for Tasks accepted while in the TaskQueue\n * @property {number} tasksCanceled -\n *          The total number of Tasks canceled in the TaskQueue\n * @property {number} tasksCompleted -\n *          The total number of Tasks completed in the TaskQueue\n * @property {number} tasksDeleted -\n *          The total number of Tasks deleted in the TaskQueue\n * @property {number} tasksEntered -\n *          The total number of Tasks entered into the TaskQueue\n * @property {number} tasksMoved -\n *          The total number of Tasks that were moved from one queue to another\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueue\n * @property {string} url - The absolute URL of the TaskQueue statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {TaskQueueCumulativeStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the TaskQueue\n * @param {sid} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsInstance = function\n    TaskQueueCumulativeStatisticsInstance(version, payload, workspaceSid,\n    taskQueueSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.avgTaskAcceptanceTime = deserialize.integer(payload.avg_task_acceptance_time); // jshint ignore:line\n  this.startTime = deserialize.iso8601DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.reservationsCreated = deserialize.integer(payload.reservations_created); // jshint ignore:line\n  this.reservationsAccepted = deserialize.integer(payload.reservations_accepted); // jshint ignore:line\n  this.reservationsRejected = deserialize.integer(payload.reservations_rejected); // jshint ignore:line\n  this.reservationsTimedOut = deserialize.integer(payload.reservations_timed_out); // jshint ignore:line\n  this.reservationsCanceled = deserialize.integer(payload.reservations_canceled); // jshint ignore:line\n  this.reservationsRescinded = deserialize.integer(payload.reservations_rescinded); // jshint ignore:line\n  this.splitByWaitTime = payload.split_by_wait_time; // jshint ignore:line\n  this.taskQueueSid = payload.task_queue_sid; // jshint ignore:line\n  this.waitDurationUntilAccepted = payload.wait_duration_until_accepted; // jshint ignore:line\n  this.waitDurationUntilCanceled = payload.wait_duration_until_canceled; // jshint ignore:line\n  this.waitDurationInQueueUntilAccepted = payload.wait_duration_in_queue_until_accepted; // jshint ignore:line\n  this.tasksCanceled = deserialize.integer(payload.tasks_canceled); // jshint ignore:line\n  this.tasksCompleted = deserialize.integer(payload.tasks_completed); // jshint ignore:line\n  this.tasksDeleted = deserialize.integer(payload.tasks_deleted); // jshint ignore:line\n  this.tasksEntered = deserialize.integer(payload.tasks_entered); // jshint ignore:line\n  this.tasksMoved = deserialize.integer(payload.tasks_moved); // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, taskQueueSid: taskQueueSid, };\n};\n\nObject.defineProperty(TaskQueueCumulativeStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskQueueCumulativeStatisticsContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.taskQueueSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskQueueCumulativeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate cumulative statistics on this TaskChannel\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsInstance.prototype.fetch = function fetch(opts,\n    callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueueCumulativeStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueCumulativeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the TaskQueue to fetch\n * @param {sid} taskQueueSid -\n *          The SID of the TaskQueue for which to fetch statistics\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsContext = function\n    TaskQueueCumulativeStatisticsContext(version, workspaceSid, taskQueueSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, taskQueueSid: taskQueueSid, };\n  this._uri = `/Workspaces/${workspaceSid}/TaskQueues/${taskQueueSid}/CumulativeStatistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskQueueCumulativeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate cumulative statistics on this TaskChannel\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsContext.prototype.fetch = function fetch(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n    'Minutes': _.get(opts, 'minutes'),\n    'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n    'TaskChannel': _.get(opts, 'taskChannel'),\n    'SplitByWaitTime': _.get(opts, 'splitByWaitTime')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskQueueCumulativeStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.taskQueueSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueCumulativeStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskQueueCumulativeStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskQueueCumulativeStatisticsList: TaskQueueCumulativeStatisticsList,\n  TaskQueueCumulativeStatisticsPage: TaskQueueCumulativeStatisticsPage,\n  TaskQueueCumulativeStatisticsInstance: TaskQueueCumulativeStatisticsInstance,\n  TaskQueueCumulativeStatisticsContext: TaskQueueCumulativeStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TaskQueueRealTimeStatisticsList;\nvar TaskQueueRealTimeStatisticsPage;\nvar TaskQueueRealTimeStatisticsInstance;\nvar TaskQueueRealTimeStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueRealTimeStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueue\n * @param {string} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsList = function\n    TaskQueueRealTimeStatisticsList(version, workspaceSid, taskQueueSid) {\n  /* jshint ignore:start */\n  /**\n   * @function realTimeStatistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function TaskQueueRealTimeStatisticsListInstance(sid) {\n    return TaskQueueRealTimeStatisticsListInstance.get(sid);\n  }\n\n  TaskQueueRealTimeStatisticsListInstance._version = version;\n  // Path Solution\n  TaskQueueRealTimeStatisticsListInstance._solution = {\n    workspaceSid: workspaceSid,\n    taskQueueSid: taskQueueSid\n  };\n  /* jshint ignore:start */\n  /**\n   * Constructs a task_queue_real_time_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  TaskQueueRealTimeStatisticsListInstance.get = function get() {\n    return new TaskQueueRealTimeStatisticsContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.taskQueueSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskQueueRealTimeStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskQueueRealTimeStatisticsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskQueueRealTimeStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueRealTimeStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskQueueRealTimeStatisticsSolution} solution - Path solution\n *\n * @returns TaskQueueRealTimeStatisticsPage\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsPage = function\n    TaskQueueRealTimeStatisticsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskQueueRealTimeStatisticsPage.prototype, Page.prototype);\nTaskQueueRealTimeStatisticsPage.prototype.constructor = TaskQueueRealTimeStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskQueueRealTimeStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsPage#\n *\n * @param {TaskQueueRealTimeStatisticsPayload} payload -\n *          Payload response from the API\n *\n * @returns TaskQueueRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new TaskQueueRealTimeStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.taskQueueSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueueRealTimeStatisticsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueRealTimeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} activityStatistics -\n *          The number of current Workers by Activity\n * @property {number} longestTaskWaitingAge - The age of the longest waiting Task\n * @property {string} longestTaskWaitingSid - The SID of the longest waiting Task\n * @property {number} longestRelativeTaskAgeInQueue -\n *          The relative age in the TaskQueue for the longest waiting Task.\n * @property {string} longestRelativeTaskSidInQueue -\n *          The SID of the Task waiting in the TaskQueue the longest.\n * @property {string} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n * @property {object} tasksByPriority - The number of Tasks by priority\n * @property {object} tasksByStatus - The number of Tasks by their current status\n * @property {number} totalAvailableWorkers -\n *          The total number of Workers available for Tasks in the TaskQueue\n * @property {number} totalEligibleWorkers -\n *          The total number of Workers eligible for Tasks in the TaskQueue, independent of their Activity state\n * @property {number} totalTasks - The total number of Tasks\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueue\n * @property {string} url - The absolute URL of the TaskQueue statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {TaskQueueRealTimeStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the TaskQueue\n * @param {sid} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsInstance = function\n    TaskQueueRealTimeStatisticsInstance(version, payload, workspaceSid,\n    taskQueueSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.activityStatistics = payload.activity_statistics; // jshint ignore:line\n  this.longestTaskWaitingAge = deserialize.integer(payload.longest_task_waiting_age); // jshint ignore:line\n  this.longestTaskWaitingSid = payload.longest_task_waiting_sid; // jshint ignore:line\n  this.longestRelativeTaskAgeInQueue = deserialize.integer(payload.longest_relative_task_age_in_queue); // jshint ignore:line\n  this.longestRelativeTaskSidInQueue = payload.longest_relative_task_sid_in_queue; // jshint ignore:line\n  this.taskQueueSid = payload.task_queue_sid; // jshint ignore:line\n  this.tasksByPriority = payload.tasks_by_priority; // jshint ignore:line\n  this.tasksByStatus = payload.tasks_by_status; // jshint ignore:line\n  this.totalAvailableWorkers = deserialize.integer(payload.total_available_workers); // jshint ignore:line\n  this.totalEligibleWorkers = deserialize.integer(payload.total_eligible_workers); // jshint ignore:line\n  this.totalTasks = deserialize.integer(payload.total_tasks); // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, taskQueueSid: taskQueueSid, };\n};\n\nObject.defineProperty(TaskQueueRealTimeStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskQueueRealTimeStatisticsContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.taskQueueSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskQueueRealTimeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.taskChannel] -\n *          The TaskChannel for which to fetch statistics\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsInstance.prototype.fetch = function fetch(opts,\n    callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueueRealTimeStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueRealTimeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the TaskQueue to fetch\n * @param {sid} taskQueueSid -\n *          The SID of the TaskQueue for which to fetch statistics\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsContext = function\n    TaskQueueRealTimeStatisticsContext(version, workspaceSid, taskQueueSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, taskQueueSid: taskQueueSid, };\n  this._uri = `/Workspaces/${workspaceSid}/TaskQueues/${taskQueueSid}/RealTimeStatistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskQueueRealTimeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.taskChannel] -\n *          The TaskChannel for which to fetch statistics\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsContext.prototype.fetch = function fetch(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'TaskChannel': _.get(opts, 'taskChannel')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskQueueRealTimeStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.taskQueueSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueRealTimeStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskQueueRealTimeStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskQueueRealTimeStatisticsList: TaskQueueRealTimeStatisticsList,\n  TaskQueueRealTimeStatisticsPage: TaskQueueRealTimeStatisticsPage,\n  TaskQueueRealTimeStatisticsInstance: TaskQueueRealTimeStatisticsInstance,\n  TaskQueueRealTimeStatisticsContext: TaskQueueRealTimeStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TaskQueueStatisticsList;\nvar TaskQueueStatisticsPage;\nvar TaskQueueStatisticsInstance;\nvar TaskQueueStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueue\n * @param {string} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n */\n/* jshint ignore:end */\nTaskQueueStatisticsList = function TaskQueueStatisticsList(version,\n                                                            workspaceSid,\n                                                            taskQueueSid) {\n  /* jshint ignore:start */\n  /**\n   * @function statistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function TaskQueueStatisticsListInstance(sid) {\n    return TaskQueueStatisticsListInstance.get(sid);\n  }\n\n  TaskQueueStatisticsListInstance._version = version;\n  // Path Solution\n  TaskQueueStatisticsListInstance._solution = {\n    workspaceSid: workspaceSid,\n    taskQueueSid: taskQueueSid\n  };\n  /* jshint ignore:start */\n  /**\n   * Constructs a task_queue_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsContext}\n   */\n  /* jshint ignore:end */\n  TaskQueueStatisticsListInstance.get = function get() {\n    return new TaskQueueStatisticsContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.taskQueueSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskQueueStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskQueueStatisticsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskQueueStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskQueueStatisticsSolution} solution - Path solution\n *\n * @returns TaskQueueStatisticsPage\n */\n/* jshint ignore:end */\nTaskQueueStatisticsPage = function TaskQueueStatisticsPage(version, response,\n                                                            solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskQueueStatisticsPage.prototype, Page.prototype);\nTaskQueueStatisticsPage.prototype.constructor = TaskQueueStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskQueueStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsPage#\n *\n * @param {TaskQueueStatisticsPayload} payload - Payload response from the API\n *\n * @returns TaskQueueStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueueStatisticsPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskQueueStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.taskQueueSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueueStatisticsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} cumulative -\n *          An object that contains the cumulative statistics for the TaskQueue\n * @property {object} realtime -\n *          An object that contains the real-time statistics for the TaskQueue\n * @property {string} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueue\n * @property {string} url - The absolute URL of the TaskQueue statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {TaskQueueStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the TaskQueue\n * @param {sid} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n */\n/* jshint ignore:end */\nTaskQueueStatisticsInstance = function TaskQueueStatisticsInstance(version,\n    payload, workspaceSid, taskQueueSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.cumulative = payload.cumulative; // jshint ignore:line\n  this.realtime = payload.realtime; // jshint ignore:line\n  this.taskQueueSid = payload.task_queue_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, taskQueueSid: taskQueueSid, };\n};\n\nObject.defineProperty(TaskQueueStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskQueueStatisticsContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.taskQueueSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskQueueStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time and cumulative statistics for the specified TaskChannel\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueueStatisticsInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueueStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the TaskQueue to fetch\n * @param {sid} taskQueueSid -\n *          The SID of the TaskQueue for which to fetch statistics\n */\n/* jshint ignore:end */\nTaskQueueStatisticsContext = function TaskQueueStatisticsContext(version,\n    workspaceSid, taskQueueSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, taskQueueSid: taskQueueSid, };\n  this._uri = `/Workspaces/${workspaceSid}/TaskQueues/${taskQueueSid}/Statistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskQueueStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time and cumulative statistics for the specified TaskChannel\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueueStatisticsContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n    'Minutes': _.get(opts, 'minutes'),\n    'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n    'TaskChannel': _.get(opts, 'taskChannel'),\n    'SplitByWaitTime': _.get(opts, 'splitByWaitTime')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskQueueStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.taskQueueSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskQueueStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskQueueStatisticsList: TaskQueueStatisticsList,\n  TaskQueueStatisticsPage: TaskQueueStatisticsPage,\n  TaskQueueStatisticsInstance: TaskQueueStatisticsInstance,\n  TaskQueueStatisticsContext: TaskQueueStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar TaskQueuesStatisticsList;\nvar TaskQueuesStatisticsPage;\nvar TaskQueuesStatisticsInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueuesStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueue\n */\n/* jshint ignore:end */\nTaskQueuesStatisticsList = function TaskQueuesStatisticsList(version,\n    workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function statistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function TaskQueuesStatisticsListInstance(sid) {\n    return TaskQueuesStatisticsListInstance.get(sid);\n  }\n\n  TaskQueuesStatisticsListInstance._version = version;\n  // Path Solution\n  TaskQueuesStatisticsListInstance._solution = {workspaceSid: workspaceSid};\n  TaskQueuesStatisticsListInstance._uri = `/Workspaces/${workspaceSid}/TaskQueues/Statistics`;\n  /* jshint ignore:start */\n  /**\n   * Streams TaskQueuesStatisticsInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.endDate] -\n   *          Only calculate statistics from on or before this date\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the TaskQueue statistics to read\n   * @param {number} [opts.minutes] -\n   *          Only calculate statistics since this many minutes in the past\n   * @param {Date} [opts.startDate] -\n   *          Only calculate statistics from on or after this date\n   * @param {string} [opts.taskChannel] -\n   *          Only calculate statistics on this TaskChannel.\n   * @param {string} [opts.splitByWaitTime] -\n   *          A comma separated list of values that describes the thresholds to calculate statistics on\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TaskQueuesStatisticsListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TaskQueuesStatisticsInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.endDate] -\n   *          Only calculate statistics from on or before this date\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the TaskQueue statistics to read\n   * @param {number} [opts.minutes] -\n   *          Only calculate statistics since this many minutes in the past\n   * @param {Date} [opts.startDate] -\n   *          Only calculate statistics from on or after this date\n   * @param {string} [opts.taskChannel] -\n   *          Only calculate statistics on this TaskChannel.\n   * @param {string} [opts.splitByWaitTime] -\n   *          A comma separated list of values that describes the thresholds to calculate statistics on\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskQueuesStatisticsListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TaskQueuesStatisticsInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.endDate] -\n   *          Only calculate statistics from on or before this date\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the TaskQueue statistics to read\n   * @param {number} [opts.minutes] -\n   *          Only calculate statistics since this many minutes in the past\n   * @param {Date} [opts.startDate] -\n   *          Only calculate statistics from on or after this date\n   * @param {string} [opts.taskChannel] -\n   *          Only calculate statistics on this TaskChannel.\n   * @param {string} [opts.splitByWaitTime] -\n   *          A comma separated list of values that describes the thresholds to calculate statistics on\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskQueuesStatisticsListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Minutes': _.get(opts, 'minutes'),\n      'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n      'TaskChannel': _.get(opts, 'taskChannel'),\n      'SplitByWaitTime': _.get(opts, 'splitByWaitTime'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskQueuesStatisticsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TaskQueuesStatisticsInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskQueuesStatisticsListInstance.getPage = function getPage(targetUrl, callback)\n                                                               {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskQueuesStatisticsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskQueuesStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskQueuesStatisticsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskQueuesStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueuesStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskQueuesStatisticsSolution} solution - Path solution\n *\n * @returns TaskQueuesStatisticsPage\n */\n/* jshint ignore:end */\nTaskQueuesStatisticsPage = function TaskQueuesStatisticsPage(version, response,\n    solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskQueuesStatisticsPage.prototype, Page.prototype);\nTaskQueuesStatisticsPage.prototype.constructor = TaskQueuesStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskQueuesStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsPage#\n *\n * @param {TaskQueuesStatisticsPayload} payload - Payload response from the API\n *\n * @returns TaskQueuesStatisticsInstance\n */\n/* jshint ignore:end */\nTaskQueuesStatisticsPage.prototype.getInstance = function getInstance(payload) {\n  return new TaskQueuesStatisticsInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueuesStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueuesStatisticsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueuesStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} cumulative -\n *          An object that contains the cumulative statistics for the TaskQueues\n * @property {object} realtime -\n *          An object that contains the real-time statistics for the TaskQueues\n * @property {string} taskQueueSid -\n *          The SID of the TaskQueue from which these statistics were calculated\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueues\n *\n * @param {V1} version - Version of the resource\n * @param {TaskQueuesStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the TaskQueue\n */\n/* jshint ignore:end */\nTaskQueuesStatisticsInstance = function TaskQueuesStatisticsInstance(version,\n    payload, workspaceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.cumulative = payload.cumulative; // jshint ignore:line\n  this.realtime = payload.realtime; // jshint ignore:line\n  this.taskQueueSid = payload.task_queue_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueuesStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueuesStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueuesStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskQueuesStatisticsList: TaskQueuesStatisticsList,\n  TaskQueuesStatisticsPage: TaskQueuesStatisticsPage,\n  TaskQueuesStatisticsInstance: TaskQueuesStatisticsInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar TaskQueueCumulativeStatisticsList = require(\n    './taskQueue/taskQueueCumulativeStatistics').TaskQueueCumulativeStatisticsList;\nvar TaskQueueRealTimeStatisticsList = require(\n    './taskQueue/taskQueueRealTimeStatistics').TaskQueueRealTimeStatisticsList;\nvar TaskQueueStatisticsList = require(\n    './taskQueue/taskQueueStatistics').TaskQueueStatisticsList;\nvar TaskQueuesStatisticsList = require(\n    './taskQueue/taskQueuesStatistics').TaskQueuesStatisticsList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TaskQueueList;\nvar TaskQueuePage;\nvar TaskQueueInstance;\nvar TaskQueueContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueue\n */\n/* jshint ignore:end */\nTaskQueueList = function TaskQueueList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function taskQueues\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext}\n   */\n  /* jshint ignore:end */\n  function TaskQueueListInstance(sid) {\n    return TaskQueueListInstance.get(sid);\n  }\n\n  TaskQueueListInstance._version = version;\n  // Path Solution\n  TaskQueueListInstance._solution = {workspaceSid: workspaceSid};\n  TaskQueueListInstance._uri = `/Workspaces/${workspaceSid}/TaskQueues`;\n\n  // Components\n  TaskQueueListInstance._statistics = undefined;\n\n  /* jshint ignore:start */\n  /**\n   * Streams TaskQueueInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the TaskQueue resources to read\n   * @param {string} [opts.evaluateWorkerAttributes] -\n   *          The attributes of the Workers to read\n   * @param {string} [opts.workerSid] -\n   *          The SID of the Worker with the TaskQueue resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TaskQueueListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TaskQueueInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the TaskQueue resources to read\n   * @param {string} [opts.evaluateWorkerAttributes] -\n   *          The attributes of the Workers to read\n   * @param {string} [opts.workerSid] -\n   *          The SID of the Worker with the TaskQueue resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskQueueListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TaskQueueInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the TaskQueue resources to read\n   * @param {string} [opts.evaluateWorkerAttributes] -\n   *          The attributes of the Workers to read\n   * @param {string} [opts.workerSid] -\n   *          The SID of the Worker with the TaskQueue resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskQueueListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'EvaluateWorkerAttributes': _.get(opts, 'evaluateWorkerAttributes'),\n      'WorkerSid': _.get(opts, 'workerSid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskQueuePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TaskQueueInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TaskQueueListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskQueuePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a TaskQueueInstance\n   *\n   * @function create\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the resource\n   * @param {string} [opts.targetWorkers] -\n   *          A string describing the Worker selection criteria for any Tasks that enter the TaskQueue\n   * @param {number} [opts.maxReservedWorkers] -\n   *          The maximum number of Workers to reserve\n   * @param {task_queue.task_order} [opts.taskOrder] -\n   *          How Tasks will be assigned to Workers\n   * @param {string} [opts.reservationActivitySid] -\n   *          The SID of the Activity to assign Workers when a task is reserved for them\n   * @param {string} [opts.assignmentActivitySid] -\n   *          The SID of the Activity to assign Workers once a task is assigned to them\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TaskQueueInstance\n   */\n  /* jshint ignore:end */\n  TaskQueueListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'TargetWorkers': _.get(opts, 'targetWorkers'),\n      'MaxReservedWorkers': _.get(opts, 'maxReservedWorkers'),\n      'TaskOrder': _.get(opts, 'taskOrder'),\n      'ReservationActivitySid': _.get(opts, 'reservationActivitySid'),\n      'AssignmentActivitySid': _.get(opts, 'assignmentActivitySid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TaskQueueInstance(\n        this._version,\n        payload,\n        this._solution.workspaceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a task_queue\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList#\n   *\n   * @param {string} sid - The SID of the resource to\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext}\n   */\n  /* jshint ignore:end */\n  TaskQueueListInstance.get = function get(sid) {\n    return new TaskQueueContext(this._version, this._solution.workspaceSid, sid);\n  };\n\n  Object.defineProperty(TaskQueueListInstance,\n    'statistics', {\n      get: function statistics() {\n        if (!this._statistics) {\n          this._statistics = new TaskQueuesStatisticsList(this._version, this._solution.workspaceSid);\n        }\n\n        return this._statistics;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TaskQueueListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TaskQueueListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TaskQueueListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueuePage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueuePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TaskQueueSolution} solution - Path solution\n *\n * @returns TaskQueuePage\n */\n/* jshint ignore:end */\nTaskQueuePage = function TaskQueuePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TaskQueuePage.prototype, Page.prototype);\nTaskQueuePage.prototype.constructor = TaskQueuePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TaskQueueInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueuePage#\n *\n * @param {TaskQueuePayload} payload - Payload response from the API\n *\n * @returns TaskQueueInstance\n */\n/* jshint ignore:end */\nTaskQueuePage.prototype.getInstance = function getInstance(payload) {\n  return new TaskQueueInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueuePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueuePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueuePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} assignmentActivitySid -\n *          The SID of the Activity to assign Workers when a task is assigned for them\n * @property {string} assignmentActivityName -\n *          The name of the Activity to assign Workers when a task is assigned for them\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {number} maxReservedWorkers - The maximum number of Workers to reserve\n * @property {string} reservationActivitySid -\n *          The SID of the Activity to assign Workers once a task is reserved for them\n * @property {string} reservationActivityName -\n *          The name of the Activity to assign Workers once a task is reserved for them\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} targetWorkers -\n *          A string describing the Worker selection criteria for any Tasks that enter the TaskQueue\n * @property {task_queue.task_order} taskOrder -\n *          How Tasks will be assigned to Workers\n * @property {string} url - The absolute URL of the TaskQueue resource\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the TaskQueue\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {TaskQueuePayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the TaskQueue\n * @param {sid} sid - The SID of the resource to\n */\n/* jshint ignore:end */\nTaskQueueInstance = function TaskQueueInstance(version, payload, workspaceSid,\n                                                sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assignmentActivitySid = payload.assignment_activity_sid; // jshint ignore:line\n  this.assignmentActivityName = payload.assignment_activity_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.maxReservedWorkers = deserialize.integer(payload.max_reserved_workers); // jshint ignore:line\n  this.reservationActivitySid = payload.reservation_activity_sid; // jshint ignore:line\n  this.reservationActivityName = payload.reservation_activity_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.targetWorkers = payload.target_workers; // jshint ignore:line\n  this.taskOrder = payload.task_order; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TaskQueueInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TaskQueueContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TaskQueueInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueInstance\n */\n/* jshint ignore:end */\nTaskQueueInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskQueueInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.targetWorkers] -\n *          A string describing the Worker selection criteria for any Tasks that enter the TaskQueue\n * @param {string} [opts.reservationActivitySid] -\n *          The SID of the Activity to assign Workers when a task is reserved for them\n * @param {string} [opts.assignmentActivitySid] -\n *          The SID of the Activity to assign Workers when a task is assigned for them\n * @param {number} [opts.maxReservedWorkers] -\n *          The maximum number of Workers to create reservations for the assignment of a task while in the queue\n * @param {task_queue.task_order} [opts.taskOrder] -\n *          How Tasks will be assigned to Workers\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueInstance\n */\n/* jshint ignore:end */\nTaskQueueInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskQueueInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueInstance\n */\n/* jshint ignore:end */\nTaskQueueInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the statistics\n *\n * @function statistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsList}\n */\n/* jshint ignore:end */\nTaskQueueInstance.prototype.statistics = function statistics() {\n  return this._proxy.statistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the realTimeStatistics\n *\n * @function realTimeStatistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsList}\n */\n/* jshint ignore:end */\nTaskQueueInstance.prototype.realTimeStatistics = function realTimeStatistics() {\n  return this._proxy.realTimeStatistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the cumulativeStatistics\n *\n * @function cumulativeStatistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsList}\n */\n/* jshint ignore:end */\nTaskQueueInstance.prototype.cumulativeStatistics = function\n    cumulativeStatistics() {\n  return this._proxy.cumulativeStatistics;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTaskQueueInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TaskQueueContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext\n *\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueStatisticsList} statistics -\n *          statistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueRealTimeStatisticsList} realTimeStatistics -\n *          realTimeStatistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext.TaskQueueCumulativeStatisticsList} cumulativeStatistics -\n *          cumulativeStatistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the TaskQueue to fetch\n * @param {sid} sid - The SID of the resource to\n */\n/* jshint ignore:end */\nTaskQueueContext = function TaskQueueContext(version, workspaceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/TaskQueues/${sid}`;\n\n  // Dependents\n  this._statistics = undefined;\n  this._realTimeStatistics = undefined;\n  this._cumulativeStatistics = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TaskQueueInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueInstance\n */\n/* jshint ignore:end */\nTaskQueueContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskQueueInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TaskQueueInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.targetWorkers] -\n *          A string describing the Worker selection criteria for any Tasks that enter the TaskQueue\n * @param {string} [opts.reservationActivitySid] -\n *          The SID of the Activity to assign Workers when a task is reserved for them\n * @param {string} [opts.assignmentActivitySid] -\n *          The SID of the Activity to assign Workers when a task is assigned for them\n * @param {number} [opts.maxReservedWorkers] -\n *          The maximum number of Workers to create reservations for the assignment of a task while in the queue\n * @param {task_queue.task_order} [opts.taskOrder] -\n *          How Tasks will be assigned to Workers\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueInstance\n */\n/* jshint ignore:end */\nTaskQueueContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'TargetWorkers': _.get(opts, 'targetWorkers'),\n    'ReservationActivitySid': _.get(opts, 'reservationActivitySid'),\n    'AssignmentActivitySid': _.get(opts, 'assignmentActivitySid'),\n    'MaxReservedWorkers': _.get(opts, 'maxReservedWorkers'),\n    'TaskOrder': _.get(opts, 'taskOrder')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TaskQueueInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TaskQueueInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TaskQueueInstance\n */\n/* jshint ignore:end */\nTaskQueueContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(TaskQueueContext.prototype,\n  'statistics', {\n    get: function() {\n      if (!this._statistics) {\n        this._statistics = new TaskQueueStatisticsList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._statistics;\n    }\n});\n\nObject.defineProperty(TaskQueueContext.prototype,\n  'realTimeStatistics', {\n    get: function() {\n      if (!this._realTimeStatistics) {\n        this._realTimeStatistics = new TaskQueueRealTimeStatisticsList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._realTimeStatistics;\n    }\n});\n\nObject.defineProperty(TaskQueueContext.prototype,\n  'cumulativeStatistics', {\n    get: function() {\n      if (!this._cumulativeStatistics) {\n        this._cumulativeStatistics = new TaskQueueCumulativeStatisticsList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._cumulativeStatistics;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTaskQueueContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTaskQueueContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TaskQueueList: TaskQueueList,\n  TaskQueuePage: TaskQueuePage,\n  TaskQueueInstance: TaskQueueInstance,\n  TaskQueueContext: TaskQueueContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ReservationList;\nvar ReservationPage;\nvar ReservationInstance;\nvar ReservationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ReservationList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that this worker is contained within.\n * @param {string} workerSid - The SID of the reserved Worker resource\n */\n/* jshint ignore:end */\nReservationList = function ReservationList(version, workspaceSid, workerSid) {\n  /* jshint ignore:start */\n  /**\n   * @function reservations\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationContext}\n   */\n  /* jshint ignore:end */\n  function ReservationListInstance(sid) {\n    return ReservationListInstance.get(sid);\n  }\n\n  ReservationListInstance._version = version;\n  // Path Solution\n  ReservationListInstance._solution = {workspaceSid: workspaceSid, workerSid: workerSid};\n  ReservationListInstance._uri = `/Workspaces/${workspaceSid}/Workers/${workerSid}/Reservations`;\n  /* jshint ignore:start */\n  /**\n   * Streams ReservationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {reservation.status} [opts.reservationStatus] -\n   *          Returns the list of reservations for a worker with a specified ReservationStatus\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ReservationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {reservation.status} [opts.reservationStatus] -\n   *          Returns the list of reservations for a worker with a specified ReservationStatus\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ReservationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {reservation.status} [opts.reservationStatus] -\n   *          Returns the list of reservations for a worker with a specified ReservationStatus\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ReservationStatus': _.get(opts, 'reservationStatus'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ReservationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ReservationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ReservationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a reservation\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationList#\n   *\n   * @param {string} sid - The SID of the WorkerReservation resource to fetch\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationContext}\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.get = function get(sid) {\n    return new ReservationContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.workerSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ReservationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ReservationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ReservationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ReservationPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ReservationSolution} solution - Path solution\n *\n * @returns ReservationPage\n */\n/* jshint ignore:end */\nReservationPage = function ReservationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ReservationPage.prototype, Page.prototype);\nReservationPage.prototype.constructor = ReservationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ReservationInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationPage#\n *\n * @param {ReservationPayload} payload - Payload response from the API\n *\n * @returns ReservationInstance\n */\n/* jshint ignore:end */\nReservationPage.prototype.getInstance = function getInstance(payload) {\n  return new ReservationInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.workerSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nReservationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nReservationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ReservationContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {reservation.status} reservationStatus -\n *          The current status of the reservation\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} taskSid - The SID of the reserved Task resource\n * @property {string} workerName - The friendly_name of the Worker that is reserved\n * @property {string} workerSid - The SID of the reserved Worker resource\n * @property {string} workspaceSid -\n *          The SID of the Workspace that this worker is contained within.\n * @property {string} url - The absolute URL of the WorkerReservation resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {ReservationPayload} payload - The instance payload\n * @param {sid} workspaceSid -\n *          The SID of the Workspace that this worker is contained within.\n * @param {sid} workerSid - The SID of the reserved Worker resource\n * @param {sid} sid - The SID of the WorkerReservation resource to fetch\n */\n/* jshint ignore:end */\nReservationInstance = function ReservationInstance(version, payload,\n                                                    workspaceSid, workerSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.reservationStatus = payload.reservation_status; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.taskSid = payload.task_sid; // jshint ignore:line\n  this.workerName = payload.worker_name; // jshint ignore:line\n  this.workerSid = payload.worker_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, workerSid: workerSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ReservationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ReservationContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.workerSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ReservationInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ReservationInstance\n */\n/* jshint ignore:end */\nReservationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ReservationInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {reservation.status} [opts.reservationStatus] -\n *          The new status of the reservation\n * @param {string} [opts.workerActivitySid] -\n *          The new worker activity SID if rejecting a reservation\n * @param {string} [opts.instruction] -\n *          The assignment instruction for the reservation\n * @param {string} [opts.dequeuePostWorkActivitySid] -\n *          The SID of the Activity resource to start after executing a Dequeue instruction\n * @param {string} [opts.dequeueFrom] -\n *          The caller ID of the call to the worker when executing a Dequeue instruction\n * @param {string} [opts.dequeueRecord] -\n *          Whether to record both legs of a call when executing a Dequeue instruction\n * @param {number} [opts.dequeueTimeout] -\n *          The timeout for call when executing a Dequeue instruction\n * @param {string} [opts.dequeueTo] -\n *          The contact URI of the worker when executing a Dequeue instruction\n * @param {string} [opts.dequeueStatusCallbackUrl] -\n *          The callback URL for completed call event when executing a Dequeue instruction\n * @param {string} [opts.callFrom] -\n *          The Caller ID of the outbound call when executing a Call instruction\n * @param {string} [opts.callRecord] -\n *          Whether to record both legs of a call when executing a Call instruction\n * @param {number} [opts.callTimeout] -\n *          The timeout for a call when executing a Call instruction\n * @param {string} [opts.callTo] -\n *          The contact URI of the worker when executing a Call instruction\n * @param {string} [opts.callUrl] -\n *          TwiML URI executed on answering the worker's leg as a result of the Call instruction\n * @param {string} [opts.callStatusCallbackUrl] -\n *          The URL to call for the completed call event when executing a Call instruction\n * @param {boolean} [opts.callAccept] -\n *          Whether to accept a reservation when executing a Call instruction\n * @param {string} [opts.redirectCallSid] -\n *          The Call SID of the call parked in the queue when executing a Redirect instruction\n * @param {boolean} [opts.redirectAccept] -\n *          Whether the reservation should be accepted when executing a Redirect instruction\n * @param {string} [opts.redirectUrl] -\n *          TwiML URI to redirect the call to when executing the Redirect instruction\n * @param {string} [opts.to] -\n *          The Contact URI of the worker when executing a Conference instruction\n * @param {string} [opts.from] -\n *          The caller ID of the call to the worker when executing a Conference instruction\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback\n * @param {reservation.call_status|list} [opts.statusCallbackEvent] -\n *          The call progress events that we will send to status_callback\n * @param {number} [opts.timeout] -\n *          The timeout for a call when executing a Conference instruction\n * @param {boolean} [opts.record] -\n *          Whether to record the participant and their conferences\n * @param {boolean} [opts.muted] - Whether to mute the agent\n * @param {string} [opts.beep] -\n *          Whether to play a notification beep when the participant joins\n * @param {boolean} [opts.startConferenceOnEnter] -\n *          Whether the conference starts when the participant joins the conference\n * @param {boolean} [opts.endConferenceOnExit] -\n *          Whether to end the conference when the agent leaves\n * @param {string} [opts.waitUrl] - URL that hosts pre-conference hold music\n * @param {string} [opts.waitMethod] -\n *          The HTTP method we should use to call `wait_url`\n * @param {boolean} [opts.earlyMedia] -\n *          Whether agents can hear the state of the outbound call\n * @param {number} [opts.maxParticipants] -\n *          The maximum number of agent conference participants\n * @param {string} [opts.conferenceStatusCallback] -\n *          The callback URL for conference events\n * @param {string} [opts.conferenceStatusCallbackMethod] -\n *          HTTP method for requesting `conference_status_callback` URL\n * @param {reservation.conference_event|list} [opts.conferenceStatusCallbackEvent] -\n *          The conference status events that we will send to conference_status_callback\n * @param {string} [opts.conferenceRecord] -\n *          Whether to record the conference the participant is joining\n * @param {string} [opts.conferenceTrim] -\n *          Whether to trim leading and trailing silence from your recorded conference audio files\n * @param {string} [opts.recordingChannels] -\n *          Specify `mono` or `dual` recording channels\n * @param {string} [opts.recordingStatusCallback] -\n *          The URL that we should call using the `recording_status_callback_method` when the recording status changes\n * @param {string} [opts.recordingStatusCallbackMethod] -\n *          The HTTP method we should use when we call `recording_status_callback`\n * @param {string} [opts.conferenceRecordingStatusCallback] -\n *          The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available\n * @param {string} [opts.conferenceRecordingStatusCallbackMethod] -\n *          The HTTP method we should use to call `conference_recording_status_callback`\n * @param {string} [opts.region] -\n *          The region where we should mix the conference audio\n * @param {string} [opts.sipAuthUsername] -\n *          The SIP username used for authentication\n * @param {string} [opts.sipAuthPassword] - The SIP password for authentication\n * @param {string|list} [opts.dequeueStatusCallbackEvent] -\n *          The call progress events sent via webhooks as a result of a Dequeue instruction\n * @param {string} [opts.postWorkActivitySid] -\n *          The new worker activity SID after executing a Conference instruction\n * @param {boolean} [opts.endConferenceOnCustomerExit] -\n *          Whether to end the conference when the customer leaves\n * @param {boolean} [opts.beepOnCustomerEntrance] -\n *          Whether to play a notification beep when the customer joins\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ReservationInstance\n */\n/* jshint ignore:end */\nReservationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nReservationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nReservationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ReservationContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid -\n *          The SID of the Workspace with the WorkerReservation resource to fetch\n * @param {sid} workerSid -\n *          The SID of the reserved Worker resource with the WorkerReservation resource to fetch\n * @param {sid} sid - The SID of the WorkerReservation resource to fetch\n */\n/* jshint ignore:end */\nReservationContext = function ReservationContext(version, workspaceSid,\n                                                  workerSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, workerSid: workerSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workers/${workerSid}/Reservations/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ReservationInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ReservationInstance\n */\n/* jshint ignore:end */\nReservationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ReservationInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.workerSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ReservationInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {reservation.status} [opts.reservationStatus] -\n *          The new status of the reservation\n * @param {string} [opts.workerActivitySid] -\n *          The new worker activity SID if rejecting a reservation\n * @param {string} [opts.instruction] -\n *          The assignment instruction for the reservation\n * @param {string} [opts.dequeuePostWorkActivitySid] -\n *          The SID of the Activity resource to start after executing a Dequeue instruction\n * @param {string} [opts.dequeueFrom] -\n *          The caller ID of the call to the worker when executing a Dequeue instruction\n * @param {string} [opts.dequeueRecord] -\n *          Whether to record both legs of a call when executing a Dequeue instruction\n * @param {number} [opts.dequeueTimeout] -\n *          The timeout for call when executing a Dequeue instruction\n * @param {string} [opts.dequeueTo] -\n *          The contact URI of the worker when executing a Dequeue instruction\n * @param {string} [opts.dequeueStatusCallbackUrl] -\n *          The callback URL for completed call event when executing a Dequeue instruction\n * @param {string} [opts.callFrom] -\n *          The Caller ID of the outbound call when executing a Call instruction\n * @param {string} [opts.callRecord] -\n *          Whether to record both legs of a call when executing a Call instruction\n * @param {number} [opts.callTimeout] -\n *          The timeout for a call when executing a Call instruction\n * @param {string} [opts.callTo] -\n *          The contact URI of the worker when executing a Call instruction\n * @param {string} [opts.callUrl] -\n *          TwiML URI executed on answering the worker's leg as a result of the Call instruction\n * @param {string} [opts.callStatusCallbackUrl] -\n *          The URL to call for the completed call event when executing a Call instruction\n * @param {boolean} [opts.callAccept] -\n *          Whether to accept a reservation when executing a Call instruction\n * @param {string} [opts.redirectCallSid] -\n *          The Call SID of the call parked in the queue when executing a Redirect instruction\n * @param {boolean} [opts.redirectAccept] -\n *          Whether the reservation should be accepted when executing a Redirect instruction\n * @param {string} [opts.redirectUrl] -\n *          TwiML URI to redirect the call to when executing the Redirect instruction\n * @param {string} [opts.to] -\n *          The Contact URI of the worker when executing a Conference instruction\n * @param {string} [opts.from] -\n *          The caller ID of the call to the worker when executing a Conference instruction\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback\n * @param {reservation.call_status|list} [opts.statusCallbackEvent] -\n *          The call progress events that we will send to status_callback\n * @param {number} [opts.timeout] -\n *          The timeout for a call when executing a Conference instruction\n * @param {boolean} [opts.record] -\n *          Whether to record the participant and their conferences\n * @param {boolean} [opts.muted] - Whether to mute the agent\n * @param {string} [opts.beep] -\n *          Whether to play a notification beep when the participant joins\n * @param {boolean} [opts.startConferenceOnEnter] -\n *          Whether the conference starts when the participant joins the conference\n * @param {boolean} [opts.endConferenceOnExit] -\n *          Whether to end the conference when the agent leaves\n * @param {string} [opts.waitUrl] - URL that hosts pre-conference hold music\n * @param {string} [opts.waitMethod] -\n *          The HTTP method we should use to call `wait_url`\n * @param {boolean} [opts.earlyMedia] -\n *          Whether agents can hear the state of the outbound call\n * @param {number} [opts.maxParticipants] -\n *          The maximum number of agent conference participants\n * @param {string} [opts.conferenceStatusCallback] -\n *          The callback URL for conference events\n * @param {string} [opts.conferenceStatusCallbackMethod] -\n *          HTTP method for requesting `conference_status_callback` URL\n * @param {reservation.conference_event|list} [opts.conferenceStatusCallbackEvent] -\n *          The conference status events that we will send to conference_status_callback\n * @param {string} [opts.conferenceRecord] -\n *          Whether to record the conference the participant is joining\n * @param {string} [opts.conferenceTrim] -\n *          Whether to trim leading and trailing silence from your recorded conference audio files\n * @param {string} [opts.recordingChannels] -\n *          Specify `mono` or `dual` recording channels\n * @param {string} [opts.recordingStatusCallback] -\n *          The URL that we should call using the `recording_status_callback_method` when the recording status changes\n * @param {string} [opts.recordingStatusCallbackMethod] -\n *          The HTTP method we should use when we call `recording_status_callback`\n * @param {string} [opts.conferenceRecordingStatusCallback] -\n *          The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available\n * @param {string} [opts.conferenceRecordingStatusCallbackMethod] -\n *          The HTTP method we should use to call `conference_recording_status_callback`\n * @param {string} [opts.region] -\n *          The region where we should mix the conference audio\n * @param {string} [opts.sipAuthUsername] -\n *          The SIP username used for authentication\n * @param {string} [opts.sipAuthPassword] - The SIP password for authentication\n * @param {string|list} [opts.dequeueStatusCallbackEvent] -\n *          The call progress events sent via webhooks as a result of a Dequeue instruction\n * @param {string} [opts.postWorkActivitySid] -\n *          The new worker activity SID after executing a Conference instruction\n * @param {boolean} [opts.endConferenceOnCustomerExit] -\n *          Whether to end the conference when the customer leaves\n * @param {boolean} [opts.beepOnCustomerEntrance] -\n *          Whether to play a notification beep when the customer joins\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ReservationInstance\n */\n/* jshint ignore:end */\nReservationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'ReservationStatus': _.get(opts, 'reservationStatus'),\n    'WorkerActivitySid': _.get(opts, 'workerActivitySid'),\n    'Instruction': _.get(opts, 'instruction'),\n    'DequeuePostWorkActivitySid': _.get(opts, 'dequeuePostWorkActivitySid'),\n    'DequeueFrom': _.get(opts, 'dequeueFrom'),\n    'DequeueRecord': _.get(opts, 'dequeueRecord'),\n    'DequeueTimeout': _.get(opts, 'dequeueTimeout'),\n    'DequeueTo': _.get(opts, 'dequeueTo'),\n    'DequeueStatusCallbackUrl': _.get(opts, 'dequeueStatusCallbackUrl'),\n    'CallFrom': _.get(opts, 'callFrom'),\n    'CallRecord': _.get(opts, 'callRecord'),\n    'CallTimeout': _.get(opts, 'callTimeout'),\n    'CallTo': _.get(opts, 'callTo'),\n    'CallUrl': _.get(opts, 'callUrl'),\n    'CallStatusCallbackUrl': _.get(opts, 'callStatusCallbackUrl'),\n    'CallAccept': serialize.bool(_.get(opts, 'callAccept')),\n    'RedirectCallSid': _.get(opts, 'redirectCallSid'),\n    'RedirectAccept': serialize.bool(_.get(opts, 'redirectAccept')),\n    'RedirectUrl': _.get(opts, 'redirectUrl'),\n    'To': _.get(opts, 'to'),\n    'From': _.get(opts, 'from'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n    'StatusCallbackEvent': serialize.map(_.get(opts, 'statusCallbackEvent'), function(e) { return e; }),\n    'Timeout': _.get(opts, 'timeout'),\n    'Record': serialize.bool(_.get(opts, 'record')),\n    'Muted': serialize.bool(_.get(opts, 'muted')),\n    'Beep': _.get(opts, 'beep'),\n    'StartConferenceOnEnter': serialize.bool(_.get(opts, 'startConferenceOnEnter')),\n    'EndConferenceOnExit': serialize.bool(_.get(opts, 'endConferenceOnExit')),\n    'WaitUrl': _.get(opts, 'waitUrl'),\n    'WaitMethod': _.get(opts, 'waitMethod'),\n    'EarlyMedia': serialize.bool(_.get(opts, 'earlyMedia')),\n    'MaxParticipants': _.get(opts, 'maxParticipants'),\n    'ConferenceStatusCallback': _.get(opts, 'conferenceStatusCallback'),\n    'ConferenceStatusCallbackMethod': _.get(opts, 'conferenceStatusCallbackMethod'),\n    'ConferenceStatusCallbackEvent': serialize.map(_.get(opts, 'conferenceStatusCallbackEvent'), function(e) { return e; }),\n    'ConferenceRecord': _.get(opts, 'conferenceRecord'),\n    'ConferenceTrim': _.get(opts, 'conferenceTrim'),\n    'RecordingChannels': _.get(opts, 'recordingChannels'),\n    'RecordingStatusCallback': _.get(opts, 'recordingStatusCallback'),\n    'RecordingStatusCallbackMethod': _.get(opts, 'recordingStatusCallbackMethod'),\n    'ConferenceRecordingStatusCallback': _.get(opts, 'conferenceRecordingStatusCallback'),\n    'ConferenceRecordingStatusCallbackMethod': _.get(opts, 'conferenceRecordingStatusCallbackMethod'),\n    'Region': _.get(opts, 'region'),\n    'SipAuthUsername': _.get(opts, 'sipAuthUsername'),\n    'SipAuthPassword': _.get(opts, 'sipAuthPassword'),\n    'DequeueStatusCallbackEvent': serialize.map(_.get(opts, 'dequeueStatusCallbackEvent'), function(e) { return e; }),\n    'PostWorkActivitySid': _.get(opts, 'postWorkActivitySid'),\n    'EndConferenceOnCustomerExit': serialize.bool(_.get(opts, 'endConferenceOnCustomerExit')),\n    'BeepOnCustomerEntrance': serialize.bool(_.get(opts, 'beepOnCustomerEntrance'))\n  });\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ReservationInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.workerSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nReservationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nReservationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ReservationList: ReservationList,\n  ReservationPage: ReservationPage,\n  ReservationInstance: ReservationInstance,\n  ReservationContext: ReservationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WorkerChannelList;\nvar WorkerChannelPage;\nvar WorkerChannelInstance;\nvar WorkerChannelContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerChannelList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the WorkerChannel\n * @param {string} workerSid -\n *          The SID of the Worker that contains the WorkerChannel\n */\n/* jshint ignore:end */\nWorkerChannelList = function WorkerChannelList(version, workspaceSid, workerSid)\n                                                {\n  /* jshint ignore:start */\n  /**\n   * @function workerChannels\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelContext}\n   */\n  /* jshint ignore:end */\n  function WorkerChannelListInstance(sid) {\n    return WorkerChannelListInstance.get(sid);\n  }\n\n  WorkerChannelListInstance._version = version;\n  // Path Solution\n  WorkerChannelListInstance._solution = {workspaceSid: workspaceSid, workerSid: workerSid};\n  WorkerChannelListInstance._uri = `/Workspaces/${workspaceSid}/Workers/${workerSid}/Channels`;\n  /* jshint ignore:start */\n  /**\n   * Streams WorkerChannelInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WorkerChannelListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WorkerChannelInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkerChannelListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WorkerChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkerChannelListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkerChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WorkerChannelInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkerChannelListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkerChannelPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a worker_channel\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelList#\n   *\n   * @param {string} sid - The SID of the to fetch\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelContext}\n   */\n  /* jshint ignore:end */\n  WorkerChannelListInstance.get = function get(sid) {\n    return new WorkerChannelContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.workerSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkerChannelListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkerChannelListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkerChannelListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerChannelPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkerChannelSolution} solution - Path solution\n *\n * @returns WorkerChannelPage\n */\n/* jshint ignore:end */\nWorkerChannelPage = function WorkerChannelPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkerChannelPage.prototype, Page.prototype);\nWorkerChannelPage.prototype.constructor = WorkerChannelPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkerChannelInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelPage#\n *\n * @param {WorkerChannelPayload} payload - Payload response from the API\n *\n * @returns WorkerChannelInstance\n */\n/* jshint ignore:end */\nWorkerChannelPage.prototype.getInstance = function getInstance(payload) {\n  return new WorkerChannelInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.workerSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkerChannelPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkerChannelPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerChannelContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {number} assignedTasks -\n *          The total number of Tasks assigned to Worker for the TaskChannel type\n * @property {boolean} available -\n *          Whether the Worker should receive Tasks of the TaskChannel type\n * @property {number} availableCapacityPercentage -\n *          The current available capacity between 0 to 100 for the TaskChannel\n * @property {number} configuredCapacity -\n *          The current configured capacity for the WorkerChannel\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} taskChannelSid - The SID of the TaskChannel\n * @property {string} taskChannelUniqueName -\n *          The unique name of the TaskChannel, such as 'voice' or 'sms'\n * @property {string} workerSid -\n *          The SID of the Worker that contains the WorkerChannel\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the WorkerChannel\n * @property {string} url - The absolute URL of the WorkerChannel resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkerChannelPayload} payload - The instance payload\n * @param {sid} workspaceSid -\n *          The SID of the Workspace that contains the WorkerChannel\n * @param {sid} workerSid - The SID of the Worker that contains the WorkerChannel\n * @param {sid_like} sid - The SID of the to fetch\n */\n/* jshint ignore:end */\nWorkerChannelInstance = function WorkerChannelInstance(version, payload,\n                                                        workspaceSid, workerSid,\n                                                        sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assignedTasks = deserialize.integer(payload.assigned_tasks); // jshint ignore:line\n  this.available = payload.available; // jshint ignore:line\n  this.availableCapacityPercentage = deserialize.integer(payload.available_capacity_percentage); // jshint ignore:line\n  this.configuredCapacity = deserialize.integer(payload.configured_capacity); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.taskChannelSid = payload.task_channel_sid; // jshint ignore:line\n  this.taskChannelUniqueName = payload.task_channel_unique_name; // jshint ignore:line\n  this.workerSid = payload.worker_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, workerSid: workerSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(WorkerChannelInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkerChannelContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.workerSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkerChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerChannelInstance\n */\n/* jshint ignore:end */\nWorkerChannelInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WorkerChannelInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.capacity] -\n *          The total number of Tasks that the Worker should handle for the TaskChannel type\n * @param {boolean} [opts.available] - Whether the WorkerChannel is available\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerChannelInstance\n */\n/* jshint ignore:end */\nWorkerChannelInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkerChannelInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkerChannelInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerChannelContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid -\n *          The SID of the Workspace with the WorkerChannel to fetch\n * @param {sid} workerSid - The SID of the Worker with the WorkerChannel to fetch\n * @param {sid_like} sid - The SID of the to fetch\n */\n/* jshint ignore:end */\nWorkerChannelContext = function WorkerChannelContext(version, workspaceSid,\n                                                      workerSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, workerSid: workerSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workers/${workerSid}/Channels/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkerChannelInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerChannelInstance\n */\n/* jshint ignore:end */\nWorkerChannelContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkerChannelInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.workerSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WorkerChannelInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.capacity] -\n *          The total number of Tasks that the Worker should handle for the TaskChannel type\n * @param {boolean} [opts.available] - Whether the WorkerChannel is available\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerChannelInstance\n */\n/* jshint ignore:end */\nWorkerChannelContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Capacity': _.get(opts, 'capacity'),\n    'Available': serialize.bool(_.get(opts, 'available'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkerChannelInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.workerSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkerChannelContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkerChannelContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkerChannelList: WorkerChannelList,\n  WorkerChannelPage: WorkerChannelPage,\n  WorkerChannelInstance: WorkerChannelInstance,\n  WorkerChannelContext: WorkerChannelContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WorkerStatisticsList;\nvar WorkerStatisticsPage;\nvar WorkerStatisticsInstance;\nvar WorkerStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the WorkerChannel\n * @param {string} workerSid -\n *          The SID of the Worker that contains the WorkerChannel\n */\n/* jshint ignore:end */\nWorkerStatisticsList = function WorkerStatisticsList(version, workspaceSid,\n                                                      workerSid) {\n  /* jshint ignore:start */\n  /**\n   * @function statistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkerStatisticsListInstance(sid) {\n    return WorkerStatisticsListInstance.get(sid);\n  }\n\n  WorkerStatisticsListInstance._version = version;\n  // Path Solution\n  WorkerStatisticsListInstance._solution = {workspaceSid: workspaceSid, workerSid: workerSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a worker_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkerStatisticsListInstance.get = function get() {\n    return new WorkerStatisticsContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.workerSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkerStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkerStatisticsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkerStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkerStatisticsSolution} solution - Path solution\n *\n * @returns WorkerStatisticsPage\n */\n/* jshint ignore:end */\nWorkerStatisticsPage = function WorkerStatisticsPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkerStatisticsPage.prototype, Page.prototype);\nWorkerStatisticsPage.prototype.constructor = WorkerStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkerStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsPage#\n *\n * @param {WorkerStatisticsPayload} payload - Payload response from the API\n *\n * @returns WorkerStatisticsInstance\n */\n/* jshint ignore:end */\nWorkerStatisticsPage.prototype.getInstance = function getInstance(payload) {\n  return new WorkerStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.workerSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkerStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkerStatisticsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} cumulative -\n *          An object that contains the cumulative statistics for the Worker\n * @property {string} workerSid -\n *          The SID of the Worker that contains the WorkerChannel\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the WorkerChannel\n * @property {string} url -\n *          The absolute URL of the WorkerChannel statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkerStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid -\n *          The SID of the Workspace that contains the WorkerChannel\n * @param {sid} workerSid - The SID of the Worker that contains the WorkerChannel\n */\n/* jshint ignore:end */\nWorkerStatisticsInstance = function WorkerStatisticsInstance(version, payload,\n    workspaceSid, workerSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.cumulative = payload.cumulative; // jshint ignore:line\n  this.workerSid = payload.worker_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, workerSid: workerSid, };\n};\n\nObject.defineProperty(WorkerStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkerStatisticsContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.workerSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkerStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {Date} [opts.endDate] -\n *          Only include usage that occurred on or before this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerStatisticsInstance\n */\n/* jshint ignore:end */\nWorkerStatisticsInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkerStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkerStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid -\n *          The SID of the Workspace with the WorkerChannel to fetch\n * @param {sid} workerSid - The SID of the Worker with the WorkerChannel to fetch\n */\n/* jshint ignore:end */\nWorkerStatisticsContext = function WorkerStatisticsContext(version,\n                                                            workspaceSid,\n                                                            workerSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, workerSid: workerSid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workers/${workerSid}/Statistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkerStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {Date} [opts.endDate] -\n *          Only include usage that occurred on or before this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerStatisticsInstance\n */\n/* jshint ignore:end */\nWorkerStatisticsContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Minutes': _.get(opts, 'minutes'),\n    'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n    'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n    'TaskChannel': _.get(opts, 'taskChannel')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkerStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.workerSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkerStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkerStatisticsContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkerStatisticsList: WorkerStatisticsList,\n  WorkerStatisticsPage: WorkerStatisticsPage,\n  WorkerStatisticsInstance: WorkerStatisticsInstance,\n  WorkerStatisticsContext: WorkerStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WorkersCumulativeStatisticsList;\nvar WorkersCumulativeStatisticsPage;\nvar WorkersCumulativeStatisticsInstance;\nvar WorkersCumulativeStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersCumulativeStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the Workers\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsList = function\n    WorkersCumulativeStatisticsList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function cumulativeStatistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkersCumulativeStatisticsListInstance(sid) {\n    return WorkersCumulativeStatisticsListInstance.get(sid);\n  }\n\n  WorkersCumulativeStatisticsListInstance._version = version;\n  // Path Solution\n  WorkersCumulativeStatisticsListInstance._solution = {workspaceSid: workspaceSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a workers_cumulative_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkersCumulativeStatisticsListInstance.get = function get() {\n    return new WorkersCumulativeStatisticsContext(this._version, this._solution.workspaceSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkersCumulativeStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkersCumulativeStatisticsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkersCumulativeStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersCumulativeStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkersCumulativeStatisticsSolution} solution - Path solution\n *\n * @returns WorkersCumulativeStatisticsPage\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsPage = function\n    WorkersCumulativeStatisticsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkersCumulativeStatisticsPage.prototype, Page.prototype);\nWorkersCumulativeStatisticsPage.prototype.constructor = WorkersCumulativeStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkersCumulativeStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsPage#\n *\n * @param {WorkersCumulativeStatisticsPayload} payload -\n *          Payload response from the API\n *\n * @returns WorkersCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new WorkersCumulativeStatisticsInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkersCumulativeStatisticsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersCumulativeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} startTime -\n *          The beginning of the interval during which these statistics were calculated\n * @property {Date} endTime -\n *          The end of the interval during which these statistics were calculated\n * @property {object} activityDurations -\n *          The minimum, average, maximum, and total time that Workers spent in each Activity\n * @property {number} reservationsCreated -\n *          The total number of Reservations that were created\n * @property {number} reservationsAccepted -\n *          The total number of Reservations that were accepted\n * @property {number} reservationsRejected -\n *          The total number of Reservations that were rejected\n * @property {number} reservationsTimedOut -\n *          The total number of Reservations that were timed out\n * @property {number} reservationsCanceled -\n *          The total number of Reservations that were canceled\n * @property {number} reservationsRescinded -\n *          The total number of Reservations that were rescinded\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Workers\n * @property {string} url - The absolute URL of the Workers statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkersCumulativeStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Workers\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsInstance = function\n    WorkersCumulativeStatisticsInstance(version, payload, workspaceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.startTime = deserialize.iso8601DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.activityDurations = payload.activity_durations; // jshint ignore:line\n  this.reservationsCreated = deserialize.integer(payload.reservations_created); // jshint ignore:line\n  this.reservationsAccepted = deserialize.integer(payload.reservations_accepted); // jshint ignore:line\n  this.reservationsRejected = deserialize.integer(payload.reservations_rejected); // jshint ignore:line\n  this.reservationsTimedOut = deserialize.integer(payload.reservations_timed_out); // jshint ignore:line\n  this.reservationsCanceled = deserialize.integer(payload.reservations_canceled); // jshint ignore:line\n  this.reservationsRescinded = deserialize.integer(payload.reservations_rescinded); // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, };\n};\n\nObject.defineProperty(WorkersCumulativeStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkersCumulativeStatisticsContext(this._version, this._solution.workspaceSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkersCumulativeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate cumulative statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkersCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsInstance.prototype.fetch = function fetch(opts,\n    callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkersCumulativeStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersCumulativeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the resource to fetch\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsContext = function\n    WorkersCumulativeStatisticsContext(version, workspaceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workers/CumulativeStatistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkersCumulativeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate cumulative statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkersCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsContext.prototype.fetch = function fetch(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n    'Minutes': _.get(opts, 'minutes'),\n    'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n    'TaskChannel': _.get(opts, 'taskChannel')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkersCumulativeStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkersCumulativeStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkersCumulativeStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkersCumulativeStatisticsList: WorkersCumulativeStatisticsList,\n  WorkersCumulativeStatisticsPage: WorkersCumulativeStatisticsPage,\n  WorkersCumulativeStatisticsInstance: WorkersCumulativeStatisticsInstance,\n  WorkersCumulativeStatisticsContext: WorkersCumulativeStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WorkersRealTimeStatisticsList;\nvar WorkersRealTimeStatisticsPage;\nvar WorkersRealTimeStatisticsInstance;\nvar WorkersRealTimeStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersRealTimeStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the Workers\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsList = function WorkersRealTimeStatisticsList(version,\n    workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function realTimeStatistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkersRealTimeStatisticsListInstance(sid) {\n    return WorkersRealTimeStatisticsListInstance.get(sid);\n  }\n\n  WorkersRealTimeStatisticsListInstance._version = version;\n  // Path Solution\n  WorkersRealTimeStatisticsListInstance._solution = {workspaceSid: workspaceSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a workers_real_time_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkersRealTimeStatisticsListInstance.get = function get() {\n    return new WorkersRealTimeStatisticsContext(this._version, this._solution.workspaceSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkersRealTimeStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkersRealTimeStatisticsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkersRealTimeStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersRealTimeStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkersRealTimeStatisticsSolution} solution - Path solution\n *\n * @returns WorkersRealTimeStatisticsPage\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsPage = function WorkersRealTimeStatisticsPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkersRealTimeStatisticsPage.prototype, Page.prototype);\nWorkersRealTimeStatisticsPage.prototype.constructor = WorkersRealTimeStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkersRealTimeStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsPage#\n *\n * @param {WorkersRealTimeStatisticsPayload} payload -\n *          Payload response from the API\n *\n * @returns WorkersRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new WorkersRealTimeStatisticsInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkersRealTimeStatisticsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersRealTimeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} activityStatistics -\n *          The number of current Workers by Activity\n * @property {number} totalWorkers - The total number of Workers\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Workers\n * @property {string} url - The absolute URL of the Workers statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkersRealTimeStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Workers\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsInstance = function\n    WorkersRealTimeStatisticsInstance(version, payload, workspaceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.activityStatistics = payload.activity_statistics; // jshint ignore:line\n  this.totalWorkers = deserialize.integer(payload.total_workers); // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, };\n};\n\nObject.defineProperty(WorkersRealTimeStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkersRealTimeStatisticsContext(this._version, this._solution.workspaceSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkersRealTimeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkersRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsInstance.prototype.fetch = function fetch(opts,\n    callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkersRealTimeStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersRealTimeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the resource to fetch\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsContext = function\n    WorkersRealTimeStatisticsContext(version, workspaceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workers/RealTimeStatistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkersRealTimeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkersRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsContext.prototype.fetch = function fetch(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'TaskChannel': _.get(opts, 'taskChannel')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkersRealTimeStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkersRealTimeStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkersRealTimeStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkersRealTimeStatisticsList: WorkersRealTimeStatisticsList,\n  WorkersRealTimeStatisticsPage: WorkersRealTimeStatisticsPage,\n  WorkersRealTimeStatisticsInstance: WorkersRealTimeStatisticsInstance,\n  WorkersRealTimeStatisticsContext: WorkersRealTimeStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WorkersStatisticsList;\nvar WorkersStatisticsPage;\nvar WorkersStatisticsInstance;\nvar WorkersStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid - The SID of the Workspace that contains the Worker\n */\n/* jshint ignore:end */\nWorkersStatisticsList = function WorkersStatisticsList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function statistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkersStatisticsListInstance(sid) {\n    return WorkersStatisticsListInstance.get(sid);\n  }\n\n  WorkersStatisticsListInstance._version = version;\n  // Path Solution\n  WorkersStatisticsListInstance._solution = {workspaceSid: workspaceSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a workers_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkersStatisticsListInstance.get = function get() {\n    return new WorkersStatisticsContext(this._version, this._solution.workspaceSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkersStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkersStatisticsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkersStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkersStatisticsSolution} solution - Path solution\n *\n * @returns WorkersStatisticsPage\n */\n/* jshint ignore:end */\nWorkersStatisticsPage = function WorkersStatisticsPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkersStatisticsPage.prototype, Page.prototype);\nWorkersStatisticsPage.prototype.constructor = WorkersStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkersStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsPage#\n *\n * @param {WorkersStatisticsPayload} payload - Payload response from the API\n *\n * @returns WorkersStatisticsInstance\n */\n/* jshint ignore:end */\nWorkersStatisticsPage.prototype.getInstance = function getInstance(payload) {\n  return new WorkersStatisticsInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkersStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkersStatisticsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsInstance\n *\n * @property {object} realtime -\n *          An object that contains the real-time statistics for the Worker\n * @property {object} cumulative -\n *          An object that contains the cumulative statistics for the Worker\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Worker\n * @property {string} url - The absolute URL of the Worker statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkersStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Worker\n */\n/* jshint ignore:end */\nWorkersStatisticsInstance = function WorkersStatisticsInstance(version, payload,\n    workspaceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.realtime = payload.realtime; // jshint ignore:line\n  this.cumulative = payload.cumulative; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, };\n};\n\nObject.defineProperty(WorkersStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkersStatisticsContext(this._version, this._solution.workspaceSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkersStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from this date and time and earlier\n * @param {string} [opts.taskQueueSid] -\n *          The SID of the TaskQueue for which to fetch Worker statistics\n * @param {string} [opts.taskQueueName] -\n *          The friendly_name of the TaskQueue for which to fetch Worker statistics\n * @param {string} [opts.friendlyName] -\n *          Only include Workers with `friendly_name` values that match this parameter\n * @param {string} [opts.taskChannel] -\n *          Only calculate statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkersStatisticsInstance\n */\n/* jshint ignore:end */\nWorkersStatisticsInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkersStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkersStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkersStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the Worker to fetch\n */\n/* jshint ignore:end */\nWorkersStatisticsContext = function WorkersStatisticsContext(version,\n    workspaceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workers/Statistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkersStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from this date and time and earlier\n * @param {string} [opts.taskQueueSid] -\n *          The SID of the TaskQueue for which to fetch Worker statistics\n * @param {string} [opts.taskQueueName] -\n *          The friendly_name of the TaskQueue for which to fetch Worker statistics\n * @param {string} [opts.friendlyName] -\n *          Only include Workers with `friendly_name` values that match this parameter\n * @param {string} [opts.taskChannel] -\n *          Only calculate statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkersStatisticsInstance\n */\n/* jshint ignore:end */\nWorkersStatisticsContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Minutes': _.get(opts, 'minutes'),\n    'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n    'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n    'TaskQueueSid': _.get(opts, 'taskQueueSid'),\n    'TaskQueueName': _.get(opts, 'taskQueueName'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'TaskChannel': _.get(opts, 'taskChannel')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkersStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkersStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkersStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkersStatisticsList: WorkersStatisticsList,\n  WorkersStatisticsPage: WorkersStatisticsPage,\n  WorkersStatisticsInstance: WorkersStatisticsInstance,\n  WorkersStatisticsContext: WorkersStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar ReservationList = require('./worker/reservation').ReservationList;\nvar WorkerChannelList = require('./worker/workerChannel').WorkerChannelList;\nvar WorkerStatisticsList = require(\n    './worker/workerStatistics').WorkerStatisticsList;\nvar WorkersCumulativeStatisticsList = require(\n    './worker/workersCumulativeStatistics').WorkersCumulativeStatisticsList;\nvar WorkersRealTimeStatisticsList = require(\n    './worker/workersRealTimeStatistics').WorkersRealTimeStatisticsList;\nvar WorkersStatisticsList = require(\n    './worker/workersStatistics').WorkersStatisticsList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar WorkerList;\nvar WorkerPage;\nvar WorkerInstance;\nvar WorkerContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid - The SID of the Workspace that contains the Worker\n */\n/* jshint ignore:end */\nWorkerList = function WorkerList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function workers\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext}\n   */\n  /* jshint ignore:end */\n  function WorkerListInstance(sid) {\n    return WorkerListInstance.get(sid);\n  }\n\n  WorkerListInstance._version = version;\n  // Path Solution\n  WorkerListInstance._solution = {workspaceSid: workspaceSid};\n  WorkerListInstance._uri = `/Workspaces/${workspaceSid}/Workers`;\n\n  // Components\n  WorkerListInstance._statistics = undefined;\n\n  /* jshint ignore:start */\n  /**\n   * Streams WorkerInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.activityName] -\n   *          The activity_name of the Worker resources to read\n   * @param {string} [opts.activitySid] -\n   *          The activity_sid of the Worker resources to read\n   * @param {string} [opts.available] -\n   *          Whether to return Worker resources that are available or unavailable\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Worker resources to read\n   * @param {string} [opts.targetWorkersExpression] -\n   *          Filter by Workers that would match an expression on a TaskQueue\n   * @param {string} [opts.taskQueueName] -\n   *          The friendly_name of the TaskQueue that the Workers to read are eligible for\n   * @param {string} [opts.taskQueueSid] -\n   *          The SID of the TaskQueue that the Workers to read are eligible for\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WorkerListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WorkerInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.activityName] -\n   *          The activity_name of the Worker resources to read\n   * @param {string} [opts.activitySid] -\n   *          The activity_sid of the Worker resources to read\n   * @param {string} [opts.available] -\n   *          Whether to return Worker resources that are available or unavailable\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Worker resources to read\n   * @param {string} [opts.targetWorkersExpression] -\n   *          Filter by Workers that would match an expression on a TaskQueue\n   * @param {string} [opts.taskQueueName] -\n   *          The friendly_name of the TaskQueue that the Workers to read are eligible for\n   * @param {string} [opts.taskQueueSid] -\n   *          The SID of the TaskQueue that the Workers to read are eligible for\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkerListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WorkerInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.activityName] -\n   *          The activity_name of the Worker resources to read\n   * @param {string} [opts.activitySid] -\n   *          The activity_sid of the Worker resources to read\n   * @param {string} [opts.available] -\n   *          Whether to return Worker resources that are available or unavailable\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Worker resources to read\n   * @param {string} [opts.targetWorkersExpression] -\n   *          Filter by Workers that would match an expression on a TaskQueue\n   * @param {string} [opts.taskQueueName] -\n   *          The friendly_name of the TaskQueue that the Workers to read are eligible for\n   * @param {string} [opts.taskQueueSid] -\n   *          The SID of the TaskQueue that the Workers to read are eligible for\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkerListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ActivityName': _.get(opts, 'activityName'),\n      'ActivitySid': _.get(opts, 'activitySid'),\n      'Available': _.get(opts, 'available'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'TargetWorkersExpression': _.get(opts, 'targetWorkersExpression'),\n      'TaskQueueName': _.get(opts, 'taskQueueName'),\n      'TaskQueueSid': _.get(opts, 'taskQueueSid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkerPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WorkerInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkerListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkerPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a WorkerInstance\n   *\n   * @function create\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the resource\n   * @param {string} [opts.activitySid] -\n   *          The SID of a valid Activity that describes the new Worker's initial state\n   * @param {string} [opts.attributes] -\n   *          A valid JSON string that describes the new Worker\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WorkerInstance\n   */\n  /* jshint ignore:end */\n  WorkerListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'ActivitySid': _.get(opts, 'activitySid'),\n      'Attributes': _.get(opts, 'attributes')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkerInstance(\n        this._version,\n        payload,\n        this._solution.workspaceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a worker\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerList#\n   *\n   * @param {string} sid - The SID of the resource to fetch\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext}\n   */\n  /* jshint ignore:end */\n  WorkerListInstance.get = function get(sid) {\n    return new WorkerContext(this._version, this._solution.workspaceSid, sid);\n  };\n\n  Object.defineProperty(WorkerListInstance,\n    'statistics', {\n      get: function statistics() {\n        if (!this._statistics) {\n          this._statistics = new WorkersStatisticsList(this._version, this._solution.workspaceSid);\n        }\n\n        return this._statistics;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkerListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkerListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkerListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkerSolution} solution - Path solution\n *\n * @returns WorkerPage\n */\n/* jshint ignore:end */\nWorkerPage = function WorkerPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkerPage.prototype, Page.prototype);\nWorkerPage.prototype.constructor = WorkerPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkerInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerPage#\n *\n * @param {WorkerPayload} payload - Payload response from the API\n *\n * @returns WorkerInstance\n */\n/* jshint ignore:end */\nWorkerPage.prototype.getInstance = function getInstance(payload) {\n  return new WorkerInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkerPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkerPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} activityName -\n *          The friendly_name of the Worker's current Activity\n * @property {string} activitySid - The SID of the Worker's current Activity\n * @property {string} attributes - The JSON string that describes the Worker\n * @property {boolean} available - Whether the Worker is available to perform tasks\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateStatusChanged -\n *          The date and time in GMT of the last change to the Worker's activity\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Worker\n * @property {string} url - The absolute URL of the Worker resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {WorkerPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Worker\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nWorkerInstance = function WorkerInstance(version, payload, workspaceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.activityName = payload.activity_name; // jshint ignore:line\n  this.activitySid = payload.activity_sid; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.available = payload.available; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateStatusChanged = deserialize.iso8601DateTime(payload.date_status_changed); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(WorkerInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkerContext(this._version, this._solution.workspaceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkerInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerInstance\n */\n/* jshint ignore:end */\nWorkerInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WorkerInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.activitySid] -\n *          The SID of the Activity that describes the Worker's initial state\n * @param {string} [opts.attributes] - The JSON string that describes the Worker\n * @param {string} [opts.friendlyName] - A string to describe the Worker\n * @param {boolean} [opts.rejectPendingReservations] -\n *          Whether to reject the Worker's pending reservations\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerInstance\n */\n/* jshint ignore:end */\nWorkerInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WorkerInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerInstance\n */\n/* jshint ignore:end */\nWorkerInstance.prototype.remove = function remove(opts, callback) {\n  return this._proxy.remove(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the realTimeStatistics\n *\n * @function realTimeStatistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsList}\n */\n/* jshint ignore:end */\nWorkerInstance.prototype.realTimeStatistics = function realTimeStatistics() {\n  return this._proxy.realTimeStatistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the cumulativeStatistics\n *\n * @function cumulativeStatistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsList}\n */\n/* jshint ignore:end */\nWorkerInstance.prototype.cumulativeStatistics = function cumulativeStatistics()\n    {\n  return this._proxy.cumulativeStatistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the statistics\n *\n * @function statistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsList}\n */\n/* jshint ignore:end */\nWorkerInstance.prototype.statistics = function statistics() {\n  return this._proxy.statistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the reservations\n *\n * @function reservations\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationList}\n */\n/* jshint ignore:end */\nWorkerInstance.prototype.reservations = function reservations() {\n  return this._proxy.reservations;\n};\n\n/* jshint ignore:start */\n/**\n * Access the workerChannels\n *\n * @function workerChannels\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelList}\n */\n/* jshint ignore:end */\nWorkerInstance.prototype.workerChannels = function workerChannels() {\n  return this._proxy.workerChannels;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkerInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkerInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkerContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext\n *\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersRealTimeStatisticsList} realTimeStatistics -\n *          realTimeStatistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkersCumulativeStatisticsList} cumulativeStatistics -\n *          cumulativeStatistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerStatisticsList} statistics -\n *          statistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.ReservationList} reservations -\n *          reservations resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext.WorkerChannelList} workerChannels -\n *          workerChannels resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the Worker to fetch\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nWorkerContext = function WorkerContext(version, workspaceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workers/${sid}`;\n\n  // Dependents\n  this._realTimeStatistics = undefined;\n  this._cumulativeStatistics = undefined;\n  this._statistics = undefined;\n  this._reservations = undefined;\n  this._workerChannels = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkerInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerInstance\n */\n/* jshint ignore:end */\nWorkerContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkerInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WorkerInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.activitySid] -\n *          The SID of the Activity that describes the Worker's initial state\n * @param {string} [opts.attributes] - The JSON string that describes the Worker\n * @param {string} [opts.friendlyName] - A string to describe the Worker\n * @param {boolean} [opts.rejectPendingReservations] -\n *          Whether to reject the Worker's pending reservations\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerInstance\n */\n/* jshint ignore:end */\nWorkerContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'ActivitySid': _.get(opts, 'activitySid'),\n    'Attributes': _.get(opts, 'attributes'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'RejectPendingReservations': serialize.bool(_.get(opts, 'rejectPendingReservations'))\n  });\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data, headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkerInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WorkerInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.ifMatch] - The If-Match HTTP request header\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkerInstance\n */\n/* jshint ignore:end */\nWorkerContext.prototype.remove = function remove(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var headers = values.of({'If-Match': _.get(opts, 'ifMatch')});\n\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE', headers: headers});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(WorkerContext.prototype,\n  'realTimeStatistics', {\n    get: function() {\n      if (!this._realTimeStatistics) {\n        this._realTimeStatistics = new WorkersRealTimeStatisticsList(\n          this._version,\n          this._solution.workspaceSid\n        );\n      }\n      return this._realTimeStatistics;\n    }\n});\n\nObject.defineProperty(WorkerContext.prototype,\n  'cumulativeStatistics', {\n    get: function() {\n      if (!this._cumulativeStatistics) {\n        this._cumulativeStatistics = new WorkersCumulativeStatisticsList(\n          this._version,\n          this._solution.workspaceSid\n        );\n      }\n      return this._cumulativeStatistics;\n    }\n});\n\nObject.defineProperty(WorkerContext.prototype,\n  'statistics', {\n    get: function() {\n      if (!this._statistics) {\n        this._statistics = new WorkerStatisticsList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._statistics;\n    }\n});\n\nObject.defineProperty(WorkerContext.prototype,\n  'reservations', {\n    get: function() {\n      if (!this._reservations) {\n        this._reservations = new ReservationList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._reservations;\n    }\n});\n\nObject.defineProperty(WorkerContext.prototype,\n  'workerChannels', {\n    get: function() {\n      if (!this._workerChannels) {\n        this._workerChannels = new WorkerChannelList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._workerChannels;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkerContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkerContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkerContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkerList: WorkerList,\n  WorkerPage: WorkerPage,\n  WorkerInstance: WorkerInstance,\n  WorkerContext: WorkerContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WorkflowCumulativeStatisticsList;\nvar WorkflowCumulativeStatisticsPage;\nvar WorkflowCumulativeStatisticsInstance;\nvar WorkflowCumulativeStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowCumulativeStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the Workflow.\n * @param {string} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsList = function\n    WorkflowCumulativeStatisticsList(version, workspaceSid, workflowSid) {\n  /* jshint ignore:start */\n  /**\n   * @function cumulativeStatistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkflowCumulativeStatisticsListInstance(sid) {\n    return WorkflowCumulativeStatisticsListInstance.get(sid);\n  }\n\n  WorkflowCumulativeStatisticsListInstance._version = version;\n  // Path Solution\n  WorkflowCumulativeStatisticsListInstance._solution = {\n    workspaceSid: workspaceSid,\n    workflowSid: workflowSid\n  };\n  /* jshint ignore:start */\n  /**\n   * Constructs a workflow_cumulative_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkflowCumulativeStatisticsListInstance.get = function get() {\n    return new WorkflowCumulativeStatisticsContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.workflowSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkflowCumulativeStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkflowCumulativeStatisticsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkflowCumulativeStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowCumulativeStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkflowCumulativeStatisticsSolution} solution - Path solution\n *\n * @returns WorkflowCumulativeStatisticsPage\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsPage = function\n    WorkflowCumulativeStatisticsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkflowCumulativeStatisticsPage.prototype, Page.prototype);\nWorkflowCumulativeStatisticsPage.prototype.constructor = WorkflowCumulativeStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkflowCumulativeStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsPage#\n *\n * @param {WorkflowCumulativeStatisticsPayload} payload -\n *          Payload response from the API\n *\n * @returns WorkflowCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new WorkflowCumulativeStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.workflowSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkflowCumulativeStatisticsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowCumulativeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {number} avgTaskAcceptanceTime -\n *          The average time in seconds between Task creation and acceptance\n * @property {Date} startTime -\n *          The beginning of the interval during which these statistics were calculated\n * @property {Date} endTime -\n *          The end of the interval during which these statistics were calculated\n * @property {number} reservationsCreated -\n *          The total number of Reservations that were created for Workers\n * @property {number} reservationsAccepted -\n *          The total number of Reservations accepted by Workers\n * @property {number} reservationsRejected -\n *          The total number of Reservations that were rejected\n * @property {number} reservationsTimedOut -\n *          The total number of Reservations that were timed out\n * @property {number} reservationsCanceled -\n *          The total number of Reservations that were canceled\n * @property {number} reservationsRescinded -\n *          The total number of Reservations that were rescinded\n * @property {object} splitByWaitTime -\n *          A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds\n * @property {object} waitDurationUntilAccepted -\n *          The wait duration statistics for Tasks that were accepted\n * @property {object} waitDurationUntilCanceled -\n *          The wait duration statistics for Tasks that were canceled\n * @property {number} tasksCanceled - The total number of Tasks that were canceled\n * @property {number} tasksCompleted -\n *          The total number of Tasks that were completed\n * @property {number} tasksEntered -\n *          The total number of Tasks that entered the Workflow\n * @property {number} tasksDeleted - The total number of Tasks that were deleted\n * @property {number} tasksMoved -\n *          The total number of Tasks that were moved from one queue to another\n * @property {number} tasksTimedOutInWorkflow -\n *          The total number of Tasks that were timed out of their Workflows\n * @property {string} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Workflow.\n * @property {string} url - The absolute URL of the Workflow statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkflowCumulativeStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Workflow.\n * @param {sid} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsInstance = function\n    WorkflowCumulativeStatisticsInstance(version, payload, workspaceSid,\n    workflowSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.avgTaskAcceptanceTime = deserialize.integer(payload.avg_task_acceptance_time); // jshint ignore:line\n  this.startTime = deserialize.iso8601DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.reservationsCreated = deserialize.integer(payload.reservations_created); // jshint ignore:line\n  this.reservationsAccepted = deserialize.integer(payload.reservations_accepted); // jshint ignore:line\n  this.reservationsRejected = deserialize.integer(payload.reservations_rejected); // jshint ignore:line\n  this.reservationsTimedOut = deserialize.integer(payload.reservations_timed_out); // jshint ignore:line\n  this.reservationsCanceled = deserialize.integer(payload.reservations_canceled); // jshint ignore:line\n  this.reservationsRescinded = deserialize.integer(payload.reservations_rescinded); // jshint ignore:line\n  this.splitByWaitTime = payload.split_by_wait_time; // jshint ignore:line\n  this.waitDurationUntilAccepted = payload.wait_duration_until_accepted; // jshint ignore:line\n  this.waitDurationUntilCanceled = payload.wait_duration_until_canceled; // jshint ignore:line\n  this.tasksCanceled = deserialize.integer(payload.tasks_canceled); // jshint ignore:line\n  this.tasksCompleted = deserialize.integer(payload.tasks_completed); // jshint ignore:line\n  this.tasksEntered = deserialize.integer(payload.tasks_entered); // jshint ignore:line\n  this.tasksDeleted = deserialize.integer(payload.tasks_deleted); // jshint ignore:line\n  this.tasksMoved = deserialize.integer(payload.tasks_moved); // jshint ignore:line\n  this.tasksTimedOutInWorkflow = deserialize.integer(payload.tasks_timed_out_in_workflow); // jshint ignore:line\n  this.workflowSid = payload.workflow_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, workflowSid: workflowSid, };\n};\n\nObject.defineProperty(WorkflowCumulativeStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkflowCumulativeStatisticsContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.workflowSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkflowCumulativeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only include usage that occurred on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate cumulative statistics on this TaskChannel\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsInstance.prototype.fetch = function fetch(opts,\n    callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkflowCumulativeStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowCumulativeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the resource to fetch\n * @param {sid} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsContext = function\n    WorkflowCumulativeStatisticsContext(version, workspaceSid, workflowSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, workflowSid: workflowSid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workflows/${workflowSid}/CumulativeStatistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkflowCumulativeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only include usage that occurred on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate cumulative statistics on this TaskChannel\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsContext.prototype.fetch = function fetch(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n    'Minutes': _.get(opts, 'minutes'),\n    'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n    'TaskChannel': _.get(opts, 'taskChannel'),\n    'SplitByWaitTime': _.get(opts, 'splitByWaitTime')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkflowCumulativeStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.workflowSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowCumulativeStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkflowCumulativeStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkflowCumulativeStatisticsList: WorkflowCumulativeStatisticsList,\n  WorkflowCumulativeStatisticsPage: WorkflowCumulativeStatisticsPage,\n  WorkflowCumulativeStatisticsInstance: WorkflowCumulativeStatisticsInstance,\n  WorkflowCumulativeStatisticsContext: WorkflowCumulativeStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WorkflowRealTimeStatisticsList;\nvar WorkflowRealTimeStatisticsPage;\nvar WorkflowRealTimeStatisticsInstance;\nvar WorkflowRealTimeStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowRealTimeStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the Workflow.\n * @param {string} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified SID value\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsList = function\n    WorkflowRealTimeStatisticsList(version, workspaceSid, workflowSid) {\n  /* jshint ignore:start */\n  /**\n   * @function realTimeStatistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkflowRealTimeStatisticsListInstance(sid) {\n    return WorkflowRealTimeStatisticsListInstance.get(sid);\n  }\n\n  WorkflowRealTimeStatisticsListInstance._version = version;\n  // Path Solution\n  WorkflowRealTimeStatisticsListInstance._solution = {\n    workspaceSid: workspaceSid,\n    workflowSid: workflowSid\n  };\n  /* jshint ignore:start */\n  /**\n   * Constructs a workflow_real_time_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkflowRealTimeStatisticsListInstance.get = function get() {\n    return new WorkflowRealTimeStatisticsContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.workflowSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkflowRealTimeStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkflowRealTimeStatisticsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkflowRealTimeStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowRealTimeStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkflowRealTimeStatisticsSolution} solution - Path solution\n *\n * @returns WorkflowRealTimeStatisticsPage\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsPage = function\n    WorkflowRealTimeStatisticsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkflowRealTimeStatisticsPage.prototype, Page.prototype);\nWorkflowRealTimeStatisticsPage.prototype.constructor = WorkflowRealTimeStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkflowRealTimeStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsPage#\n *\n * @param {WorkflowRealTimeStatisticsPayload} payload -\n *          Payload response from the API\n *\n * @returns WorkflowRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new WorkflowRealTimeStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.workflowSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkflowRealTimeStatisticsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowRealTimeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {number} longestTaskWaitingAge - The age of the longest waiting Task\n * @property {string} longestTaskWaitingSid - The SID of the longest waiting Task\n * @property {object} tasksByPriority - The number of Tasks by priority\n * @property {object} tasksByStatus - The number of Tasks by their current status\n * @property {number} totalTasks - The total number of Tasks\n * @property {string} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified SID value\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Workflow.\n * @property {string} url - The absolute URL of the Workflow statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkflowRealTimeStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Workflow.\n * @param {sid} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified SID value\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsInstance = function\n    WorkflowRealTimeStatisticsInstance(version, payload, workspaceSid,\n    workflowSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.longestTaskWaitingAge = deserialize.integer(payload.longest_task_waiting_age); // jshint ignore:line\n  this.longestTaskWaitingSid = payload.longest_task_waiting_sid; // jshint ignore:line\n  this.tasksByPriority = payload.tasks_by_priority; // jshint ignore:line\n  this.tasksByStatus = payload.tasks_by_status; // jshint ignore:line\n  this.totalTasks = deserialize.integer(payload.total_tasks); // jshint ignore:line\n  this.workflowSid = payload.workflow_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, workflowSid: workflowSid, };\n};\n\nObject.defineProperty(WorkflowRealTimeStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkflowRealTimeStatisticsContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.workflowSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkflowRealTimeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsInstance.prototype.fetch = function fetch(opts,\n    callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkflowRealTimeStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowRealTimeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the Workflow to fetch\n * @param {sid} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified SID value\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsContext = function\n    WorkflowRealTimeStatisticsContext(version, workspaceSid, workflowSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, workflowSid: workflowSid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workflows/${workflowSid}/RealTimeStatistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkflowRealTimeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsContext.prototype.fetch = function fetch(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'TaskChannel': _.get(opts, 'taskChannel')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkflowRealTimeStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.workflowSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowRealTimeStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkflowRealTimeStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkflowRealTimeStatisticsList: WorkflowRealTimeStatisticsList,\n  WorkflowRealTimeStatisticsPage: WorkflowRealTimeStatisticsPage,\n  WorkflowRealTimeStatisticsInstance: WorkflowRealTimeStatisticsInstance,\n  WorkflowRealTimeStatisticsContext: WorkflowRealTimeStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar WorkflowStatisticsList;\nvar WorkflowStatisticsPage;\nvar WorkflowStatisticsInstance;\nvar WorkflowStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the Workflow\n * @param {string} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified SID value\n */\n/* jshint ignore:end */\nWorkflowStatisticsList = function WorkflowStatisticsList(version, workspaceSid,\n                                                          workflowSid) {\n  /* jshint ignore:start */\n  /**\n   * @function statistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkflowStatisticsListInstance(sid) {\n    return WorkflowStatisticsListInstance.get(sid);\n  }\n\n  WorkflowStatisticsListInstance._version = version;\n  // Path Solution\n  WorkflowStatisticsListInstance._solution = {workspaceSid: workspaceSid, workflowSid: workflowSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a workflow_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkflowStatisticsListInstance.get = function get() {\n    return new WorkflowStatisticsContext(\n      this._version,\n      this._solution.workspaceSid,\n      this._solution.workflowSid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkflowStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkflowStatisticsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkflowStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkflowStatisticsSolution} solution - Path solution\n *\n * @returns WorkflowStatisticsPage\n */\n/* jshint ignore:end */\nWorkflowStatisticsPage = function WorkflowStatisticsPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkflowStatisticsPage.prototype, Page.prototype);\nWorkflowStatisticsPage.prototype.constructor = WorkflowStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkflowStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsPage#\n *\n * @param {WorkflowStatisticsPayload} payload - Payload response from the API\n *\n * @returns WorkflowStatisticsInstance\n */\n/* jshint ignore:end */\nWorkflowStatisticsPage.prototype.getInstance = function getInstance(payload) {\n  return new WorkflowStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid,\n    this._solution.workflowSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkflowStatisticsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} cumulative -\n *          An object that contains the cumulative statistics for the Workflow\n * @property {object} realtime -\n *          An object that contains the real-time statistics for the Workflow\n * @property {string} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified SID value\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Workflow\n * @property {string} url - The absolute URL of the Workflow statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkflowStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Workflow\n * @param {sid} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified SID value\n */\n/* jshint ignore:end */\nWorkflowStatisticsInstance = function WorkflowStatisticsInstance(version,\n    payload, workspaceSid, workflowSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.cumulative = payload.cumulative; // jshint ignore:line\n  this.realtime = payload.realtime; // jshint ignore:line\n  this.workflowSid = payload.workflow_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, workflowSid: workflowSid, };\n};\n\nObject.defineProperty(WorkflowStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkflowStatisticsContext(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.workflowSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkflowStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from this date and time and earlier\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time statistics on this TaskChannel.\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowStatisticsInstance\n */\n/* jshint ignore:end */\nWorkflowStatisticsInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkflowStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the Workflow to fetch\n * @param {sid} workflowSid -\n *          Returns the list of Tasks that are being controlled by the Workflow with the specified SID value\n */\n/* jshint ignore:end */\nWorkflowStatisticsContext = function WorkflowStatisticsContext(version,\n    workspaceSid, workflowSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, workflowSid: workflowSid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workflows/${workflowSid}/Statistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkflowStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from this date and time and earlier\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time statistics on this TaskChannel.\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowStatisticsInstance\n */\n/* jshint ignore:end */\nWorkflowStatisticsContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Minutes': _.get(opts, 'minutes'),\n    'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n    'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n    'TaskChannel': _.get(opts, 'taskChannel'),\n    'SplitByWaitTime': _.get(opts, 'splitByWaitTime')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkflowStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.workflowSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkflowStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkflowStatisticsList: WorkflowStatisticsList,\n  WorkflowStatisticsPage: WorkflowStatisticsPage,\n  WorkflowStatisticsInstance: WorkflowStatisticsInstance,\n  WorkflowStatisticsContext: WorkflowStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar WorkflowCumulativeStatisticsList = require(\n    './workflow/workflowCumulativeStatistics').WorkflowCumulativeStatisticsList;\nvar WorkflowRealTimeStatisticsList = require(\n    './workflow/workflowRealTimeStatistics').WorkflowRealTimeStatisticsList;\nvar WorkflowStatisticsList = require(\n    './workflow/workflowStatistics').WorkflowStatisticsList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar WorkflowList;\nvar WorkflowPage;\nvar WorkflowInstance;\nvar WorkflowContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid -\n *          The SID of the Workspace that contains the Workflow\n */\n/* jshint ignore:end */\nWorkflowList = function WorkflowList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function workflows\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext}\n   */\n  /* jshint ignore:end */\n  function WorkflowListInstance(sid) {\n    return WorkflowListInstance.get(sid);\n  }\n\n  WorkflowListInstance._version = version;\n  // Path Solution\n  WorkflowListInstance._solution = {workspaceSid: workspaceSid};\n  WorkflowListInstance._uri = `/Workspaces/${workspaceSid}/Workflows`;\n  /* jshint ignore:start */\n  /**\n   * Streams WorkflowInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Workflow resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WorkflowListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WorkflowInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Workflow resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkflowListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WorkflowInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Workflow resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkflowListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkflowPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WorkflowInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkflowListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkflowPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a WorkflowInstance\n   *\n   * @function create\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *         descriptive string that you create to describe the Workflow resource\n   * @param {string} opts.configuration -\n   *          A JSON string that contains the rules to apply to the Workflow\n   * @param {string} [opts.assignmentCallbackUrl] -\n   *          The URL from your application that will process task assignment events\n   * @param {string} [opts.fallbackAssignmentCallbackUrl] -\n   *          The URL that we should call when a call to the `assignment_callback_url` fails\n   * @param {number} [opts.taskReservationTimeout] -\n   *          How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WorkflowInstance\n   */\n  /* jshint ignore:end */\n  WorkflowListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['configuration'])) {\n      throw new Error('Required parameter \"opts[\\'configuration\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Configuration': _.get(opts, 'configuration'),\n      'AssignmentCallbackUrl': _.get(opts, 'assignmentCallbackUrl'),\n      'FallbackAssignmentCallbackUrl': _.get(opts, 'fallbackAssignmentCallbackUrl'),\n      'TaskReservationTimeout': _.get(opts, 'taskReservationTimeout')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkflowInstance(\n        this._version,\n        payload,\n        this._solution.workspaceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a workflow\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList#\n   *\n   * @param {string} sid - The SID of the resource\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext}\n   */\n  /* jshint ignore:end */\n  WorkflowListInstance.get = function get(sid) {\n    return new WorkflowContext(this._version, this._solution.workspaceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkflowListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkflowListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkflowListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkflowSolution} solution - Path solution\n *\n * @returns WorkflowPage\n */\n/* jshint ignore:end */\nWorkflowPage = function WorkflowPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkflowPage.prototype, Page.prototype);\nWorkflowPage.prototype.constructor = WorkflowPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkflowInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowPage#\n *\n * @param {WorkflowPayload} payload - Payload response from the API\n *\n * @returns WorkflowInstance\n */\n/* jshint ignore:end */\nWorkflowPage.prototype.getInstance = function getInstance(payload) {\n  return new WorkflowInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkflowPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} assignmentCallbackUrl -\n *          The URL that we call when a task managed by the Workflow is assigned to a Worker\n * @property {string} configuration -\n *          A JSON string that contains the Workflow's configuration\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} documentContentType - The MIME type of the document\n * @property {string} fallbackAssignmentCallbackUrl -\n *          The URL that we call when a call to the `assignment_callback_url` fails\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Workflow resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {number} taskReservationTimeout -\n *          How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker\n * @property {string} workspaceSid -\n *          The SID of the Workspace that contains the Workflow\n * @property {string} url - The absolute URL of the Workflow resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {WorkflowPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace that contains the Workflow\n * @param {sid} sid - The SID of the resource\n */\n/* jshint ignore:end */\nWorkflowInstance = function WorkflowInstance(version, payload, workspaceSid,\n                                              sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.assignmentCallbackUrl = payload.assignment_callback_url; // jshint ignore:line\n  this.configuration = payload.configuration; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.documentContentType = payload.document_content_type; // jshint ignore:line\n  this.fallbackAssignmentCallbackUrl = payload.fallback_assignment_callback_url; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.taskReservationTimeout = deserialize.integer(payload.task_reservation_timeout); // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(WorkflowInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkflowContext(this._version, this._solution.workspaceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkflowInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowInstance\n */\n/* jshint ignore:end */\nWorkflowInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WorkflowInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *         descriptive string that you create to describe the Workflow resource\n * @param {string} [opts.assignmentCallbackUrl] -\n *          The URL from your application that will process task assignment events\n * @param {string} [opts.fallbackAssignmentCallbackUrl] -\n *          The URL that we should call when a call to the `assignment_callback_url` fails\n * @param {string} [opts.configuration] -\n *          A JSON string that contains the rules to apply to the Workflow\n * @param {number} [opts.taskReservationTimeout] -\n *          How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker\n * @param {string} [opts.reEvaluateTasks] - Whether or not to re-evaluate Tasks\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowInstance\n */\n/* jshint ignore:end */\nWorkflowInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WorkflowInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowInstance\n */\n/* jshint ignore:end */\nWorkflowInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the statistics\n *\n * @function statistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsList}\n */\n/* jshint ignore:end */\nWorkflowInstance.prototype.statistics = function statistics() {\n  return this._proxy.statistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the realTimeStatistics\n *\n * @function realTimeStatistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsList}\n */\n/* jshint ignore:end */\nWorkflowInstance.prototype.realTimeStatistics = function realTimeStatistics() {\n  return this._proxy.realTimeStatistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the cumulativeStatistics\n *\n * @function cumulativeStatistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsList}\n */\n/* jshint ignore:end */\nWorkflowInstance.prototype.cumulativeStatistics = function\n    cumulativeStatistics() {\n  return this._proxy.cumulativeStatistics;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkflowInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkflowContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext\n *\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowStatisticsList} statistics -\n *          statistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowRealTimeStatisticsList} realTimeStatistics -\n *          realTimeStatistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext.WorkflowCumulativeStatisticsList} cumulativeStatistics -\n *          cumulativeStatistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace with the Workflow to fetch\n * @param {sid} sid - The SID of the resource\n */\n/* jshint ignore:end */\nWorkflowContext = function WorkflowContext(version, workspaceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, sid: sid, };\n  this._uri = `/Workspaces/${workspaceSid}/Workflows/${sid}`;\n\n  // Dependents\n  this._statistics = undefined;\n  this._realTimeStatistics = undefined;\n  this._cumulativeStatistics = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkflowInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowInstance\n */\n/* jshint ignore:end */\nWorkflowContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkflowInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WorkflowInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *         descriptive string that you create to describe the Workflow resource\n * @param {string} [opts.assignmentCallbackUrl] -\n *          The URL from your application that will process task assignment events\n * @param {string} [opts.fallbackAssignmentCallbackUrl] -\n *          The URL that we should call when a call to the `assignment_callback_url` fails\n * @param {string} [opts.configuration] -\n *          A JSON string that contains the rules to apply to the Workflow\n * @param {number} [opts.taskReservationTimeout] -\n *          How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker\n * @param {string} [opts.reEvaluateTasks] - Whether or not to re-evaluate Tasks\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowInstance\n */\n/* jshint ignore:end */\nWorkflowContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'AssignmentCallbackUrl': _.get(opts, 'assignmentCallbackUrl'),\n    'FallbackAssignmentCallbackUrl': _.get(opts, 'fallbackAssignmentCallbackUrl'),\n    'Configuration': _.get(opts, 'configuration'),\n    'TaskReservationTimeout': _.get(opts, 'taskReservationTimeout'),\n    'ReEvaluateTasks': _.get(opts, 'reEvaluateTasks')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkflowInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WorkflowInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkflowInstance\n */\n/* jshint ignore:end */\nWorkflowContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(WorkflowContext.prototype,\n  'statistics', {\n    get: function() {\n      if (!this._statistics) {\n        this._statistics = new WorkflowStatisticsList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._statistics;\n    }\n});\n\nObject.defineProperty(WorkflowContext.prototype,\n  'realTimeStatistics', {\n    get: function() {\n      if (!this._realTimeStatistics) {\n        this._realTimeStatistics = new WorkflowRealTimeStatisticsList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._realTimeStatistics;\n    }\n});\n\nObject.defineProperty(WorkflowContext.prototype,\n  'cumulativeStatistics', {\n    get: function() {\n      if (!this._cumulativeStatistics) {\n        this._cumulativeStatistics = new WorkflowCumulativeStatisticsList(\n          this._version,\n          this._solution.workspaceSid,\n          this._solution.sid\n        );\n      }\n      return this._cumulativeStatistics;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkflowContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkflowContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkflowContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkflowList: WorkflowList,\n  WorkflowPage: WorkflowPage,\n  WorkflowInstance: WorkflowInstance,\n  WorkflowContext: WorkflowContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar WorkspaceCumulativeStatisticsList;\nvar WorkspaceCumulativeStatisticsPage;\nvar WorkspaceCumulativeStatisticsInstance;\nvar WorkspaceCumulativeStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceCumulativeStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid - The SID of the Workspace\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsList = function\n    WorkspaceCumulativeStatisticsList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function cumulativeStatistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkspaceCumulativeStatisticsListInstance(sid) {\n    return WorkspaceCumulativeStatisticsListInstance.get(sid);\n  }\n\n  WorkspaceCumulativeStatisticsListInstance._version = version;\n  // Path Solution\n  WorkspaceCumulativeStatisticsListInstance._solution = {workspaceSid: workspaceSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a workspace_cumulative_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkspaceCumulativeStatisticsListInstance.get = function get() {\n    return new WorkspaceCumulativeStatisticsContext(this._version, this._solution.workspaceSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkspaceCumulativeStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkspaceCumulativeStatisticsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkspaceCumulativeStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceCumulativeStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkspaceCumulativeStatisticsSolution} solution - Path solution\n *\n * @returns WorkspaceCumulativeStatisticsPage\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsPage = function\n    WorkspaceCumulativeStatisticsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkspaceCumulativeStatisticsPage.prototype, Page.prototype);\nWorkspaceCumulativeStatisticsPage.prototype.constructor = WorkspaceCumulativeStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkspaceCumulativeStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsPage#\n *\n * @param {WorkspaceCumulativeStatisticsPayload} payload -\n *          Payload response from the API\n *\n * @returns WorkspaceCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new WorkspaceCumulativeStatisticsInstance(\n    this._version,\n    payload,\n    this._solution.workspaceSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkspaceCumulativeStatisticsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceCumulativeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {number} avgTaskAcceptanceTime -\n *          The average time in seconds between Task creation and acceptance\n * @property {Date} startTime -\n *          The beginning of the interval during which these statistics were calculated\n * @property {Date} endTime -\n *          The end of the interval during which these statistics were calculated\n * @property {number} reservationsCreated -\n *          The total number of Reservations that were created for Workers\n * @property {number} reservationsAccepted -\n *          The total number of Reservations accepted by Workers\n * @property {number} reservationsRejected -\n *          The total number of Reservations that were rejected\n * @property {number} reservationsTimedOut -\n *          The total number of Reservations that were timed out\n * @property {number} reservationsCanceled -\n *          The total number of Reservations that were canceled\n * @property {number} reservationsRescinded -\n *          The total number of Reservations that were rescinded\n * @property {object} splitByWaitTime -\n *          A list of objects that describe the Tasks canceled and reservations accepted above and below the specified thresholds\n * @property {object} waitDurationUntilAccepted -\n *          The wait duration statistics for Tasks that were accepted\n * @property {object} waitDurationUntilCanceled -\n *          The wait duration statistics for Tasks that were canceled\n * @property {number} tasksCanceled - The total number of Tasks that were canceled\n * @property {number} tasksCompleted -\n *          The total number of Tasks that were completed\n * @property {number} tasksCreated - The total number of Tasks created\n * @property {number} tasksDeleted - The total number of Tasks that were deleted\n * @property {number} tasksMoved -\n *          The total number of Tasks that were moved from one queue to another\n * @property {number} tasksTimedOutInWorkflow -\n *          The total number of Tasks that were timed out of their Workflows\n * @property {string} workspaceSid - The SID of the Workspace\n * @property {string} url - The absolute URL of the Workspace statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkspaceCumulativeStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsInstance = function\n    WorkspaceCumulativeStatisticsInstance(version, payload, workspaceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.avgTaskAcceptanceTime = deserialize.integer(payload.avg_task_acceptance_time); // jshint ignore:line\n  this.startTime = deserialize.iso8601DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.reservationsCreated = deserialize.integer(payload.reservations_created); // jshint ignore:line\n  this.reservationsAccepted = deserialize.integer(payload.reservations_accepted); // jshint ignore:line\n  this.reservationsRejected = deserialize.integer(payload.reservations_rejected); // jshint ignore:line\n  this.reservationsTimedOut = deserialize.integer(payload.reservations_timed_out); // jshint ignore:line\n  this.reservationsCanceled = deserialize.integer(payload.reservations_canceled); // jshint ignore:line\n  this.reservationsRescinded = deserialize.integer(payload.reservations_rescinded); // jshint ignore:line\n  this.splitByWaitTime = payload.split_by_wait_time; // jshint ignore:line\n  this.waitDurationUntilAccepted = payload.wait_duration_until_accepted; // jshint ignore:line\n  this.waitDurationUntilCanceled = payload.wait_duration_until_canceled; // jshint ignore:line\n  this.tasksCanceled = deserialize.integer(payload.tasks_canceled); // jshint ignore:line\n  this.tasksCompleted = deserialize.integer(payload.tasks_completed); // jshint ignore:line\n  this.tasksCreated = deserialize.integer(payload.tasks_created); // jshint ignore:line\n  this.tasksDeleted = deserialize.integer(payload.tasks_deleted); // jshint ignore:line\n  this.tasksMoved = deserialize.integer(payload.tasks_moved); // jshint ignore:line\n  this.tasksTimedOutInWorkflow = deserialize.integer(payload.tasks_timed_out_in_workflow); // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, };\n};\n\nObject.defineProperty(WorkspaceCumulativeStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkspaceCumulativeStatisticsContext(\n          this._version,\n          this._solution.workspaceSid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkspaceCumulativeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only include usage that occurred on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate cumulative statistics on this TaskChannel\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsInstance.prototype.fetch = function fetch(opts,\n    callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkspaceCumulativeStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceCumulativeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace to fetch\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsContext = function\n    WorkspaceCumulativeStatisticsContext(version, workspaceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, };\n  this._uri = `/Workspaces/${workspaceSid}/CumulativeStatistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkspaceCumulativeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {Date} [opts.endDate] -\n *          Only include usage that occurred on or before this date\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {string} [opts.taskChannel] -\n *          Only calculate cumulative statistics on this TaskChannel\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceCumulativeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsContext.prototype.fetch = function fetch(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n    'Minutes': _.get(opts, 'minutes'),\n    'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n    'TaskChannel': _.get(opts, 'taskChannel'),\n    'SplitByWaitTime': _.get(opts, 'splitByWaitTime')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkspaceCumulativeStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceCumulativeStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkspaceCumulativeStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkspaceCumulativeStatisticsList: WorkspaceCumulativeStatisticsList,\n  WorkspaceCumulativeStatisticsPage: WorkspaceCumulativeStatisticsPage,\n  WorkspaceCumulativeStatisticsInstance: WorkspaceCumulativeStatisticsInstance,\n  WorkspaceCumulativeStatisticsContext: WorkspaceCumulativeStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar WorkspaceRealTimeStatisticsList;\nvar WorkspaceRealTimeStatisticsPage;\nvar WorkspaceRealTimeStatisticsInstance;\nvar WorkspaceRealTimeStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceRealTimeStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid - The SID of the Workspace\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsList = function\n    WorkspaceRealTimeStatisticsList(version, workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function realTimeStatistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkspaceRealTimeStatisticsListInstance(sid) {\n    return WorkspaceRealTimeStatisticsListInstance.get(sid);\n  }\n\n  WorkspaceRealTimeStatisticsListInstance._version = version;\n  // Path Solution\n  WorkspaceRealTimeStatisticsListInstance._solution = {workspaceSid: workspaceSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a workspace_real_time_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkspaceRealTimeStatisticsListInstance.get = function get() {\n    return new WorkspaceRealTimeStatisticsContext(this._version, this._solution.workspaceSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkspaceRealTimeStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkspaceRealTimeStatisticsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkspaceRealTimeStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceRealTimeStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkspaceRealTimeStatisticsSolution} solution - Path solution\n *\n * @returns WorkspaceRealTimeStatisticsPage\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsPage = function\n    WorkspaceRealTimeStatisticsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkspaceRealTimeStatisticsPage.prototype, Page.prototype);\nWorkspaceRealTimeStatisticsPage.prototype.constructor = WorkspaceRealTimeStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkspaceRealTimeStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsPage#\n *\n * @param {WorkspaceRealTimeStatisticsPayload} payload -\n *          Payload response from the API\n *\n * @returns WorkspaceRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new WorkspaceRealTimeStatisticsInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkspaceRealTimeStatisticsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceRealTimeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} activityStatistics -\n *          The number of current Workers by Activity\n * @property {number} longestTaskWaitingAge - The age of the longest waiting Task\n * @property {string} longestTaskWaitingSid - The SID of the longest waiting Task\n * @property {object} tasksByPriority - The number of Tasks by priority\n * @property {object} tasksByStatus - The number of Tasks by their current status\n * @property {number} totalTasks - The total number of Tasks\n * @property {number} totalWorkers - The total number of Workers in the Workspace\n * @property {string} workspaceSid - The SID of the Workspace\n * @property {string} url - The absolute URL of the Workspace statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkspaceRealTimeStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsInstance = function\n    WorkspaceRealTimeStatisticsInstance(version, payload, workspaceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.activityStatistics = payload.activity_statistics; // jshint ignore:line\n  this.longestTaskWaitingAge = deserialize.integer(payload.longest_task_waiting_age); // jshint ignore:line\n  this.longestTaskWaitingSid = payload.longest_task_waiting_sid; // jshint ignore:line\n  this.tasksByPriority = payload.tasks_by_priority; // jshint ignore:line\n  this.tasksByStatus = payload.tasks_by_status; // jshint ignore:line\n  this.totalTasks = deserialize.integer(payload.total_tasks); // jshint ignore:line\n  this.totalWorkers = deserialize.integer(payload.total_workers); // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, };\n};\n\nObject.defineProperty(WorkspaceRealTimeStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkspaceRealTimeStatisticsContext(this._version, this._solution.workspaceSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkspaceRealTimeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsInstance.prototype.fetch = function fetch(opts,\n    callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkspaceRealTimeStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceRealTimeStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace to fetch\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsContext = function\n    WorkspaceRealTimeStatisticsContext(version, workspaceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, };\n  this._uri = `/Workspaces/${workspaceSid}/RealTimeStatistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkspaceRealTimeStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.taskChannel] -\n *          Only calculate real-time statistics on this TaskChannel\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceRealTimeStatisticsInstance\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsContext.prototype.fetch = function fetch(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'TaskChannel': _.get(opts, 'taskChannel')});\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkspaceRealTimeStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceRealTimeStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkspaceRealTimeStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkspaceRealTimeStatisticsList: WorkspaceRealTimeStatisticsList,\n  WorkspaceRealTimeStatisticsPage: WorkspaceRealTimeStatisticsPage,\n  WorkspaceRealTimeStatisticsInstance: WorkspaceRealTimeStatisticsInstance,\n  WorkspaceRealTimeStatisticsContext: WorkspaceRealTimeStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar WorkspaceStatisticsList;\nvar WorkspaceStatisticsPage;\nvar WorkspaceStatisticsInstance;\nvar WorkspaceStatisticsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceStatisticsList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n * @param {string} workspaceSid - The SID of the Workspace\n */\n/* jshint ignore:end */\nWorkspaceStatisticsList = function WorkspaceStatisticsList(version,\n                                                            workspaceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function statistics\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsContext}\n   */\n  /* jshint ignore:end */\n  function WorkspaceStatisticsListInstance(sid) {\n    return WorkspaceStatisticsListInstance.get(sid);\n  }\n\n  WorkspaceStatisticsListInstance._version = version;\n  // Path Solution\n  WorkspaceStatisticsListInstance._solution = {workspaceSid: workspaceSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a workspace_statistics\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsList#\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsContext}\n   */\n  /* jshint ignore:end */\n  WorkspaceStatisticsListInstance.get = function get() {\n    return new WorkspaceStatisticsContext(this._version, this._solution.workspaceSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkspaceStatisticsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkspaceStatisticsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkspaceStatisticsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceStatisticsPage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkspaceStatisticsSolution} solution - Path solution\n *\n * @returns WorkspaceStatisticsPage\n */\n/* jshint ignore:end */\nWorkspaceStatisticsPage = function WorkspaceStatisticsPage(version, response,\n                                                            solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkspaceStatisticsPage.prototype, Page.prototype);\nWorkspaceStatisticsPage.prototype.constructor = WorkspaceStatisticsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkspaceStatisticsInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsPage#\n *\n * @param {WorkspaceStatisticsPayload} payload - Payload response from the API\n *\n * @returns WorkspaceStatisticsInstance\n */\n/* jshint ignore:end */\nWorkspaceStatisticsPage.prototype.getInstance = function getInstance(payload) {\n  return new WorkspaceStatisticsInstance(this._version, payload, this._solution.workspaceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceStatisticsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkspaceStatisticsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsInstance\n *\n * @property {object} realtime -\n *          n object that contains the real-time statistics for the Workspace\n * @property {object} cumulative -\n *          An object that contains the cumulative statistics for the Workspace\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} workspaceSid - The SID of the Workspace\n * @property {string} url - The absolute URL of the Workspace statistics resource\n *\n * @param {V1} version - Version of the resource\n * @param {WorkspaceStatisticsPayload} payload - The instance payload\n * @param {sid} workspaceSid - The SID of the Workspace\n */\n/* jshint ignore:end */\nWorkspaceStatisticsInstance = function WorkspaceStatisticsInstance(version,\n    payload, workspaceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.realtime = payload.realtime; // jshint ignore:line\n  this.cumulative = payload.cumulative; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.workspaceSid = payload.workspace_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {workspaceSid: workspaceSid, };\n};\n\nObject.defineProperty(WorkspaceStatisticsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkspaceStatisticsContext(this._version, this._solution.workspaceSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkspaceStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from this date and time and earlier\n * @param {string} [opts.taskChannel] -\n *          Only calculate statistics on this TaskChannel.\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceStatisticsInstance\n */\n/* jshint ignore:end */\nWorkspaceStatisticsInstance.prototype.fetch = function fetch(opts, callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceStatisticsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkspaceStatisticsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceStatisticsContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} workspaceSid - The SID of the Workspace to fetch\n */\n/* jshint ignore:end */\nWorkspaceStatisticsContext = function WorkspaceStatisticsContext(version,\n    workspaceSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {workspaceSid: workspaceSid, };\n  this._uri = `/Workspaces/${workspaceSid}/Statistics`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkspaceStatisticsInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.minutes] -\n *          Only calculate statistics since this many minutes in the past\n * @param {Date} [opts.startDate] -\n *          Only calculate statistics from on or after this date\n * @param {Date} [opts.endDate] -\n *          Only calculate statistics from this date and time and earlier\n * @param {string} [opts.taskChannel] -\n *          Only calculate statistics on this TaskChannel.\n * @param {string} [opts.splitByWaitTime] -\n *          A comma separated list of values that describes the thresholds to calculate statistics on\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceStatisticsInstance\n */\n/* jshint ignore:end */\nWorkspaceStatisticsContext.prototype.fetch = function fetch(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Minutes': _.get(opts, 'minutes'),\n    'StartDate': serialize.iso8601DateTime(_.get(opts, 'startDate')),\n    'EndDate': serialize.iso8601DateTime(_.get(opts, 'endDate')),\n    'TaskChannel': _.get(opts, 'taskChannel'),\n    'SplitByWaitTime': _.get(opts, 'splitByWaitTime')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkspaceStatisticsInstance(\n      this._version,\n      payload,\n      this._solution.workspaceSid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceStatisticsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkspaceStatisticsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkspaceStatisticsList: WorkspaceStatisticsList,\n  WorkspaceStatisticsPage: WorkspaceStatisticsPage,\n  WorkspaceStatisticsInstance: WorkspaceStatisticsInstance,\n  WorkspaceStatisticsContext: WorkspaceStatisticsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ActivityList = require('./workspace/activity').ActivityList;\nvar EventList = require('./workspace/event').EventList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar TaskChannelList = require('./workspace/taskChannel').TaskChannelList;\nvar TaskList = require('./workspace/task').TaskList;\nvar TaskQueueList = require('./workspace/taskQueue').TaskQueueList;\nvar WorkerList = require('./workspace/worker').WorkerList;\nvar WorkflowList = require('./workspace/workflow').WorkflowList;\nvar WorkspaceCumulativeStatisticsList = require(\n    './workspace/workspaceCumulativeStatistics').WorkspaceCumulativeStatisticsList;\nvar WorkspaceRealTimeStatisticsList = require(\n    './workspace/workspaceRealTimeStatistics').WorkspaceRealTimeStatisticsList;\nvar WorkspaceStatisticsList = require(\n    './workspace/workspaceStatistics').WorkspaceStatisticsList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar WorkspaceList;\nvar WorkspacePage;\nvar WorkspaceInstance;\nvar WorkspaceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceList\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceList\n *\n * @param {Twilio.Taskrouter.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nWorkspaceList = function WorkspaceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function workspaces\n   * @memberof Twilio.Taskrouter.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext}\n   */\n  /* jshint ignore:end */\n  function WorkspaceListInstance(sid) {\n    return WorkspaceListInstance.get(sid);\n  }\n\n  WorkspaceListInstance._version = version;\n  // Path Solution\n  WorkspaceListInstance._solution = {};\n  WorkspaceListInstance._uri = `/Workspaces`;\n  /* jshint ignore:start */\n  /**\n   * Streams WorkspaceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Taskrouter.V1.WorkspaceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Workspace resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WorkspaceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WorkspaceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Taskrouter.V1.WorkspaceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Workspace resources to read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkspaceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WorkspaceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Taskrouter.V1.WorkspaceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] -\n   *          The friendly_name of the Workspace resources to read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkspaceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkspacePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WorkspaceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Taskrouter.V1.WorkspaceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WorkspaceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkspacePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a WorkspaceInstance\n   *\n   * @function create\n   * @memberof Twilio.Taskrouter.V1.WorkspaceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A string to describe the Workspace resource\n   * @param {string} [opts.eventCallbackUrl] -\n   *          The URL we should call when an event occurs\n   * @param {string} [opts.eventsFilter] -\n   *          The list of Workspace events for which to call event_callback_url\n   * @param {boolean} [opts.multiTaskEnabled] - Whether multi-tasking is enabled\n   * @param {string} [opts.template] - An available template name\n   * @param {workspace.queue_order} [opts.prioritizeQueueOrder] -\n   *          The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WorkspaceInstance\n   */\n  /* jshint ignore:end */\n  WorkspaceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'EventCallbackUrl': _.get(opts, 'eventCallbackUrl'),\n      'EventsFilter': _.get(opts, 'eventsFilter'),\n      'MultiTaskEnabled': serialize.bool(_.get(opts, 'multiTaskEnabled')),\n      'Template': _.get(opts, 'template'),\n      'PrioritizeQueueOrder': _.get(opts, 'prioritizeQueueOrder')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WorkspaceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a workspace\n   *\n   * @function get\n   * @memberof Twilio.Taskrouter.V1.WorkspaceList#\n   *\n   * @param {string} sid - The SID of the resource to fetch\n   *\n   * @returns {Twilio.Taskrouter.V1.WorkspaceContext}\n   */\n  /* jshint ignore:end */\n  WorkspaceListInstance.get = function get(sid) {\n    return new WorkspaceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Taskrouter.V1.WorkspaceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WorkspaceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WorkspaceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WorkspaceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspacePage\n *\n * @constructor Twilio.Taskrouter.V1.WorkspacePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WorkspaceSolution} solution - Path solution\n *\n * @returns WorkspacePage\n */\n/* jshint ignore:end */\nWorkspacePage = function WorkspacePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WorkspacePage.prototype, Page.prototype);\nWorkspacePage.prototype.constructor = WorkspacePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WorkspaceInstance\n *\n * @function getInstance\n * @memberof Twilio.Taskrouter.V1.WorkspacePage#\n *\n * @param {WorkspacePayload} payload - Payload response from the API\n *\n * @returns WorkspaceInstance\n */\n/* jshint ignore:end */\nWorkspacePage.prototype.getInstance = function getInstance(payload) {\n  return new WorkspaceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspacePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspacePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkspacePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} defaultActivityName - The name of the default activity\n * @property {string} defaultActivitySid -\n *          The SID of the Activity that will be used when new Workers are created in the Workspace\n * @property {string} eventCallbackUrl - The URL we call when an event occurs\n * @property {string} eventsFilter -\n *          The list of Workspace events for which to call event_callback_url\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Workspace resource\n * @property {boolean} multiTaskEnabled - Whether multi-tasking is enabled\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} timeoutActivityName - The name of the timeout activity\n * @property {string} timeoutActivitySid -\n *          The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response\n * @property {workspace.queue_order} prioritizeQueueOrder -\n *          The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues\n * @property {string} url - The absolute URL of the Workspace resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {WorkspacePayload} payload - The instance payload\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nWorkspaceInstance = function WorkspaceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.defaultActivityName = payload.default_activity_name; // jshint ignore:line\n  this.defaultActivitySid = payload.default_activity_sid; // jshint ignore:line\n  this.eventCallbackUrl = payload.event_callback_url; // jshint ignore:line\n  this.eventsFilter = payload.events_filter; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.multiTaskEnabled = payload.multi_task_enabled; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.timeoutActivityName = payload.timeout_activity_name; // jshint ignore:line\n  this.timeoutActivitySid = payload.timeout_activity_sid; // jshint ignore:line\n  this.prioritizeQueueOrder = payload.prioritize_queue_order; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(WorkspaceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WorkspaceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a WorkspaceInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceInstance\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a WorkspaceInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.defaultActivitySid] -\n *          The SID of the Activity that will be used when new Workers are created in the Workspace\n * @param {string} [opts.eventCallbackUrl] -\n *          The URL we should call when an event occurs\n * @param {string} [opts.eventsFilter] -\n *          The list of Workspace events for which to call event_callback_url\n * @param {string} [opts.friendlyName] -\n *          A string to describe the Workspace resource\n * @param {boolean} [opts.multiTaskEnabled] - Whether multi-tasking is enabled\n * @param {string} [opts.timeoutActivitySid] -\n *          The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response\n * @param {workspace.queue_order} [opts.prioritizeQueueOrder] -\n *          The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceInstance\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WorkspaceInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceInstance\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the activities\n *\n * @function activities\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.ActivityList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.activities = function activities() {\n  return this._proxy.activities;\n};\n\n/* jshint ignore:start */\n/**\n * Access the events\n *\n * @function events\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.EventList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.events = function events() {\n  return this._proxy.events;\n};\n\n/* jshint ignore:start */\n/**\n * Access the tasks\n *\n * @function tasks\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.tasks = function tasks() {\n  return this._proxy.tasks;\n};\n\n/* jshint ignore:start */\n/**\n * Access the taskQueues\n *\n * @function taskQueues\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.taskQueues = function taskQueues() {\n  return this._proxy.taskQueues;\n};\n\n/* jshint ignore:start */\n/**\n * Access the workers\n *\n * @function workers\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkerList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.workers = function workers() {\n  return this._proxy.workers;\n};\n\n/* jshint ignore:start */\n/**\n * Access the workflows\n *\n * @function workflows\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.workflows = function workflows() {\n  return this._proxy.workflows;\n};\n\n/* jshint ignore:start */\n/**\n * Access the statistics\n *\n * @function statistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.statistics = function statistics() {\n  return this._proxy.statistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the realTimeStatistics\n *\n * @function realTimeStatistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.realTimeStatistics = function realTimeStatistics() {\n  return this._proxy.realTimeStatistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the cumulativeStatistics\n *\n * @function cumulativeStatistics\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.cumulativeStatistics = function\n    cumulativeStatistics() {\n  return this._proxy.cumulativeStatistics;\n};\n\n/* jshint ignore:start */\n/**\n * Access the taskChannels\n *\n * @function taskChannels\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns {Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList}\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.taskChannels = function taskChannels() {\n  return this._proxy.taskChannels;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWorkspaceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WorkspaceContext\n *\n * @constructor Twilio.Taskrouter.V1.WorkspaceContext\n *\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.ActivityList} activities -\n *          activities resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.EventList} events -\n *          events resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.TaskList} tasks -\n *          tasks resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.TaskQueueList} taskQueues -\n *          taskQueues resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkerList} workers -\n *          workers resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkflowList} workflows -\n *          workflows resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceStatisticsList} statistics -\n *          statistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceRealTimeStatisticsList} realTimeStatistics -\n *          realTimeStatistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.WorkspaceCumulativeStatisticsList} cumulativeStatistics -\n *          cumulativeStatistics resource\n * @property {Twilio.Taskrouter.V1.WorkspaceContext.TaskChannelList} taskChannels -\n *          taskChannels resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nWorkspaceContext = function WorkspaceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Workspaces/${sid}`;\n\n  // Dependents\n  this._activities = undefined;\n  this._events = undefined;\n  this._tasks = undefined;\n  this._taskQueues = undefined;\n  this._workers = undefined;\n  this._workflows = undefined;\n  this._statistics = undefined;\n  this._realTimeStatistics = undefined;\n  this._cumulativeStatistics = undefined;\n  this._taskChannels = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WorkspaceInstance\n *\n * @function fetch\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceInstance\n */\n/* jshint ignore:end */\nWorkspaceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkspaceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a WorkspaceInstance\n *\n * @function update\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.defaultActivitySid] -\n *          The SID of the Activity that will be used when new Workers are created in the Workspace\n * @param {string} [opts.eventCallbackUrl] -\n *          The URL we should call when an event occurs\n * @param {string} [opts.eventsFilter] -\n *          The list of Workspace events for which to call event_callback_url\n * @param {string} [opts.friendlyName] -\n *          A string to describe the Workspace resource\n * @param {boolean} [opts.multiTaskEnabled] - Whether multi-tasking is enabled\n * @param {string} [opts.timeoutActivitySid] -\n *          The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response\n * @param {workspace.queue_order} [opts.prioritizeQueueOrder] -\n *          The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceInstance\n */\n/* jshint ignore:end */\nWorkspaceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'DefaultActivitySid': _.get(opts, 'defaultActivitySid'),\n    'EventCallbackUrl': _.get(opts, 'eventCallbackUrl'),\n    'EventsFilter': _.get(opts, 'eventsFilter'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'MultiTaskEnabled': serialize.bool(_.get(opts, 'multiTaskEnabled')),\n    'TimeoutActivitySid': _.get(opts, 'timeoutActivitySid'),\n    'PrioritizeQueueOrder': _.get(opts, 'prioritizeQueueOrder')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WorkspaceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WorkspaceInstance\n *\n * @function remove\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WorkspaceInstance\n */\n/* jshint ignore:end */\nWorkspaceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'activities', {\n    get: function() {\n      if (!this._activities) {\n        this._activities = new ActivityList(this._version, this._solution.sid);\n      }\n      return this._activities;\n    }\n});\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'events', {\n    get: function() {\n      if (!this._events) {\n        this._events = new EventList(this._version, this._solution.sid);\n      }\n      return this._events;\n    }\n});\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'tasks', {\n    get: function() {\n      if (!this._tasks) {\n        this._tasks = new TaskList(this._version, this._solution.sid);\n      }\n      return this._tasks;\n    }\n});\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'taskQueues', {\n    get: function() {\n      if (!this._taskQueues) {\n        this._taskQueues = new TaskQueueList(this._version, this._solution.sid);\n      }\n      return this._taskQueues;\n    }\n});\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'workers', {\n    get: function() {\n      if (!this._workers) {\n        this._workers = new WorkerList(this._version, this._solution.sid);\n      }\n      return this._workers;\n    }\n});\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'workflows', {\n    get: function() {\n      if (!this._workflows) {\n        this._workflows = new WorkflowList(this._version, this._solution.sid);\n      }\n      return this._workflows;\n    }\n});\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'statistics', {\n    get: function() {\n      if (!this._statistics) {\n        this._statistics = new WorkspaceStatisticsList(this._version, this._solution.sid);\n      }\n      return this._statistics;\n    }\n});\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'realTimeStatistics', {\n    get: function() {\n      if (!this._realTimeStatistics) {\n        this._realTimeStatistics = new WorkspaceRealTimeStatisticsList(this._version, this._solution.sid);\n      }\n      return this._realTimeStatistics;\n    }\n});\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'cumulativeStatistics', {\n    get: function() {\n      if (!this._cumulativeStatistics) {\n        this._cumulativeStatistics = new WorkspaceCumulativeStatisticsList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._cumulativeStatistics;\n    }\n});\n\nObject.defineProperty(WorkspaceContext.prototype,\n  'taskChannels', {\n    get: function() {\n      if (!this._taskChannels) {\n        this._taskChannels = new TaskChannelList(this._version, this._solution.sid);\n      }\n      return this._taskChannels;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Taskrouter.V1.WorkspaceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWorkspaceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWorkspaceContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WorkspaceList: WorkspaceList,\n  WorkspacePage: WorkspacePage,\n  WorkspaceInstance: WorkspaceInstance,\n  WorkspaceContext: WorkspaceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Version = require('../../base/Version');  /* jshint ignore:line */\nvar WorkspaceList = require('./v1/workspace').WorkspaceList;\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Taskrouter\n *\n * @constructor Twilio.Taskrouter.V1\n *\n * @property {Twilio.Taskrouter.V1.WorkspaceList} workspaces - workspaces resource\n *\n * @param {Twilio.Taskrouter} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._workspaces = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'workspaces', {\n    get: function() {\n      this._workspaces = this._workspaces || new WorkspaceList(this);\n      return this._workspaces;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./taskrouter/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize taskrouter domain\n *\n * @constructor Twilio.Taskrouter\n *\n * @property {Twilio.Taskrouter.V1} v1 - v1 version\n * @property {Twilio.Taskrouter.V1.WorkspaceList} workspaces - workspaces resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Taskrouter(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://taskrouter.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Taskrouter.prototype, Domain.prototype);\nTaskrouter.prototype.constructor = Taskrouter;\n\nObject.defineProperty(Taskrouter.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Taskrouter.prototype,\n  'workspaces', {\n    get: function() {\n      return this.v1.workspaces;\n    }\n});\n\nmodule.exports = Taskrouter;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CredentialListList;\nvar CredentialListPage;\nvar CredentialListInstance;\nvar CredentialListContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListList\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.CredentialListList\n *\n * @param {Twilio.Trunking.V1} version - Version of the resource\n * @param {string} trunkSid -\n *          The SID of the Trunk the credential list in associated with\n */\n/* jshint ignore:end */\nCredentialListList = function CredentialListList(version, trunkSid) {\n  /* jshint ignore:start */\n  /**\n   * @function credentialsLists\n   * @memberof Twilio.Trunking.V1.TrunkContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.CredentialListContext}\n   */\n  /* jshint ignore:end */\n  function CredentialListListInstance(sid) {\n    return CredentialListListInstance.get(sid);\n  }\n\n  CredentialListListInstance._version = version;\n  // Path Solution\n  CredentialListListInstance._solution = {trunkSid: trunkSid};\n  CredentialListListInstance._uri = `/Trunks/${trunkSid}/CredentialLists`;\n  /* jshint ignore:start */\n  /**\n   * create a CredentialListInstance\n   *\n   * @function create\n   * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.credentialListSid -\n   *          The SID of the Credential List that you want to associate with the trunk\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CredentialListInstance\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['credentialListSid'])) {\n      throw new Error('Required parameter \"opts[\\'credentialListSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'CredentialListSid': _.get(opts, 'credentialListSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialListInstance(\n        this._version,\n        payload,\n        this._solution.trunkSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams CredentialListInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CredentialListInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CredentialListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CredentialListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CredentialListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a credential_list\n   *\n   * @function get\n   * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.CredentialListContext}\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.get = function get(sid) {\n    return new CredentialListContext(this._version, this._solution.trunkSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CredentialListListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CredentialListListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CredentialListListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListPage\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.CredentialListPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CredentialListSolution} solution - Path solution\n *\n * @returns CredentialListPage\n */\n/* jshint ignore:end */\nCredentialListPage = function CredentialListPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CredentialListPage.prototype, Page.prototype);\nCredentialListPage.prototype.constructor = CredentialListPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CredentialListInstance\n *\n * @function getInstance\n * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListPage#\n *\n * @param {CredentialListPayload} payload - Payload response from the API\n *\n * @returns CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListPage.prototype.getInstance = function getInstance(payload) {\n  return new CredentialListInstance(this._version, payload, this._solution.trunkSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialListPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialListPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.CredentialListInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} trunkSid -\n *          The SID of the Trunk the credential list in associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {CredentialListPayload} payload - The instance payload\n * @param {sid} trunkSid -\n *          The SID of the Trunk the credential list in associated with\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCredentialListInstance = function CredentialListInstance(version, payload,\n                                                          trunkSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {trunkSid: trunkSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(CredentialListInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CredentialListContext(\n          this._version,\n          this._solution.trunkSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialListInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialListInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialListInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCredentialListInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CredentialListContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.CredentialListContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} trunkSid -\n *          The SID of the Trunk from which to fetch the credential list\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCredentialListContext = function CredentialListContext(version, trunkSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {trunkSid: trunkSid, sid: sid, };\n  this._uri = `/Trunks/${trunkSid}/CredentialLists/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CredentialListInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CredentialListInstance(\n      this._version,\n      payload,\n      this._solution.trunkSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CredentialListInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CredentialListInstance\n */\n/* jshint ignore:end */\nCredentialListContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.CredentialListContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCredentialListContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCredentialListContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CredentialListList: CredentialListList,\n  CredentialListPage: CredentialListPage,\n  CredentialListInstance: CredentialListInstance,\n  CredentialListContext: CredentialListContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar IpAccessControlListList;\nvar IpAccessControlListPage;\nvar IpAccessControlListInstance;\nvar IpAccessControlListContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListList\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.IpAccessControlListList\n *\n * @param {Twilio.Trunking.V1} version - Version of the resource\n * @param {string} trunkSid - The SID of the Trunk the resource is associated with\n */\n/* jshint ignore:end */\nIpAccessControlListList = function IpAccessControlListList(version, trunkSid) {\n  /* jshint ignore:start */\n  /**\n   * @function ipAccessControlLists\n   * @memberof Twilio.Trunking.V1.TrunkContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.IpAccessControlListContext}\n   */\n  /* jshint ignore:end */\n  function IpAccessControlListListInstance(sid) {\n    return IpAccessControlListListInstance.get(sid);\n  }\n\n  IpAccessControlListListInstance._version = version;\n  // Path Solution\n  IpAccessControlListListInstance._solution = {trunkSid: trunkSid};\n  IpAccessControlListListInstance._uri = `/Trunks/${trunkSid}/IpAccessControlLists`;\n  /* jshint ignore:start */\n  /**\n   * create a IpAccessControlListInstance\n   *\n   * @function create\n   * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.ipAccessControlListSid -\n   *          The SID of the IP Access Control List that you want to associate with the trunk\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed IpAccessControlListInstance\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['ipAccessControlListSid'])) {\n      throw new Error('Required parameter \"opts[\\'ipAccessControlListSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'IpAccessControlListSid': _.get(opts, 'ipAccessControlListSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAccessControlListInstance(\n        this._version,\n        payload,\n        this._solution.trunkSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams IpAccessControlListInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists IpAccessControlListInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of IpAccessControlListInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAccessControlListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of IpAccessControlListInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.getPage = function getPage(targetUrl, callback)\n                                                              {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpAccessControlListPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a ip_access_control_list\n   *\n   * @function get\n   * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.IpAccessControlListContext}\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.get = function get(sid) {\n    return new IpAccessControlListContext(this._version, this._solution.trunkSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  IpAccessControlListListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  IpAccessControlListListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return IpAccessControlListListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListPage\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.IpAccessControlListPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {IpAccessControlListSolution} solution - Path solution\n *\n * @returns IpAccessControlListPage\n */\n/* jshint ignore:end */\nIpAccessControlListPage = function IpAccessControlListPage(version, response,\n                                                            solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(IpAccessControlListPage.prototype, Page.prototype);\nIpAccessControlListPage.prototype.constructor = IpAccessControlListPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of IpAccessControlListInstance\n *\n * @function getInstance\n * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListPage#\n *\n * @param {IpAccessControlListPayload} payload - Payload response from the API\n *\n * @returns IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListPage.prototype.getInstance = function getInstance(payload) {\n  return new IpAccessControlListInstance(this._version, payload, this._solution.trunkSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAccessControlListPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpAccessControlListPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.IpAccessControlListInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} trunkSid -\n *          The SID of the Trunk the resource is associated with\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {IpAccessControlListPayload} payload - The instance payload\n * @param {sid} trunkSid - The SID of the Trunk the resource is associated with\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nIpAccessControlListInstance = function IpAccessControlListInstance(version,\n    payload, trunkSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {trunkSid: trunkSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(IpAccessControlListInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new IpAccessControlListContext(\n          this._version,\n          this._solution.trunkSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a IpAccessControlListInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpAccessControlListInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAccessControlListInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpAccessControlListInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpAccessControlListContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.IpAccessControlListContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} trunkSid -\n *          The SID of the Trunk from which to fetch the IP Access Control List\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nIpAccessControlListContext = function IpAccessControlListContext(version,\n    trunkSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {trunkSid: trunkSid, sid: sid, };\n  this._uri = `/Trunks/${trunkSid}/IpAccessControlLists/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a IpAccessControlListInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IpAccessControlListInstance(\n      this._version,\n      payload,\n      this._solution.trunkSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpAccessControlListInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpAccessControlListInstance\n */\n/* jshint ignore:end */\nIpAccessControlListContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.IpAccessControlListContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpAccessControlListContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nIpAccessControlListContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  IpAccessControlListList: IpAccessControlListList,\n  IpAccessControlListPage: IpAccessControlListPage,\n  IpAccessControlListInstance: IpAccessControlListInstance,\n  IpAccessControlListContext: IpAccessControlListContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar OriginationUrlList;\nvar OriginationUrlPage;\nvar OriginationUrlInstance;\nvar OriginationUrlContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the OriginationUrlList\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.OriginationUrlList\n *\n * @param {Twilio.Trunking.V1} version - Version of the resource\n * @param {string} trunkSid - The SID of the Trunk that owns the Origination URL\n */\n/* jshint ignore:end */\nOriginationUrlList = function OriginationUrlList(version, trunkSid) {\n  /* jshint ignore:start */\n  /**\n   * @function originationUrls\n   * @memberof Twilio.Trunking.V1.TrunkContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.OriginationUrlContext}\n   */\n  /* jshint ignore:end */\n  function OriginationUrlListInstance(sid) {\n    return OriginationUrlListInstance.get(sid);\n  }\n\n  OriginationUrlListInstance._version = version;\n  // Path Solution\n  OriginationUrlListInstance._solution = {trunkSid: trunkSid};\n  OriginationUrlListInstance._uri = `/Trunks/${trunkSid}/OriginationUrls`;\n  /* jshint ignore:start */\n  /**\n   * create a OriginationUrlInstance\n   *\n   * @function create\n   * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlList#\n   *\n   * @param {object} opts - Options for request\n   * @param {number} opts.weight -\n   *          The value that determines the relative load the URI should receive compared to others with the same priority\n   * @param {number} opts.priority - The relative importance of the URI\n   * @param {boolean} opts.enabled - Whether the URL is enabled\n   * @param {string} opts.friendlyName - A string to describe the resource\n   * @param {string} opts.sipUrl -\n   *          The SIP address you want Twilio to route your Origination calls to\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed OriginationUrlInstance\n   */\n  /* jshint ignore:end */\n  OriginationUrlListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['weight'])) {\n      throw new Error('Required parameter \"opts[\\'weight\\']\" missing.');\n    }\n    if (_.isUndefined(opts['priority'])) {\n      throw new Error('Required parameter \"opts[\\'priority\\']\" missing.');\n    }\n    if (_.isUndefined(opts['enabled'])) {\n      throw new Error('Required parameter \"opts[\\'enabled\\']\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['sipUrl'])) {\n      throw new Error('Required parameter \"opts[\\'sipUrl\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Weight': _.get(opts, 'weight'),\n      'Priority': _.get(opts, 'priority'),\n      'Enabled': serialize.bool(_.get(opts, 'enabled')),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'SipUrl': _.get(opts, 'sipUrl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new OriginationUrlInstance(\n        this._version,\n        payload,\n        this._solution.trunkSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams OriginationUrlInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  OriginationUrlListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists OriginationUrlInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  OriginationUrlListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of OriginationUrlInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  OriginationUrlListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new OriginationUrlPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of OriginationUrlInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  OriginationUrlListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new OriginationUrlPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a origination_url\n   *\n   * @function get\n   * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.OriginationUrlContext}\n   */\n  /* jshint ignore:end */\n  OriginationUrlListInstance.get = function get(sid) {\n    return new OriginationUrlContext(this._version, this._solution.trunkSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  OriginationUrlListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  OriginationUrlListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return OriginationUrlListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the OriginationUrlPage\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.OriginationUrlPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {OriginationUrlSolution} solution - Path solution\n *\n * @returns OriginationUrlPage\n */\n/* jshint ignore:end */\nOriginationUrlPage = function OriginationUrlPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(OriginationUrlPage.prototype, Page.prototype);\nOriginationUrlPage.prototype.constructor = OriginationUrlPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of OriginationUrlInstance\n *\n * @function getInstance\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlPage#\n *\n * @param {OriginationUrlPayload} payload - Payload response from the API\n *\n * @returns OriginationUrlInstance\n */\n/* jshint ignore:end */\nOriginationUrlPage.prototype.getInstance = function getInstance(payload) {\n  return new OriginationUrlInstance(this._version, payload, this._solution.trunkSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nOriginationUrlPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nOriginationUrlPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the OriginationUrlContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.OriginationUrlInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} trunkSid - The SID of the Trunk that owns the Origination URL\n * @property {number} weight -\n *          The value that determines the relative load the URI should receive compared to others with the same priority\n * @property {boolean} enabled - Whether the URL is enabled\n * @property {string} sipUrl -\n *          The SIP address you want Twilio to route your Origination calls to\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {number} priority - The relative importance of the URI\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {OriginationUrlPayload} payload - The instance payload\n * @param {sid} trunkSid - The SID of the Trunk that owns the Origination URL\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nOriginationUrlInstance = function OriginationUrlInstance(version, payload,\n                                                          trunkSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.weight = deserialize.integer(payload.weight); // jshint ignore:line\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.sipUrl = payload.sip_url; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.priority = deserialize.integer(payload.priority); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {trunkSid: trunkSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(OriginationUrlInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new OriginationUrlContext(\n          this._version,\n          this._solution.trunkSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a OriginationUrlInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OriginationUrlInstance\n */\n/* jshint ignore:end */\nOriginationUrlInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a OriginationUrlInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OriginationUrlInstance\n */\n/* jshint ignore:end */\nOriginationUrlInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a OriginationUrlInstance\n *\n * @function update\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.weight] -\n *          The value that determines the relative load the URI should receive compared to others with the same priority\n * @param {number} [opts.priority] - The relative importance of the URI\n * @param {boolean} [opts.enabled] - Whether the URL is enabled\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.sipUrl] -\n *          The SIP address you want Twilio to route your Origination calls to\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OriginationUrlInstance\n */\n/* jshint ignore:end */\nOriginationUrlInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nOriginationUrlInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nOriginationUrlInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the OriginationUrlContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.OriginationUrlContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} trunkSid -\n *          The SID of the Trunk from which to fetch the OriginationUrl\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nOriginationUrlContext = function OriginationUrlContext(version, trunkSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {trunkSid: trunkSid, sid: sid, };\n  this._uri = `/Trunks/${trunkSid}/OriginationUrls/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a OriginationUrlInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OriginationUrlInstance\n */\n/* jshint ignore:end */\nOriginationUrlContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new OriginationUrlInstance(\n      this._version,\n      payload,\n      this._solution.trunkSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a OriginationUrlInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OriginationUrlInstance\n */\n/* jshint ignore:end */\nOriginationUrlContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a OriginationUrlInstance\n *\n * @function update\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.weight] -\n *          The value that determines the relative load the URI should receive compared to others with the same priority\n * @param {number} [opts.priority] - The relative importance of the URI\n * @param {boolean} [opts.enabled] - Whether the URL is enabled\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.sipUrl] -\n *          The SIP address you want Twilio to route your Origination calls to\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed OriginationUrlInstance\n */\n/* jshint ignore:end */\nOriginationUrlContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Weight': _.get(opts, 'weight'),\n    'Priority': _.get(opts, 'priority'),\n    'Enabled': serialize.bool(_.get(opts, 'enabled')),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'SipUrl': _.get(opts, 'sipUrl')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new OriginationUrlInstance(\n      this._version,\n      payload,\n      this._solution.trunkSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.OriginationUrlContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nOriginationUrlContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nOriginationUrlContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  OriginationUrlList: OriginationUrlList,\n  OriginationUrlPage: OriginationUrlPage,\n  OriginationUrlInstance: OriginationUrlInstance,\n  OriginationUrlContext: OriginationUrlContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar PhoneNumberList;\nvar PhoneNumberPage;\nvar PhoneNumberInstance;\nvar PhoneNumberContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberList\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.PhoneNumberList\n *\n * @param {Twilio.Trunking.V1} version - Version of the resource\n * @param {string} trunkSid -\n *          The SID of the Trunk that handles calls to the phone number\n */\n/* jshint ignore:end */\nPhoneNumberList = function PhoneNumberList(version, trunkSid) {\n  /* jshint ignore:start */\n  /**\n   * @function phoneNumbers\n   * @memberof Twilio.Trunking.V1.TrunkContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.PhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  function PhoneNumberListInstance(sid) {\n    return PhoneNumberListInstance.get(sid);\n  }\n\n  PhoneNumberListInstance._version = version;\n  // Path Solution\n  PhoneNumberListInstance._solution = {trunkSid: trunkSid};\n  PhoneNumberListInstance._uri = `/Trunks/${trunkSid}/PhoneNumbers`;\n  /* jshint ignore:start */\n  /**\n   * create a PhoneNumberInstance\n   *\n   * @function create\n   * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.phoneNumberSid -\n   *          The SID of the Incoming Phone Number that you want to associate with the trunk\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed PhoneNumberInstance\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['phoneNumberSid'])) {\n      throw new Error('Required parameter \"opts[\\'phoneNumberSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'PhoneNumberSid': _.get(opts, 'phoneNumberSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PhoneNumberInstance(\n        this._version,\n        payload,\n        this._solution.trunkSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams PhoneNumberInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists PhoneNumberInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of PhoneNumberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of PhoneNumberInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PhoneNumberPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a phone_number\n   *\n   * @function get\n   * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.PhoneNumberContext}\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.get = function get(sid) {\n    return new PhoneNumberContext(this._version, this._solution.trunkSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PhoneNumberListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PhoneNumberListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PhoneNumberListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberPage\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.PhoneNumberPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PhoneNumberSolution} solution - Path solution\n *\n * @returns PhoneNumberPage\n */\n/* jshint ignore:end */\nPhoneNumberPage = function PhoneNumberPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PhoneNumberPage.prototype, Page.prototype);\nPhoneNumberPage.prototype.constructor = PhoneNumberPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PhoneNumberInstance\n *\n * @function getInstance\n * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberPage#\n *\n * @param {PhoneNumberPayload} payload - Payload response from the API\n *\n * @returns PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.getInstance = function getInstance(payload) {\n  return new PhoneNumberInstance(this._version, payload, this._solution.trunkSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.PhoneNumberInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {phone_number.address_requirement} addressRequirements -\n *          Whether the phone number requires an Address registered with Twilio\n * @property {string} apiVersion -\n *          The API version used to start a new TwiML session\n * @property {boolean} beta -\n *          Whether the phone number is new to the Twilio platform\n * @property {object} capabilities -\n *          Indicate if a phone can receive calls or messages\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} links - The URLs of related resources\n * @property {string} phoneNumber - The phone number in E.164 format\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} smsApplicationSid -\n *          The SID of the application that handles SMS messages sent to the phone number\n * @property {string} smsFallbackMethod -\n *          The HTTP method used with sms_fallback_url\n * @property {string} smsFallbackUrl -\n *          The URL that we call when an error occurs while retrieving or executing the TwiML\n * @property {string} smsMethod - The HTTP method to use with sms_url\n * @property {string} smsUrl -\n *          The URL we call when the phone number receives an incoming SMS message\n * @property {string} statusCallback -\n *          The URL to send status information to your application\n * @property {string} statusCallbackMethod -\n *          The HTTP method we use to call status_callback\n * @property {string} trunkSid -\n *          The SID of the Trunk that handles calls to the phone number\n * @property {string} url - The absolute URL of the resource\n * @property {string} voiceApplicationSid -\n *          The SID of the application that handles calls to the phone number\n * @property {boolean} voiceCallerIdLookup - Whether to lookup the caller's name\n * @property {string} voiceFallbackMethod -\n *          The HTTP method that we use to call voice_fallback_url\n * @property {string} voiceFallbackUrl -\n *          The URL we call when an error occurs in TwiML\n * @property {string} voiceMethod - The HTTP method used with the voice_url\n * @property {string} voiceUrl -\n *          The URL we call when the phone number receives a call\n *\n * @param {V1} version - Version of the resource\n * @param {PhoneNumberPayload} payload - The instance payload\n * @param {sid} trunkSid -\n *          The SID of the Trunk that handles calls to the phone number\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nPhoneNumberInstance = function PhoneNumberInstance(version, payload, trunkSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.addressRequirements = payload.address_requirements; // jshint ignore:line\n  this.apiVersion = payload.api_version; // jshint ignore:line\n  this.beta = payload.beta; // jshint ignore:line\n  this.capabilities = payload.capabilities; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.phoneNumber = payload.phone_number; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.smsApplicationSid = payload.sms_application_sid; // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.trunkSid = payload.trunk_sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.voiceApplicationSid = payload.voice_application_sid; // jshint ignore:line\n  this.voiceCallerIdLookup = payload.voice_caller_id_lookup; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {trunkSid: trunkSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(PhoneNumberInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PhoneNumberContext(this._version, this._solution.trunkSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a PhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a PhoneNumberInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPhoneNumberInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PhoneNumberContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.PhoneNumberContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} trunkSid -\n *          The SID of the Trunk from which to fetch the PhoneNumber resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nPhoneNumberContext = function PhoneNumberContext(version, trunkSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {trunkSid: trunkSid, sid: sid, };\n  this._uri = `/Trunks/${trunkSid}/PhoneNumbers/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PhoneNumberInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PhoneNumberInstance(\n      this._version,\n      payload,\n      this._solution.trunkSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a PhoneNumberInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PhoneNumberInstance\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.PhoneNumberContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPhoneNumberContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPhoneNumberContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PhoneNumberList: PhoneNumberList,\n  PhoneNumberPage: PhoneNumberPage,\n  PhoneNumberInstance: PhoneNumberInstance,\n  PhoneNumberContext: PhoneNumberContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RecordingList;\nvar RecordingPage;\nvar RecordingInstance;\nvar RecordingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingList\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.RecordingList\n *\n * @param {Twilio.Trunking.V1} version - Version of the resource\n * @param {string} trunkSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRecordingList = function RecordingList(version, trunkSid) {\n  /* jshint ignore:start */\n  /**\n   * @function recordings\n   * @memberof Twilio.Trunking.V1.TrunkContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.RecordingContext}\n   */\n  /* jshint ignore:end */\n  function RecordingListInstance(sid) {\n    return RecordingListInstance.get(sid);\n  }\n\n  RecordingListInstance._version = version;\n  // Path Solution\n  RecordingListInstance._solution = {trunkSid: trunkSid};\n  /* jshint ignore:start */\n  /**\n   * Constructs a recording\n   *\n   * @function get\n   * @memberof Twilio.Trunking.V1.TrunkContext.RecordingList#\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext.RecordingContext}\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.get = function get() {\n    return new RecordingContext(this._version, this._solution.trunkSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trunking.V1.TrunkContext.RecordingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RecordingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RecordingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingPage\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.RecordingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RecordingSolution} solution - Path solution\n *\n * @returns RecordingPage\n */\n/* jshint ignore:end */\nRecordingPage = function RecordingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RecordingPage.prototype, Page.prototype);\nRecordingPage.prototype.constructor = RecordingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RecordingInstance\n *\n * @function getInstance\n * @memberof Twilio.Trunking.V1.TrunkContext.RecordingPage#\n *\n * @param {RecordingPayload} payload - Payload response from the API\n *\n * @returns RecordingInstance\n */\n/* jshint ignore:end */\nRecordingPage.prototype.getInstance = function getInstance(payload) {\n  return new RecordingInstance(this._version, payload, this._solution.trunkSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.RecordingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.RecordingInstance\n *\n * @property {recording.recording_mode} mode - The recording mode for the trunk.\n * @property {recording.recording_trim} trim -\n *          The recording trim setting for the trunk.\n *\n * @param {V1} version - Version of the resource\n * @param {RecordingPayload} payload - The instance payload\n * @param {sid} trunkSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRecordingInstance = function RecordingInstance(version, payload, trunkSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.mode = payload.mode; // jshint ignore:line\n  this.trim = payload.trim; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {trunkSid: trunkSid, };\n};\n\nObject.defineProperty(RecordingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RecordingContext(this._version, this._solution.trunkSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.RecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a RecordingInstance\n *\n * @function update\n * @memberof Twilio.Trunking.V1.TrunkContext.RecordingInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {recording.recording_mode} [opts.mode] -\n *          The recording mode for the trunk.\n * @param {recording.recording_trim} [opts.trim] -\n *          The recording trim setting for the trunk.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.RecordingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext.RecordingContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} trunkSid -\n *          The SID of the Trunk from which to fetch the recording settings.\n */\n/* jshint ignore:end */\nRecordingContext = function RecordingContext(version, trunkSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {trunkSid: trunkSid, };\n  this._uri = `/Trunks/${trunkSid}/Recording`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext.RecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingInstance(this._version, payload, this._solution.trunkSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a RecordingInstance\n *\n * @function update\n * @memberof Twilio.Trunking.V1.TrunkContext.RecordingContext#\n *\n * @param {object} [opts] - Options for request\n * @param {recording.recording_mode} [opts.mode] -\n *          The recording mode for the trunk.\n * @param {recording.recording_trim} [opts.trim] -\n *          The recording trim setting for the trunk.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Mode': _.get(opts, 'mode'), 'Trim': _.get(opts, 'trim')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingInstance(this._version, payload, this._solution.trunkSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext.RecordingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRecordingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RecordingList: RecordingList,\n  RecordingPage: RecordingPage,\n  RecordingInstance: RecordingInstance,\n  RecordingContext: RecordingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CredentialListList = require('./trunk/credentialList').CredentialListList;\nvar IpAccessControlListList = require(\n    './trunk/ipAccessControlList').IpAccessControlListList;\nvar OriginationUrlList = require('./trunk/originationUrl').OriginationUrlList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar PhoneNumberList = require('./trunk/phoneNumber').PhoneNumberList;\nvar RecordingList = require('./trunk/recording').RecordingList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar TrunkList;\nvar TrunkPage;\nvar TrunkInstance;\nvar TrunkContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TrunkList\n *\n * @constructor Twilio.Trunking.V1.TrunkList\n *\n * @param {Twilio.Trunking.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nTrunkList = function TrunkList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function trunks\n   * @memberof Twilio.Trunking.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext}\n   */\n  /* jshint ignore:end */\n  function TrunkListInstance(sid) {\n    return TrunkListInstance.get(sid);\n  }\n\n  TrunkListInstance._version = version;\n  // Path Solution\n  TrunkListInstance._solution = {};\n  TrunkListInstance._uri = `/Trunks`;\n  /* jshint ignore:start */\n  /**\n   * create a TrunkInstance\n   *\n   * @function create\n   * @memberof Twilio.Trunking.V1.TrunkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.domainName] -\n   *          The unique address you reserve on Twilio to which you route your SIP traffic\n   * @param {string} [opts.disasterRecoveryUrl] -\n   *          The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL\n   * @param {string} [opts.disasterRecoveryMethod] -\n   *          The HTTP method we should use to call the disaster_recovery_url\n   * @param {trunk.transfer_setting} [opts.transferMode] -\n   *          The call transfer settings for the trunk\n   * @param {boolean} [opts.secure] -\n   *          Whether Secure Trunking is enabled for the trunk\n   * @param {boolean} [opts.cnamLookupEnabled] -\n   *          Whether Caller ID Name (CNAM) lookup should be enabled for the trunk\n   * @param {trunk.transfer_caller_id} [opts.transferCallerId] -\n   *          Caller Id for transfer target\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TrunkInstance\n   */\n  /* jshint ignore:end */\n  TrunkListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'DomainName': _.get(opts, 'domainName'),\n      'DisasterRecoveryUrl': _.get(opts, 'disasterRecoveryUrl'),\n      'DisasterRecoveryMethod': _.get(opts, 'disasterRecoveryMethod'),\n      'TransferMode': _.get(opts, 'transferMode'),\n      'Secure': serialize.bool(_.get(opts, 'secure')),\n      'CnamLookupEnabled': serialize.bool(_.get(opts, 'cnamLookupEnabled')),\n      'TransferCallerId': _.get(opts, 'transferCallerId')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrunkInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams TrunkInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trunking.V1.TrunkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TrunkListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TrunkInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trunking.V1.TrunkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrunkListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TrunkInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trunking.V1.TrunkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrunkListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrunkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TrunkInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trunking.V1.TrunkList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrunkListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrunkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a trunk\n   *\n   * @function get\n   * @memberof Twilio.Trunking.V1.TrunkList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trunking.V1.TrunkContext}\n   */\n  /* jshint ignore:end */\n  TrunkListInstance.get = function get(sid) {\n    return new TrunkContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trunking.V1.TrunkList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TrunkListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TrunkListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TrunkListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrunkPage\n *\n * @constructor Twilio.Trunking.V1.TrunkPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TrunkSolution} solution - Path solution\n *\n * @returns TrunkPage\n */\n/* jshint ignore:end */\nTrunkPage = function TrunkPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TrunkPage.prototype, Page.prototype);\nTrunkPage.prototype.constructor = TrunkPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TrunkInstance\n *\n * @function getInstance\n * @memberof Twilio.Trunking.V1.TrunkPage#\n *\n * @param {TrunkPayload} payload - Payload response from the API\n *\n * @returns TrunkInstance\n */\n/* jshint ignore:end */\nTrunkPage.prototype.getInstance = function getInstance(payload) {\n  return new TrunkInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrunkPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrunkPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrunkContext\n *\n * @constructor Twilio.Trunking.V1.TrunkInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} domainName -\n *          The unique address you reserve on Twilio to which you route your SIP traffic\n * @property {string} disasterRecoveryMethod -\n *          The HTTP method we use to call the disaster_recovery_url\n * @property {string} disasterRecoveryUrl -\n *          The HTTP URL that we call if an error occurs while sending SIP traffic towards your configured Origination URL\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {boolean} secure - Whether Secure Trunking is enabled for the trunk\n * @property {object} recording - The recording settings for the trunk\n * @property {trunk.transfer_setting} transferMode -\n *          The call transfer settings for the trunk\n * @property {trunk.transfer_caller_id} transferCallerId -\n *          Caller Id for transfer target\n * @property {boolean} cnamLookupEnabled -\n *          Whether Caller ID Name (CNAM) lookup is enabled for the trunk\n * @property {string} authType - The types of authentication mapped to the domain\n * @property {string} authTypeSet - Reserved\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {TrunkPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTrunkInstance = function TrunkInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.domainName = payload.domain_name; // jshint ignore:line\n  this.disasterRecoveryMethod = payload.disaster_recovery_method; // jshint ignore:line\n  this.disasterRecoveryUrl = payload.disaster_recovery_url; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.secure = payload.secure; // jshint ignore:line\n  this.recording = payload.recording; // jshint ignore:line\n  this.transferMode = payload.transfer_mode; // jshint ignore:line\n  this.transferCallerId = payload.transfer_caller_id; // jshint ignore:line\n  this.cnamLookupEnabled = payload.cnam_lookup_enabled; // jshint ignore:line\n  this.authType = payload.auth_type; // jshint ignore:line\n  this.authTypeSet = payload.auth_type_set; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(TrunkInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TrunkContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TrunkInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrunkInstance\n */\n/* jshint ignore:end */\nTrunkInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TrunkInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrunkInstance\n */\n/* jshint ignore:end */\nTrunkInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TrunkInstance\n *\n * @function update\n * @memberof Twilio.Trunking.V1.TrunkInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.domainName] -\n *          The unique address you reserve on Twilio to which you route your SIP traffic\n * @param {string} [opts.disasterRecoveryUrl] -\n *          The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL\n * @param {string} [opts.disasterRecoveryMethod] -\n *          The HTTP method we should use to call the disaster_recovery_url\n * @param {trunk.transfer_setting} [opts.transferMode] -\n *          The call transfer settings for the trunk\n * @param {boolean} [opts.secure] -\n *          Whether Secure Trunking is enabled for the trunk\n * @param {boolean} [opts.cnamLookupEnabled] -\n *          Whether Caller ID Name (CNAM) lookup should be enabled for the trunk\n * @param {trunk.transfer_caller_id} [opts.transferCallerId] -\n *          Caller Id for transfer target\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrunkInstance\n */\n/* jshint ignore:end */\nTrunkInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the originationUrls\n *\n * @function originationUrls\n * @memberof Twilio.Trunking.V1.TrunkInstance#\n *\n * @returns {Twilio.Trunking.V1.TrunkContext.OriginationUrlList}\n */\n/* jshint ignore:end */\nTrunkInstance.prototype.originationUrls = function originationUrls() {\n  return this._proxy.originationUrls;\n};\n\n/* jshint ignore:start */\n/**\n * Access the credentialsLists\n *\n * @function credentialsLists\n * @memberof Twilio.Trunking.V1.TrunkInstance#\n *\n * @returns {Twilio.Trunking.V1.TrunkContext.CredentialListList}\n */\n/* jshint ignore:end */\nTrunkInstance.prototype.credentialsLists = function credentialsLists() {\n  return this._proxy.credentialsLists;\n};\n\n/* jshint ignore:start */\n/**\n * Access the ipAccessControlLists\n *\n * @function ipAccessControlLists\n * @memberof Twilio.Trunking.V1.TrunkInstance#\n *\n * @returns {Twilio.Trunking.V1.TrunkContext.IpAccessControlListList}\n */\n/* jshint ignore:end */\nTrunkInstance.prototype.ipAccessControlLists = function ipAccessControlLists() {\n  return this._proxy.ipAccessControlLists;\n};\n\n/* jshint ignore:start */\n/**\n * Access the phoneNumbers\n *\n * @function phoneNumbers\n * @memberof Twilio.Trunking.V1.TrunkInstance#\n *\n * @returns {Twilio.Trunking.V1.TrunkContext.PhoneNumberList}\n */\n/* jshint ignore:end */\nTrunkInstance.prototype.phoneNumbers = function phoneNumbers() {\n  return this._proxy.phoneNumbers;\n};\n\n/* jshint ignore:start */\n/**\n * Access the recordings\n *\n * @function recordings\n * @memberof Twilio.Trunking.V1.TrunkInstance#\n *\n * @returns {Twilio.Trunking.V1.TrunkContext.RecordingList}\n */\n/* jshint ignore:end */\nTrunkInstance.prototype.recordings = function recordings() {\n  return this._proxy.recordings;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrunkInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrunkInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrunkContext\n *\n * @constructor Twilio.Trunking.V1.TrunkContext\n *\n * @property {Twilio.Trunking.V1.TrunkContext.OriginationUrlList} originationUrls -\n *          originationUrls resource\n * @property {Twilio.Trunking.V1.TrunkContext.CredentialListList} credentialsLists -\n *          credentialsLists resource\n * @property {Twilio.Trunking.V1.TrunkContext.IpAccessControlListList} ipAccessControlLists -\n *          ipAccessControlLists resource\n * @property {Twilio.Trunking.V1.TrunkContext.PhoneNumberList} phoneNumbers -\n *          phoneNumbers resource\n * @property {Twilio.Trunking.V1.TrunkContext.RecordingList} recordings -\n *          recordings resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTrunkContext = function TrunkContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Trunks/${sid}`;\n\n  // Dependents\n  this._originationUrls = undefined;\n  this._credentialsLists = undefined;\n  this._ipAccessControlLists = undefined;\n  this._phoneNumbers = undefined;\n  this._recordings = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TrunkInstance\n *\n * @function fetch\n * @memberof Twilio.Trunking.V1.TrunkContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrunkInstance\n */\n/* jshint ignore:end */\nTrunkContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TrunkInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TrunkInstance\n *\n * @function remove\n * @memberof Twilio.Trunking.V1.TrunkContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrunkInstance\n */\n/* jshint ignore:end */\nTrunkContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TrunkInstance\n *\n * @function update\n * @memberof Twilio.Trunking.V1.TrunkContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.domainName] -\n *          The unique address you reserve on Twilio to which you route your SIP traffic\n * @param {string} [opts.disasterRecoveryUrl] -\n *          The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL\n * @param {string} [opts.disasterRecoveryMethod] -\n *          The HTTP method we should use to call the disaster_recovery_url\n * @param {trunk.transfer_setting} [opts.transferMode] -\n *          The call transfer settings for the trunk\n * @param {boolean} [opts.secure] -\n *          Whether Secure Trunking is enabled for the trunk\n * @param {boolean} [opts.cnamLookupEnabled] -\n *          Whether Caller ID Name (CNAM) lookup should be enabled for the trunk\n * @param {trunk.transfer_caller_id} [opts.transferCallerId] -\n *          Caller Id for transfer target\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrunkInstance\n */\n/* jshint ignore:end */\nTrunkContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'DomainName': _.get(opts, 'domainName'),\n    'DisasterRecoveryUrl': _.get(opts, 'disasterRecoveryUrl'),\n    'DisasterRecoveryMethod': _.get(opts, 'disasterRecoveryMethod'),\n    'TransferMode': _.get(opts, 'transferMode'),\n    'Secure': serialize.bool(_.get(opts, 'secure')),\n    'CnamLookupEnabled': serialize.bool(_.get(opts, 'cnamLookupEnabled')),\n    'TransferCallerId': _.get(opts, 'transferCallerId')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TrunkInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(TrunkContext.prototype,\n  'originationUrls', {\n    get: function() {\n      if (!this._originationUrls) {\n        this._originationUrls = new OriginationUrlList(this._version, this._solution.sid);\n      }\n      return this._originationUrls;\n    }\n});\n\nObject.defineProperty(TrunkContext.prototype,\n  'credentialsLists', {\n    get: function() {\n      if (!this._credentialsLists) {\n        this._credentialsLists = new CredentialListList(this._version, this._solution.sid);\n      }\n      return this._credentialsLists;\n    }\n});\n\nObject.defineProperty(TrunkContext.prototype,\n  'ipAccessControlLists', {\n    get: function() {\n      if (!this._ipAccessControlLists) {\n        this._ipAccessControlLists = new IpAccessControlListList(this._version, this._solution.sid);\n      }\n      return this._ipAccessControlLists;\n    }\n});\n\nObject.defineProperty(TrunkContext.prototype,\n  'phoneNumbers', {\n    get: function() {\n      if (!this._phoneNumbers) {\n        this._phoneNumbers = new PhoneNumberList(this._version, this._solution.sid);\n      }\n      return this._phoneNumbers;\n    }\n});\n\nObject.defineProperty(TrunkContext.prototype,\n  'recordings', {\n    get: function() {\n      if (!this._recordings) {\n        this._recordings = new RecordingList(this._version, this._solution.sid);\n      }\n      return this._recordings;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trunking.V1.TrunkContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrunkContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTrunkContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TrunkList: TrunkList,\n  TrunkPage: TrunkPage,\n  TrunkInstance: TrunkInstance,\n  TrunkContext: TrunkContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar TrunkList = require('./v1/trunk').TrunkList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Trunking\n *\n * @constructor Twilio.Trunking.V1\n *\n * @property {Twilio.Trunking.V1.TrunkList} trunks - trunks resource\n *\n * @param {Twilio.Trunking} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._trunks = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'trunks', {\n    get: function() {\n      this._trunks = this._trunks || new TrunkList(this);\n      return this._trunks;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./trunking/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize trunking domain\n *\n * @constructor Twilio.Trunking\n *\n * @property {Twilio.Trunking.V1} v1 - v1 version\n * @property {Twilio.Trunking.V1.TrunkList} trunks - trunks resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Trunking(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://trunking.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Trunking.prototype, Domain.prototype);\nTrunking.prototype.constructor = Trunking;\n\nObject.defineProperty(Trunking.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Trunking.prototype,\n  'trunks', {\n    get: function() {\n      return this.v1.trunks;\n    }\n});\n\nmodule.exports = Trunking;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CustomerProfilesChannelEndpointAssignmentList;\nvar CustomerProfilesChannelEndpointAssignmentPage;\nvar CustomerProfilesChannelEndpointAssignmentInstance;\nvar CustomerProfilesChannelEndpointAssignmentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesChannelEndpointAssignmentList\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n * @param {string} customerProfileSid -\n *          The unique string that identifies the CustomerProfile resource.\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentList = function\n    CustomerProfilesChannelEndpointAssignmentList(version, customerProfileSid) {\n  /* jshint ignore:start */\n  /**\n   * @function customerProfilesChannelEndpointAssignment\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentContext}\n   */\n  /* jshint ignore:end */\n  function CustomerProfilesChannelEndpointAssignmentListInstance(sid) {\n    return CustomerProfilesChannelEndpointAssignmentListInstance.get(sid);\n  }\n\n  CustomerProfilesChannelEndpointAssignmentListInstance._version = version;\n  // Path Solution\n  CustomerProfilesChannelEndpointAssignmentListInstance._solution = {\n    customerProfileSid: customerProfileSid\n  };\n  CustomerProfilesChannelEndpointAssignmentListInstance._uri = `/CustomerProfiles/${customerProfileSid}/ChannelEndpointAssignments`;\n  /* jshint ignore:start */\n  /**\n   * create a CustomerProfilesChannelEndpointAssignmentInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.channelEndpointType - The type of channel endpoint\n   * @param {string} opts.channelEndpointSid - The sid of an channel endpoint\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CustomerProfilesChannelEndpointAssignmentInstance\n   */\n  /* jshint ignore:end */\n  CustomerProfilesChannelEndpointAssignmentListInstance.create = function\n      create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['channelEndpointType'])) {\n      throw new Error('Required parameter \"opts[\\'channelEndpointType\\']\" missing.');\n    }\n    if (_.isUndefined(opts['channelEndpointSid'])) {\n      throw new Error('Required parameter \"opts[\\'channelEndpointSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ChannelEndpointType': _.get(opts, 'channelEndpointType'),\n      'ChannelEndpointSid': _.get(opts, 'channelEndpointSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesChannelEndpointAssignmentInstance(\n        this._version,\n        payload,\n        this._solution.customerProfileSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams CustomerProfilesChannelEndpointAssignmentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.channelEndpointSid] - The sid of an channel endpoint\n   * @param {string} [opts.channelEndpointSids] -\n   *          comma separated list of channel endpoint sids\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CustomerProfilesChannelEndpointAssignmentListInstance.each = function each(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CustomerProfilesChannelEndpointAssignmentInstance records from the API as\n   * a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.channelEndpointSid] - The sid of an channel endpoint\n   * @param {string} [opts.channelEndpointSids] -\n   *          comma separated list of channel endpoint sids\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesChannelEndpointAssignmentListInstance.list = function list(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CustomerProfilesChannelEndpointAssignmentInstance\n   * records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.channelEndpointSid] - The sid of an channel endpoint\n   * @param {string} [opts.channelEndpointSids] -\n   *          comma separated list of channel endpoint sids\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesChannelEndpointAssignmentListInstance.page = function page(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ChannelEndpointSid': _.get(opts, 'channelEndpointSid'),\n      'ChannelEndpointSids': _.get(opts, 'channelEndpointSids'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesChannelEndpointAssignmentPage(\n        this._version,\n        payload,\n        this._solution\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of\n   * CustomerProfilesChannelEndpointAssignmentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesChannelEndpointAssignmentListInstance.getPage = function\n      getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesChannelEndpointAssignmentPage(\n        this._version,\n        payload,\n        this._solution\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a customer_profiles_channel_endpoint_assignment\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentContext}\n   */\n  /* jshint ignore:end */\n  CustomerProfilesChannelEndpointAssignmentListInstance.get = function get(sid) {\n    return new CustomerProfilesChannelEndpointAssignmentContext(\n      this._version,\n      this._solution.customerProfileSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CustomerProfilesChannelEndpointAssignmentListInstance.toJSON = function toJSON()\n      {\n    return this._solution;\n  };\n\n  CustomerProfilesChannelEndpointAssignmentListInstance[util.inspect.custom] =\n      function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CustomerProfilesChannelEndpointAssignmentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesChannelEndpointAssignmentPage\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CustomerProfilesChannelEndpointAssignmentSolution} solution -\n *          Path solution\n *\n * @returns CustomerProfilesChannelEndpointAssignmentPage\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentPage = function\n    CustomerProfilesChannelEndpointAssignmentPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CustomerProfilesChannelEndpointAssignmentPage.prototype, Page.prototype);\nCustomerProfilesChannelEndpointAssignmentPage.prototype.constructor = CustomerProfilesChannelEndpointAssignmentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CustomerProfilesChannelEndpointAssignmentInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentPage#\n *\n * @param {CustomerProfilesChannelEndpointAssignmentPayload} payload -\n *          Payload response from the API\n *\n * @returns CustomerProfilesChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new CustomerProfilesChannelEndpointAssignmentInstance(\n    this._version,\n    payload,\n    this._solution.customerProfileSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentPage.prototype.toJSON = function\n    toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCustomerProfilesChannelEndpointAssignmentPage.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesChannelEndpointAssignmentContext\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} customerProfileSid -\n *          The unique string that identifies the CustomerProfile resource.\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} channelEndpointType - The type of channel endpoint\n * @property {string} channelEndpointSid - The sid of an channel endpoint\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {string} url - The absolute URL of the Identity resource\n *\n * @param {V1} version - Version of the resource\n * @param {CustomerProfilesChannelEndpointAssignmentPayload} payload -\n *          The instance payload\n * @param {sid} customerProfileSid -\n *          The unique string that identifies the CustomerProfile resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentInstance = function\n    CustomerProfilesChannelEndpointAssignmentInstance(version, payload,\n    customerProfileSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.customerProfileSid = payload.customer_profile_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelEndpointType = payload.channel_endpoint_type; // jshint ignore:line\n  this.channelEndpointSid = payload.channel_endpoint_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {customerProfileSid: customerProfileSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(CustomerProfilesChannelEndpointAssignmentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CustomerProfilesChannelEndpointAssignmentContext(\n          this._version,\n          this._solution.customerProfileSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CustomerProfilesChannelEndpointAssignmentInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentInstance.prototype.fetch = function\n    fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CustomerProfilesChannelEndpointAssignmentInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentInstance.prototype.remove = function\n    remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentInstance.prototype.toJSON = function\n    toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCustomerProfilesChannelEndpointAssignmentInstance.prototype[util.inspect.custom]\n    = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesChannelEndpointAssignmentContext\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} customerProfileSid -\n *          The unique string that identifies the resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentContext = function\n    CustomerProfilesChannelEndpointAssignmentContext(version,\n    customerProfileSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {customerProfileSid: customerProfileSid, sid: sid, };\n  this._uri = `/CustomerProfiles/${customerProfileSid}/ChannelEndpointAssignments/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CustomerProfilesChannelEndpointAssignmentInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentContext.prototype.fetch = function\n    fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CustomerProfilesChannelEndpointAssignmentInstance(\n      this._version,\n      payload,\n      this._solution.customerProfileSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CustomerProfilesChannelEndpointAssignmentInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentContext.prototype.remove = function\n    remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesChannelEndpointAssignmentContext.prototype.toJSON = function\n    toJSON() {\n  return this._solution;\n};\n\nCustomerProfilesChannelEndpointAssignmentContext.prototype[util.inspect.custom]\n    = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CustomerProfilesChannelEndpointAssignmentList: CustomerProfilesChannelEndpointAssignmentList,\n  CustomerProfilesChannelEndpointAssignmentPage: CustomerProfilesChannelEndpointAssignmentPage,\n  CustomerProfilesChannelEndpointAssignmentInstance: CustomerProfilesChannelEndpointAssignmentInstance,\n  CustomerProfilesChannelEndpointAssignmentContext: CustomerProfilesChannelEndpointAssignmentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CustomerProfilesEntityAssignmentsList;\nvar CustomerProfilesEntityAssignmentsPage;\nvar CustomerProfilesEntityAssignmentsInstance;\nvar CustomerProfilesEntityAssignmentsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesEntityAssignmentsList\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n * @param {string} customerProfileSid -\n *          The unique string that identifies the CustomerProfile resource.\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsList = function\n    CustomerProfilesEntityAssignmentsList(version, customerProfileSid) {\n  /* jshint ignore:start */\n  /**\n   * @function customerProfilesEntityAssignments\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsContext}\n   */\n  /* jshint ignore:end */\n  function CustomerProfilesEntityAssignmentsListInstance(sid) {\n    return CustomerProfilesEntityAssignmentsListInstance.get(sid);\n  }\n\n  CustomerProfilesEntityAssignmentsListInstance._version = version;\n  // Path Solution\n  CustomerProfilesEntityAssignmentsListInstance._solution = {customerProfileSid: customerProfileSid};\n  CustomerProfilesEntityAssignmentsListInstance._uri = `/CustomerProfiles/${customerProfileSid}/EntityAssignments`;\n  /* jshint ignore:start */\n  /**\n   * create a CustomerProfilesEntityAssignmentsInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.objectSid - The sid of an object bag\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CustomerProfilesEntityAssignmentsInstance\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEntityAssignmentsListInstance.create = function create(opts,\n      callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['objectSid'])) {\n      throw new Error('Required parameter \"opts[\\'objectSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'ObjectSid': _.get(opts, 'objectSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesEntityAssignmentsInstance(\n        this._version,\n        payload,\n        this._solution.customerProfileSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams CustomerProfilesEntityAssignmentsInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEntityAssignmentsListInstance.each = function each(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CustomerProfilesEntityAssignmentsInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEntityAssignmentsListInstance.list = function list(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CustomerProfilesEntityAssignmentsInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEntityAssignmentsListInstance.page = function page(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesEntityAssignmentsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CustomerProfilesEntityAssignmentsInstance\n   * records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEntityAssignmentsListInstance.getPage = function\n      getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesEntityAssignmentsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a customer_profiles_entity_assignments\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsContext}\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEntityAssignmentsListInstance.get = function get(sid) {\n    return new CustomerProfilesEntityAssignmentsContext(\n      this._version,\n      this._solution.customerProfileSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEntityAssignmentsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CustomerProfilesEntityAssignmentsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CustomerProfilesEntityAssignmentsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesEntityAssignmentsPage\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CustomerProfilesEntityAssignmentsSolution} solution - Path solution\n *\n * @returns CustomerProfilesEntityAssignmentsPage\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsPage = function\n    CustomerProfilesEntityAssignmentsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CustomerProfilesEntityAssignmentsPage.prototype, Page.prototype);\nCustomerProfilesEntityAssignmentsPage.prototype.constructor = CustomerProfilesEntityAssignmentsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CustomerProfilesEntityAssignmentsInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsPage#\n *\n * @param {CustomerProfilesEntityAssignmentsPayload} payload -\n *          Payload response from the API\n *\n * @returns CustomerProfilesEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new CustomerProfilesEntityAssignmentsInstance(\n    this._version,\n    payload,\n    this._solution.customerProfileSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCustomerProfilesEntityAssignmentsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesEntityAssignmentsContext\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} customerProfileSid -\n *          The unique string that identifies the CustomerProfile resource.\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} objectSid - The sid of an object bag\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {string} url - The absolute URL of the Identity resource\n *\n * @param {V1} version - Version of the resource\n * @param {CustomerProfilesEntityAssignmentsPayload} payload - The instance payload\n * @param {sid} customerProfileSid -\n *          The unique string that identifies the CustomerProfile resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsInstance = function\n    CustomerProfilesEntityAssignmentsInstance(version, payload,\n    customerProfileSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.customerProfileSid = payload.customer_profile_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.objectSid = payload.object_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {customerProfileSid: customerProfileSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(CustomerProfilesEntityAssignmentsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CustomerProfilesEntityAssignmentsContext(\n          this._version,\n          this._solution.customerProfileSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CustomerProfilesEntityAssignmentsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsInstance.prototype.fetch = function\n    fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CustomerProfilesEntityAssignmentsInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsInstance.prototype.remove = function\n    remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCustomerProfilesEntityAssignmentsInstance.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesEntityAssignmentsContext\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} customerProfileSid -\n *          The unique string that identifies the resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsContext = function\n    CustomerProfilesEntityAssignmentsContext(version, customerProfileSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {customerProfileSid: customerProfileSid, sid: sid, };\n  this._uri = `/CustomerProfiles/${customerProfileSid}/EntityAssignments/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CustomerProfilesEntityAssignmentsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsContext.prototype.fetch = function\n    fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CustomerProfilesEntityAssignmentsInstance(\n      this._version,\n      payload,\n      this._solution.customerProfileSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CustomerProfilesEntityAssignmentsInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsContext.prototype.remove = function\n    remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesEntityAssignmentsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCustomerProfilesEntityAssignmentsContext.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CustomerProfilesEntityAssignmentsList: CustomerProfilesEntityAssignmentsList,\n  CustomerProfilesEntityAssignmentsPage: CustomerProfilesEntityAssignmentsPage,\n  CustomerProfilesEntityAssignmentsInstance: CustomerProfilesEntityAssignmentsInstance,\n  CustomerProfilesEntityAssignmentsContext: CustomerProfilesEntityAssignmentsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CustomerProfilesEvaluationsList;\nvar CustomerProfilesEvaluationsPage;\nvar CustomerProfilesEvaluationsInstance;\nvar CustomerProfilesEvaluationsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesEvaluationsList\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n * @param {string} customerProfileSid -\n *          The unique string that identifies the resource\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsList = function\n    CustomerProfilesEvaluationsList(version, customerProfileSid) {\n  /* jshint ignore:start */\n  /**\n   * @function customerProfilesEvaluations\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsContext}\n   */\n  /* jshint ignore:end */\n  function CustomerProfilesEvaluationsListInstance(sid) {\n    return CustomerProfilesEvaluationsListInstance.get(sid);\n  }\n\n  CustomerProfilesEvaluationsListInstance._version = version;\n  // Path Solution\n  CustomerProfilesEvaluationsListInstance._solution = {customerProfileSid: customerProfileSid};\n  CustomerProfilesEvaluationsListInstance._uri = `/CustomerProfiles/${customerProfileSid}/Evaluations`;\n  /* jshint ignore:start */\n  /**\n   * create a CustomerProfilesEvaluationsInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.policySid - The unique string of a policy\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CustomerProfilesEvaluationsInstance\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEvaluationsListInstance.create = function create(opts, callback)\n      {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['policySid'])) {\n      throw new Error('Required parameter \"opts[\\'policySid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'PolicySid': _.get(opts, 'policySid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesEvaluationsInstance(\n        this._version,\n        payload,\n        this._solution.customerProfileSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams CustomerProfilesEvaluationsInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEvaluationsListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CustomerProfilesEvaluationsInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEvaluationsListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CustomerProfilesEvaluationsInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEvaluationsListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesEvaluationsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CustomerProfilesEvaluationsInstance records\n   * from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEvaluationsListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesEvaluationsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a customer_profiles_evaluations\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList#\n   *\n   * @param {string} sid - The unique string that identifies the Evaluation resource\n   *\n   * @returns {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsContext}\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEvaluationsListInstance.get = function get(sid) {\n    return new CustomerProfilesEvaluationsContext(\n      this._version,\n      this._solution.customerProfileSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CustomerProfilesEvaluationsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CustomerProfilesEvaluationsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CustomerProfilesEvaluationsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesEvaluationsPage\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CustomerProfilesEvaluationsSolution} solution - Path solution\n *\n * @returns CustomerProfilesEvaluationsPage\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsPage = function\n    CustomerProfilesEvaluationsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CustomerProfilesEvaluationsPage.prototype, Page.prototype);\nCustomerProfilesEvaluationsPage.prototype.constructor = CustomerProfilesEvaluationsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CustomerProfilesEvaluationsInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsPage#\n *\n * @param {CustomerProfilesEvaluationsPayload} payload -\n *          Payload response from the API\n *\n * @returns CustomerProfilesEvaluationsInstance\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new CustomerProfilesEvaluationsInstance(\n    this._version,\n    payload,\n    this._solution.customerProfileSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCustomerProfilesEvaluationsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesEvaluationsContext\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Evaluation resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} policySid - The unique string of a policy\n * @property {string} customerProfileSid -\n *          The unique string that identifies the resource\n * @property {customer_profiles_evaluations.status} status -\n *          The compliance status of the Evaluation resource\n * @property {object} results - The results of the Evaluation resource\n * @property {Date} dateCreated - The date_created\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {CustomerProfilesEvaluationsPayload} payload - The instance payload\n * @param {sid} customerProfileSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies the Evaluation resource\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsInstance = function\n    CustomerProfilesEvaluationsInstance(version, payload, customerProfileSid,\n    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.policySid = payload.policy_sid; // jshint ignore:line\n  this.customerProfileSid = payload.customer_profile_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.results = payload.results; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {customerProfileSid: customerProfileSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(CustomerProfilesEvaluationsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CustomerProfilesEvaluationsContext(\n          this._version,\n          this._solution.customerProfileSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CustomerProfilesEvaluationsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesEvaluationsInstance\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCustomerProfilesEvaluationsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesEvaluationsContext\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} customerProfileSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies the Evaluation resource\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsContext = function\n    CustomerProfilesEvaluationsContext(version, customerProfileSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {customerProfileSid: customerProfileSid, sid: sid, };\n  this._uri = `/CustomerProfiles/${customerProfileSid}/Evaluations/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CustomerProfilesEvaluationsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesEvaluationsInstance\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CustomerProfilesEvaluationsInstance(\n      this._version,\n      payload,\n      this._solution.customerProfileSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesEvaluationsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCustomerProfilesEvaluationsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CustomerProfilesEvaluationsList: CustomerProfilesEvaluationsList,\n  CustomerProfilesEvaluationsPage: CustomerProfilesEvaluationsPage,\n  CustomerProfilesEvaluationsInstance: CustomerProfilesEvaluationsInstance,\n  CustomerProfilesEvaluationsContext: CustomerProfilesEvaluationsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar CustomerProfilesChannelEndpointAssignmentList = require(\n    './customerProfiles/customerProfilesChannelEndpointAssignment').CustomerProfilesChannelEndpointAssignmentList;\nvar CustomerProfilesEntityAssignmentsList = require(\n    './customerProfiles/customerProfilesEntityAssignments').CustomerProfilesEntityAssignmentsList;\nvar CustomerProfilesEvaluationsList = require(\n    './customerProfiles/customerProfilesEvaluations').CustomerProfilesEvaluationsList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CustomerProfilesList;\nvar CustomerProfilesPage;\nvar CustomerProfilesInstance;\nvar CustomerProfilesContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesList\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCustomerProfilesList = function CustomerProfilesList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function customerProfiles\n   * @memberof Twilio.Trusthub.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.CustomerProfilesContext}\n   */\n  /* jshint ignore:end */\n  function CustomerProfilesListInstance(sid) {\n    return CustomerProfilesListInstance.get(sid);\n  }\n\n  CustomerProfilesListInstance._version = version;\n  // Path Solution\n  CustomerProfilesListInstance._solution = {};\n  CustomerProfilesListInstance._uri = `/CustomerProfiles`;\n  /* jshint ignore:start */\n  /**\n   * create a CustomerProfilesInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the resource\n   * @param {string} opts.email - The email address\n   * @param {string} opts.policySid - The unique string of a policy.\n   * @param {string} [opts.statusCallback] -\n   *          The URL we call to inform your application of status changes.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CustomerProfilesInstance\n   */\n  /* jshint ignore:end */\n  CustomerProfilesListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['email'])) {\n      throw new Error('Required parameter \"opts[\\'email\\']\" missing.');\n    }\n    if (_.isUndefined(opts['policySid'])) {\n      throw new Error('Required parameter \"opts[\\'policySid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Email': _.get(opts, 'email'),\n      'PolicySid': _.get(opts, 'policySid'),\n      'StatusCallback': _.get(opts, 'statusCallback')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams CustomerProfilesInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {customer_profiles.status} [opts.status] -\n   *          The verification status of the Customer-Profile resource\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.policySid] - The unique string of a policy.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CustomerProfilesListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CustomerProfilesInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {customer_profiles.status} [opts.status] -\n   *          The verification status of the Customer-Profile resource\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.policySid] - The unique string of a policy.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CustomerProfilesInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {customer_profiles.status} [opts.status] -\n   *          The verification status of the Customer-Profile resource\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.policySid] - The unique string of a policy.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PolicySid': _.get(opts, 'policySid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CustomerProfilesInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CustomerProfilesListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CustomerProfilesPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a customer_profiles\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesList#\n   *\n   * @param {string} sid - The unique string that identifies the resource.\n   *\n   * @returns {Twilio.Trusthub.V1.CustomerProfilesContext}\n   */\n  /* jshint ignore:end */\n  CustomerProfilesListInstance.get = function get(sid) {\n    return new CustomerProfilesContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.CustomerProfilesList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CustomerProfilesListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CustomerProfilesListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CustomerProfilesListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesPage\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CustomerProfilesSolution} solution - Path solution\n *\n * @returns CustomerProfilesPage\n */\n/* jshint ignore:end */\nCustomerProfilesPage = function CustomerProfilesPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CustomerProfilesPage.prototype, Page.prototype);\nCustomerProfilesPage.prototype.constructor = CustomerProfilesPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CustomerProfilesInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.CustomerProfilesPage#\n *\n * @param {CustomerProfilesPayload} payload - Payload response from the API\n *\n * @returns CustomerProfilesInstance\n */\n/* jshint ignore:end */\nCustomerProfilesPage.prototype.getInstance = function getInstance(payload) {\n  return new CustomerProfilesInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCustomerProfilesPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesContext\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesInstance\n *\n * @property {string} sid - The unique string that identifies the resource.\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} policySid - The unique string of a policy.\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {customer_profiles.status} status -\n *          The verification status of the Customer-Profile resource\n * @property {Date} validUntil -\n *          The ISO 8601 date and time in GMT when the resource will be valid until.\n * @property {string} email - The email address\n * @property {string} statusCallback -\n *          The URL we call to inform your application of status changes.\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Customer-Profile resource\n * @property {string} links -\n *          The URLs of the Assigned Items of the Customer-Profile resource\n *\n * @param {V1} version - Version of the resource\n * @param {CustomerProfilesPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nCustomerProfilesInstance = function CustomerProfilesInstance(version, payload,\n    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.policySid = payload.policy_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.validUntil = deserialize.iso8601DateTime(payload.valid_until); // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CustomerProfilesInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CustomerProfilesContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CustomerProfilesInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.CustomerProfilesInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesInstance\n */\n/* jshint ignore:end */\nCustomerProfilesInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CustomerProfilesInstance\n *\n * @function update\n * @memberof Twilio.Trusthub.V1.CustomerProfilesInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {customer_profiles.status} [opts.status] -\n *          The verification status of the Customer-Profile resource\n * @param {string} [opts.statusCallback] -\n *          The URL we call to inform your application of status changes.\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.email] - The email address\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesInstance\n */\n/* jshint ignore:end */\nCustomerProfilesInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CustomerProfilesInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.CustomerProfilesInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesInstance\n */\n/* jshint ignore:end */\nCustomerProfilesInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the customerProfilesEntityAssignments\n *\n * @function customerProfilesEntityAssignments\n * @memberof Twilio.Trusthub.V1.CustomerProfilesInstance#\n *\n * @returns {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList}\n */\n/* jshint ignore:end */\nCustomerProfilesInstance.prototype.customerProfilesEntityAssignments = function\n    customerProfilesEntityAssignments() {\n  return this._proxy.customerProfilesEntityAssignments;\n};\n\n/* jshint ignore:start */\n/**\n * Access the customerProfilesEvaluations\n *\n * @function customerProfilesEvaluations\n * @memberof Twilio.Trusthub.V1.CustomerProfilesInstance#\n *\n * @returns {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList}\n */\n/* jshint ignore:end */\nCustomerProfilesInstance.prototype.customerProfilesEvaluations = function\n    customerProfilesEvaluations() {\n  return this._proxy.customerProfilesEvaluations;\n};\n\n/* jshint ignore:start */\n/**\n * Access the customerProfilesChannelEndpointAssignment\n *\n * @function customerProfilesChannelEndpointAssignment\n * @memberof Twilio.Trusthub.V1.CustomerProfilesInstance#\n *\n * @returns {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList}\n */\n/* jshint ignore:end */\nCustomerProfilesInstance.prototype.customerProfilesChannelEndpointAssignment =\n    function customerProfilesChannelEndpointAssignment() {\n  return this._proxy.customerProfilesChannelEndpointAssignment;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCustomerProfilesInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CustomerProfilesContext\n *\n * @constructor Twilio.Trusthub.V1.CustomerProfilesContext\n *\n * @property {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEntityAssignmentsList} customerProfilesEntityAssignments -\n *          customerProfilesEntityAssignments resource\n * @property {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesEvaluationsList} customerProfilesEvaluations -\n *          customerProfilesEvaluations resource\n * @property {Twilio.Trusthub.V1.CustomerProfilesContext.CustomerProfilesChannelEndpointAssignmentList} customerProfilesChannelEndpointAssignment -\n *          customerProfilesChannelEndpointAssignment resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nCustomerProfilesContext = function CustomerProfilesContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/CustomerProfiles/${sid}`;\n\n  // Dependents\n  this._customerProfilesEntityAssignments = undefined;\n  this._customerProfilesEvaluations = undefined;\n  this._customerProfilesChannelEndpointAssignment = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CustomerProfilesInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesInstance\n */\n/* jshint ignore:end */\nCustomerProfilesContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CustomerProfilesInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CustomerProfilesInstance\n *\n * @function update\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext#\n *\n * @param {object} [opts] - Options for request\n * @param {customer_profiles.status} [opts.status] -\n *          The verification status of the Customer-Profile resource\n * @param {string} [opts.statusCallback] -\n *          The URL we call to inform your application of status changes.\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.email] - The email address\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesInstance\n */\n/* jshint ignore:end */\nCustomerProfilesContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Status': _.get(opts, 'status'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Email': _.get(opts, 'email')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CustomerProfilesInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CustomerProfilesInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CustomerProfilesInstance\n */\n/* jshint ignore:end */\nCustomerProfilesContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(CustomerProfilesContext.prototype,\n  'customerProfilesEntityAssignments', {\n    get: function() {\n      if (!this._customerProfilesEntityAssignments) {\n        this._customerProfilesEntityAssignments = new CustomerProfilesEntityAssignmentsList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._customerProfilesEntityAssignments;\n    }\n});\n\nObject.defineProperty(CustomerProfilesContext.prototype,\n  'customerProfilesEvaluations', {\n    get: function() {\n      if (!this._customerProfilesEvaluations) {\n        this._customerProfilesEvaluations = new CustomerProfilesEvaluationsList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._customerProfilesEvaluations;\n    }\n});\n\nObject.defineProperty(CustomerProfilesContext.prototype,\n  'customerProfilesChannelEndpointAssignment', {\n    get: function() {\n      if (!this._customerProfilesChannelEndpointAssignment) {\n        this._customerProfilesChannelEndpointAssignment = new CustomerProfilesChannelEndpointAssignmentList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._customerProfilesChannelEndpointAssignment;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.CustomerProfilesContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCustomerProfilesContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCustomerProfilesContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CustomerProfilesList: CustomerProfilesList,\n  CustomerProfilesPage: CustomerProfilesPage,\n  CustomerProfilesInstance: CustomerProfilesInstance,\n  CustomerProfilesContext: CustomerProfilesContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar EndUserList;\nvar EndUserPage;\nvar EndUserInstance;\nvar EndUserContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserList\n *\n * @constructor Twilio.Trusthub.V1.EndUserList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nEndUserList = function EndUserList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function endUsers\n   * @memberof Twilio.Trusthub.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.EndUserContext}\n   */\n  /* jshint ignore:end */\n  function EndUserListInstance(sid) {\n    return EndUserListInstance.get(sid);\n  }\n\n  EndUserListInstance._version = version;\n  // Path Solution\n  EndUserListInstance._solution = {};\n  EndUserListInstance._uri = `/EndUsers`;\n  /* jshint ignore:start */\n  /**\n   * create a EndUserInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.EndUserList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the resource\n   * @param {string} opts.type - The type of end user of the Bundle resource\n   * @param {object} [opts.attributes] -\n   *          The set of parameters that compose the End User resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed EndUserInstance\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Attributes': serialize.object(_.get(opts, 'attributes'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams EndUserInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.EndUserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EndUserInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.EndUserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EndUserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.EndUserList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EndUserInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.EndUserList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a end_user\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.EndUserList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trusthub.V1.EndUserContext}\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.get = function get(sid) {\n    return new EndUserContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.EndUserList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EndUserListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EndUserListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EndUserListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserPage\n *\n * @constructor Twilio.Trusthub.V1.EndUserPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EndUserSolution} solution - Path solution\n *\n * @returns EndUserPage\n */\n/* jshint ignore:end */\nEndUserPage = function EndUserPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EndUserPage.prototype, Page.prototype);\nEndUserPage.prototype.constructor = EndUserPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EndUserInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.EndUserPage#\n *\n * @param {EndUserPayload} payload - Payload response from the API\n *\n * @returns EndUserInstance\n */\n/* jshint ignore:end */\nEndUserPage.prototype.getInstance = function getInstance(payload) {\n  return new EndUserInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.EndUserPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEndUserPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserContext\n *\n * @constructor Twilio.Trusthub.V1.EndUserInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} type - The type of end user of the Bundle resource\n * @property {object} attributes -\n *          The set of parameters that compose the End Users resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the End User resource\n *\n * @param {V1} version - Version of the resource\n * @param {EndUserPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nEndUserInstance = function EndUserInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(EndUserInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EndUserContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EndUserInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.EndUserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a EndUserInstance\n *\n * @function update\n * @memberof Twilio.Trusthub.V1.EndUserInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {object} [opts.attributes] -\n *          The set of parameters that compose the End User resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a EndUserInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.EndUserInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.EndUserInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEndUserInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserContext\n *\n * @constructor Twilio.Trusthub.V1.EndUserContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nEndUserContext = function EndUserContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/EndUsers/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EndUserInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.EndUserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EndUserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a EndUserInstance\n *\n * @function update\n * @memberof Twilio.Trusthub.V1.EndUserContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {object} [opts.attributes] -\n *          The set of parameters that compose the End User resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Attributes': serialize.object(_.get(opts, 'attributes'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EndUserInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a EndUserInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.EndUserContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserInstance\n */\n/* jshint ignore:end */\nEndUserContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.EndUserContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEndUserContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EndUserList: EndUserList,\n  EndUserPage: EndUserPage,\n  EndUserInstance: EndUserInstance,\n  EndUserContext: EndUserContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar EndUserTypeList;\nvar EndUserTypePage;\nvar EndUserTypeInstance;\nvar EndUserTypeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserTypeList\n *\n * @constructor Twilio.Trusthub.V1.EndUserTypeList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nEndUserTypeList = function EndUserTypeList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function endUserTypes\n   * @memberof Twilio.Trusthub.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.EndUserTypeContext}\n   */\n  /* jshint ignore:end */\n  function EndUserTypeListInstance(sid) {\n    return EndUserTypeListInstance.get(sid);\n  }\n\n  EndUserTypeListInstance._version = version;\n  // Path Solution\n  EndUserTypeListInstance._solution = {};\n  EndUserTypeListInstance._uri = `/EndUserTypes`;\n  /* jshint ignore:start */\n  /**\n   * Streams EndUserTypeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.EndUserTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EndUserTypeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.EndUserTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EndUserTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.EndUserTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EndUserTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.EndUserTypeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EndUserTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a end_user_type\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.EndUserTypeList#\n   *\n   * @param {string} sid -\n   *          The unique string that identifies the End-User Type resource\n   *\n   * @returns {Twilio.Trusthub.V1.EndUserTypeContext}\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.get = function get(sid) {\n    return new EndUserTypeContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.EndUserTypeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EndUserTypeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EndUserTypeListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EndUserTypeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserTypePage\n *\n * @constructor Twilio.Trusthub.V1.EndUserTypePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EndUserTypeSolution} solution - Path solution\n *\n * @returns EndUserTypePage\n */\n/* jshint ignore:end */\nEndUserTypePage = function EndUserTypePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EndUserTypePage.prototype, Page.prototype);\nEndUserTypePage.prototype.constructor = EndUserTypePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EndUserTypeInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.EndUserTypePage#\n *\n * @param {EndUserTypePayload} payload - Payload response from the API\n *\n * @returns EndUserTypeInstance\n */\n/* jshint ignore:end */\nEndUserTypePage.prototype.getInstance = function getInstance(payload) {\n  return new EndUserTypeInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.EndUserTypePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserTypePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEndUserTypePage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserTypeContext\n *\n * @constructor Twilio.Trusthub.V1.EndUserTypeInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the End-User Type resource\n * @property {string} friendlyName -\n *          A human-readable description of the End-User Type resource\n * @property {string} machineName -\n *          A machine-readable description of the End-User Type resource\n * @property {object} fields - The required information for creating an End-User.\n * @property {string} url - The absolute URL of the End-User Type resource\n *\n * @param {V1} version - Version of the resource\n * @param {EndUserTypePayload} payload - The instance payload\n * @param {sid_like} sid -\n *          The unique string that identifies the End-User Type resource\n */\n/* jshint ignore:end */\nEndUserTypeInstance = function EndUserTypeInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.machineName = payload.machine_name; // jshint ignore:line\n  this.fields = payload.fields; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(EndUserTypeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EndUserTypeContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EndUserTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.EndUserTypeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserTypeInstance\n */\n/* jshint ignore:end */\nEndUserTypeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.EndUserTypeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserTypeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEndUserTypeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EndUserTypeContext\n *\n * @constructor Twilio.Trusthub.V1.EndUserTypeContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid -\n *          The unique string that identifies the End-User Type resource\n */\n/* jshint ignore:end */\nEndUserTypeContext = function EndUserTypeContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/EndUserTypes/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EndUserTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.EndUserTypeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EndUserTypeInstance\n */\n/* jshint ignore:end */\nEndUserTypeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EndUserTypeInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.EndUserTypeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEndUserTypeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEndUserTypeContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EndUserTypeList: EndUserTypeList,\n  EndUserTypePage: EndUserTypePage,\n  EndUserTypeInstance: EndUserTypeInstance,\n  EndUserTypeContext: EndUserTypeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar PoliciesList;\nvar PoliciesPage;\nvar PoliciesInstance;\nvar PoliciesContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PoliciesList\n *\n * @constructor Twilio.Trusthub.V1.PoliciesList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nPoliciesList = function PoliciesList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function policies\n   * @memberof Twilio.Trusthub.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.PoliciesContext}\n   */\n  /* jshint ignore:end */\n  function PoliciesListInstance(sid) {\n    return PoliciesListInstance.get(sid);\n  }\n\n  PoliciesListInstance._version = version;\n  // Path Solution\n  PoliciesListInstance._solution = {};\n  PoliciesListInstance._uri = `/Policies`;\n  /* jshint ignore:start */\n  /**\n   * Streams PoliciesInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.PoliciesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  PoliciesListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists PoliciesInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.PoliciesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PoliciesListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of PoliciesInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.PoliciesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PoliciesListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PoliciesPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of PoliciesInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.PoliciesList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PoliciesListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PoliciesPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a policies\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.PoliciesList#\n   *\n   * @param {string} sid - The unique string that identifies the Policy resource\n   *\n   * @returns {Twilio.Trusthub.V1.PoliciesContext}\n   */\n  /* jshint ignore:end */\n  PoliciesListInstance.get = function get(sid) {\n    return new PoliciesContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.PoliciesList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PoliciesListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PoliciesListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PoliciesListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PoliciesPage\n *\n * @constructor Twilio.Trusthub.V1.PoliciesPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PoliciesSolution} solution - Path solution\n *\n * @returns PoliciesPage\n */\n/* jshint ignore:end */\nPoliciesPage = function PoliciesPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PoliciesPage.prototype, Page.prototype);\nPoliciesPage.prototype.constructor = PoliciesPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PoliciesInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.PoliciesPage#\n *\n * @param {PoliciesPayload} payload - Payload response from the API\n *\n * @returns PoliciesInstance\n */\n/* jshint ignore:end */\nPoliciesPage.prototype.getInstance = function getInstance(payload) {\n  return new PoliciesInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.PoliciesPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPoliciesPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPoliciesPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PoliciesContext\n *\n * @constructor Twilio.Trusthub.V1.PoliciesInstance\n *\n * @property {string} sid - The unique string that identifies the Policy resource\n * @property {string} friendlyName -\n *          A human-readable description of the Policy resource\n * @property {object} requirements -\n *          The sid of a Policy object that dictates requirements\n * @property {string} url - The absolute URL of the Policy resource\n *\n * @param {V1} version - Version of the resource\n * @param {PoliciesPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the Policy resource\n */\n/* jshint ignore:end */\nPoliciesInstance = function PoliciesInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.requirements = payload.requirements; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(PoliciesInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PoliciesContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a PoliciesInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.PoliciesInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PoliciesInstance\n */\n/* jshint ignore:end */\nPoliciesInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.PoliciesInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPoliciesInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPoliciesInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PoliciesContext\n *\n * @constructor Twilio.Trusthub.V1.PoliciesContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the Policy resource\n */\n/* jshint ignore:end */\nPoliciesContext = function PoliciesContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Policies/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PoliciesInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.PoliciesContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PoliciesInstance\n */\n/* jshint ignore:end */\nPoliciesContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PoliciesInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.PoliciesContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPoliciesContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPoliciesContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PoliciesList: PoliciesList,\n  PoliciesPage: PoliciesPage,\n  PoliciesInstance: PoliciesInstance,\n  PoliciesContext: PoliciesContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SupportingDocumentList;\nvar SupportingDocumentPage;\nvar SupportingDocumentInstance;\nvar SupportingDocumentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentList\n *\n * @constructor Twilio.Trusthub.V1.SupportingDocumentList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSupportingDocumentList = function SupportingDocumentList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function supportingDocuments\n   * @memberof Twilio.Trusthub.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.SupportingDocumentContext}\n   */\n  /* jshint ignore:end */\n  function SupportingDocumentListInstance(sid) {\n    return SupportingDocumentListInstance.get(sid);\n  }\n\n  SupportingDocumentListInstance._version = version;\n  // Path Solution\n  SupportingDocumentListInstance._solution = {};\n  SupportingDocumentListInstance._uri = `/SupportingDocuments`;\n  /* jshint ignore:start */\n  /**\n   * create a SupportingDocumentInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the resource\n   * @param {string} opts.type - The type of the Supporting Document\n   * @param {object} [opts.attributes] -\n   *          The set of parameters that compose the Supporting Documents resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SupportingDocumentInstance\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['type'])) {\n      throw new Error('Required parameter \"opts[\\'type\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Type': _.get(opts, 'type'),\n      'Attributes': serialize.object(_.get(opts, 'attributes'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SupportingDocumentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SupportingDocumentInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SupportingDocumentInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SupportingDocumentInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a supporting_document\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trusthub.V1.SupportingDocumentContext}\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.get = function get(sid) {\n    return new SupportingDocumentContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SupportingDocumentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SupportingDocumentListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SupportingDocumentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentPage\n *\n * @constructor Twilio.Trusthub.V1.SupportingDocumentPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SupportingDocumentSolution} solution - Path solution\n *\n * @returns SupportingDocumentPage\n */\n/* jshint ignore:end */\nSupportingDocumentPage = function SupportingDocumentPage(version, response,\n                                                          solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SupportingDocumentPage.prototype, Page.prototype);\nSupportingDocumentPage.prototype.constructor = SupportingDocumentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SupportingDocumentInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.SupportingDocumentPage#\n *\n * @param {SupportingDocumentPayload} payload - Payload response from the API\n *\n * @returns SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentPage.prototype.getInstance = function getInstance(payload) {\n  return new SupportingDocumentInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.SupportingDocumentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSupportingDocumentPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentContext\n *\n * @constructor Twilio.Trusthub.V1.SupportingDocumentInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} mimeType - The image type of the file\n * @property {supporting_document.status} status -\n *          The verification status of the Supporting Document resource\n * @property {string} type - The type of the Supporting Document\n * @property {object} attributes -\n *          The set of parameters that compose the Supporting Documents resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Supporting Document resource\n *\n * @param {V1} version - Version of the resource\n * @param {SupportingDocumentPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSupportingDocumentInstance = function SupportingDocumentInstance(version,\n    payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.mimeType = payload.mime_type; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.attributes = payload.attributes; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SupportingDocumentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SupportingDocumentContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SupportingDocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.SupportingDocumentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SupportingDocumentInstance\n *\n * @function update\n * @memberof Twilio.Trusthub.V1.SupportingDocumentInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {object} [opts.attributes] -\n *          The set of parameters that compose the Supporting Document resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SupportingDocumentInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.SupportingDocumentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.SupportingDocumentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSupportingDocumentInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentContext\n *\n * @constructor Twilio.Trusthub.V1.SupportingDocumentContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSupportingDocumentContext = function SupportingDocumentContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/SupportingDocuments/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SupportingDocumentInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.SupportingDocumentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SupportingDocumentInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SupportingDocumentInstance\n *\n * @function update\n * @memberof Twilio.Trusthub.V1.SupportingDocumentContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {object} [opts.attributes] -\n *          The set of parameters that compose the Supporting Document resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Attributes': serialize.object(_.get(opts, 'attributes'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SupportingDocumentInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SupportingDocumentInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.SupportingDocumentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentInstance\n */\n/* jshint ignore:end */\nSupportingDocumentContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.SupportingDocumentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSupportingDocumentContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SupportingDocumentList: SupportingDocumentList,\n  SupportingDocumentPage: SupportingDocumentPage,\n  SupportingDocumentInstance: SupportingDocumentInstance,\n  SupportingDocumentContext: SupportingDocumentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SupportingDocumentTypeList;\nvar SupportingDocumentTypePage;\nvar SupportingDocumentTypeInstance;\nvar SupportingDocumentTypeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentTypeList\n *\n * @constructor Twilio.Trusthub.V1.SupportingDocumentTypeList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSupportingDocumentTypeList = function SupportingDocumentTypeList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function supportingDocumentTypes\n   * @memberof Twilio.Trusthub.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.SupportingDocumentTypeContext}\n   */\n  /* jshint ignore:end */\n  function SupportingDocumentTypeListInstance(sid) {\n    return SupportingDocumentTypeListInstance.get(sid);\n  }\n\n  SupportingDocumentTypeListInstance._version = version;\n  // Path Solution\n  SupportingDocumentTypeListInstance._solution = {};\n  SupportingDocumentTypeListInstance._uri = `/SupportingDocumentTypes`;\n  /* jshint ignore:start */\n  /**\n   * Streams SupportingDocumentTypeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SupportingDocumentTypeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SupportingDocumentTypeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SupportingDocumentTypeInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SupportingDocumentTypePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a supporting_document_type\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeList#\n   *\n   * @param {string} sid -\n   *          The unique string that identifies the Supporting Document Type resource\n   *\n   * @returns {Twilio.Trusthub.V1.SupportingDocumentTypeContext}\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.get = function get(sid) {\n    return new SupportingDocumentTypeContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SupportingDocumentTypeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SupportingDocumentTypeListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SupportingDocumentTypeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentTypePage\n *\n * @constructor Twilio.Trusthub.V1.SupportingDocumentTypePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SupportingDocumentTypeSolution} solution - Path solution\n *\n * @returns SupportingDocumentTypePage\n */\n/* jshint ignore:end */\nSupportingDocumentTypePage = function SupportingDocumentTypePage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SupportingDocumentTypePage.prototype, Page.prototype);\nSupportingDocumentTypePage.prototype.constructor = SupportingDocumentTypePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SupportingDocumentTypeInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.SupportingDocumentTypePage#\n *\n * @param {SupportingDocumentTypePayload} payload - Payload response from the API\n *\n * @returns SupportingDocumentTypeInstance\n */\n/* jshint ignore:end */\nSupportingDocumentTypePage.prototype.getInstance = function getInstance(payload)\n    {\n  return new SupportingDocumentTypeInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.SupportingDocumentTypePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentTypePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSupportingDocumentTypePage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentTypeContext\n *\n * @constructor Twilio.Trusthub.V1.SupportingDocumentTypeInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Supporting Document Type resource\n * @property {string} friendlyName -\n *          A human-readable description of the Supporting Document Type resource\n * @property {string} machineName -\n *          The machine-readable description of the Supporting Document Type resource\n * @property {object} fields -\n *          The required information for creating a Supporting Document\n * @property {string} url -\n *          The absolute URL of the Supporting Document Type resource\n *\n * @param {V1} version - Version of the resource\n * @param {SupportingDocumentTypePayload} payload - The instance payload\n * @param {sid_like} sid -\n *          The unique string that identifies the Supporting Document Type resource\n */\n/* jshint ignore:end */\nSupportingDocumentTypeInstance = function\n    SupportingDocumentTypeInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.machineName = payload.machine_name; // jshint ignore:line\n  this.fields = payload.fields; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SupportingDocumentTypeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SupportingDocumentTypeContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SupportingDocumentTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentTypeInstance\n */\n/* jshint ignore:end */\nSupportingDocumentTypeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentTypeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSupportingDocumentTypeInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SupportingDocumentTypeContext\n *\n * @constructor Twilio.Trusthub.V1.SupportingDocumentTypeContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid -\n *          The unique string that identifies the Supporting Document Type resource\n */\n/* jshint ignore:end */\nSupportingDocumentTypeContext = function SupportingDocumentTypeContext(version,\n    sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/SupportingDocumentTypes/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SupportingDocumentTypeInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SupportingDocumentTypeInstance\n */\n/* jshint ignore:end */\nSupportingDocumentTypeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SupportingDocumentTypeInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.SupportingDocumentTypeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSupportingDocumentTypeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSupportingDocumentTypeContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SupportingDocumentTypeList: SupportingDocumentTypeList,\n  SupportingDocumentTypePage: SupportingDocumentTypePage,\n  SupportingDocumentTypeInstance: SupportingDocumentTypeInstance,\n  SupportingDocumentTypeContext: SupportingDocumentTypeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TrustProductsChannelEndpointAssignmentList;\nvar TrustProductsChannelEndpointAssignmentPage;\nvar TrustProductsChannelEndpointAssignmentInstance;\nvar TrustProductsChannelEndpointAssignmentContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsChannelEndpointAssignmentList\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n * @param {string} trustProductSid -\n *          The unique string that identifies the CustomerProfile resource.\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentList = function\n    TrustProductsChannelEndpointAssignmentList(version, trustProductSid) {\n  /* jshint ignore:start */\n  /**\n   * @function trustProductsChannelEndpointAssignment\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentContext}\n   */\n  /* jshint ignore:end */\n  function TrustProductsChannelEndpointAssignmentListInstance(sid) {\n    return TrustProductsChannelEndpointAssignmentListInstance.get(sid);\n  }\n\n  TrustProductsChannelEndpointAssignmentListInstance._version = version;\n  // Path Solution\n  TrustProductsChannelEndpointAssignmentListInstance._solution = {trustProductSid: trustProductSid};\n  TrustProductsChannelEndpointAssignmentListInstance._uri = `/TrustProducts/${trustProductSid}/ChannelEndpointAssignments`;\n  /* jshint ignore:start */\n  /**\n   * create a TrustProductsChannelEndpointAssignmentInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.channelEndpointType - The type of channel endpoint\n   * @param {string} opts.channelEndpointSid - The sid of an channel endpoint\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TrustProductsChannelEndpointAssignmentInstance\n   */\n  /* jshint ignore:end */\n  TrustProductsChannelEndpointAssignmentListInstance.create = function\n      create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['channelEndpointType'])) {\n      throw new Error('Required parameter \"opts[\\'channelEndpointType\\']\" missing.');\n    }\n    if (_.isUndefined(opts['channelEndpointSid'])) {\n      throw new Error('Required parameter \"opts[\\'channelEndpointSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ChannelEndpointType': _.get(opts, 'channelEndpointType'),\n      'ChannelEndpointSid': _.get(opts, 'channelEndpointSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsChannelEndpointAssignmentInstance(\n        this._version,\n        payload,\n        this._solution.trustProductSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams TrustProductsChannelEndpointAssignmentInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.channelEndpointSid] - The sid of an channel endpoint\n   * @param {string} [opts.channelEndpointSids] -\n   *          comma separated list of channel endpoint sids\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TrustProductsChannelEndpointAssignmentListInstance.each = function each(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TrustProductsChannelEndpointAssignmentInstance records from the API as a\n   * list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.channelEndpointSid] - The sid of an channel endpoint\n   * @param {string} [opts.channelEndpointSids] -\n   *          comma separated list of channel endpoint sids\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsChannelEndpointAssignmentListInstance.list = function list(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TrustProductsChannelEndpointAssignmentInstance records\n   * from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.channelEndpointSid] - The sid of an channel endpoint\n   * @param {string} [opts.channelEndpointSids] -\n   *          comma separated list of channel endpoint sids\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsChannelEndpointAssignmentListInstance.page = function page(opts,\n      callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'ChannelEndpointSid': _.get(opts, 'channelEndpointSid'),\n      'ChannelEndpointSids': _.get(opts, 'channelEndpointSids'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsChannelEndpointAssignmentPage(\n        this._version,\n        payload,\n        this._solution\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TrustProductsChannelEndpointAssignmentInstance\n   * records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsChannelEndpointAssignmentListInstance.getPage = function\n      getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsChannelEndpointAssignmentPage(\n        this._version,\n        payload,\n        this._solution\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a trust_products_channel_endpoint_assignment\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentContext}\n   */\n  /* jshint ignore:end */\n  TrustProductsChannelEndpointAssignmentListInstance.get = function get(sid) {\n    return new TrustProductsChannelEndpointAssignmentContext(\n      this._version,\n      this._solution.trustProductSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TrustProductsChannelEndpointAssignmentListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TrustProductsChannelEndpointAssignmentListInstance[util.inspect.custom] =\n      function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TrustProductsChannelEndpointAssignmentListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsChannelEndpointAssignmentPage\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TrustProductsChannelEndpointAssignmentSolution} solution - Path solution\n *\n * @returns TrustProductsChannelEndpointAssignmentPage\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentPage = function\n    TrustProductsChannelEndpointAssignmentPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TrustProductsChannelEndpointAssignmentPage.prototype, Page.prototype);\nTrustProductsChannelEndpointAssignmentPage.prototype.constructor = TrustProductsChannelEndpointAssignmentPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TrustProductsChannelEndpointAssignmentInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentPage#\n *\n * @param {TrustProductsChannelEndpointAssignmentPayload} payload -\n *          Payload response from the API\n *\n * @returns TrustProductsChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new TrustProductsChannelEndpointAssignmentInstance(\n    this._version,\n    payload,\n    this._solution.trustProductSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentPage.prototype.toJSON = function toJSON()\n    {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrustProductsChannelEndpointAssignmentPage.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsChannelEndpointAssignmentContext\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} trustProductSid -\n *          The unique string that identifies the CustomerProfile resource.\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} channelEndpointType - The type of channel endpoint\n * @property {string} channelEndpointSid - The sid of an channel endpoint\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {string} url - The absolute URL of the Identity resource\n *\n * @param {V1} version - Version of the resource\n * @param {TrustProductsChannelEndpointAssignmentPayload} payload -\n *          The instance payload\n * @param {sid} trustProductSid -\n *          The unique string that identifies the CustomerProfile resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentInstance = function\n    TrustProductsChannelEndpointAssignmentInstance(version, payload,\n    trustProductSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.trustProductSid = payload.trust_product_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.channelEndpointType = payload.channel_endpoint_type; // jshint ignore:line\n  this.channelEndpointSid = payload.channel_endpoint_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {trustProductSid: trustProductSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TrustProductsChannelEndpointAssignmentInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TrustProductsChannelEndpointAssignmentContext(\n          this._version,\n          this._solution.trustProductSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TrustProductsChannelEndpointAssignmentInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentInstance.prototype.fetch = function\n    fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TrustProductsChannelEndpointAssignmentInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentInstance.prototype.remove = function\n    remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentInstance.prototype.toJSON = function\n    toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrustProductsChannelEndpointAssignmentInstance.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsChannelEndpointAssignmentContext\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} trustProductSid - The unique string that identifies the resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentContext = function\n    TrustProductsChannelEndpointAssignmentContext(version, trustProductSid, sid)\n    {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {trustProductSid: trustProductSid, sid: sid, };\n  this._uri = `/TrustProducts/${trustProductSid}/ChannelEndpointAssignments/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TrustProductsChannelEndpointAssignmentInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentContext.prototype.fetch = function\n    fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TrustProductsChannelEndpointAssignmentInstance(\n      this._version,\n      payload,\n      this._solution.trustProductSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TrustProductsChannelEndpointAssignmentInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsChannelEndpointAssignmentInstance\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentContext.prototype.remove = function\n    remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsChannelEndpointAssignmentContext.prototype.toJSON = function\n    toJSON() {\n  return this._solution;\n};\n\nTrustProductsChannelEndpointAssignmentContext.prototype[util.inspect.custom] =\n    function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TrustProductsChannelEndpointAssignmentList: TrustProductsChannelEndpointAssignmentList,\n  TrustProductsChannelEndpointAssignmentPage: TrustProductsChannelEndpointAssignmentPage,\n  TrustProductsChannelEndpointAssignmentInstance: TrustProductsChannelEndpointAssignmentInstance,\n  TrustProductsChannelEndpointAssignmentContext: TrustProductsChannelEndpointAssignmentContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TrustProductsEntityAssignmentsList;\nvar TrustProductsEntityAssignmentsPage;\nvar TrustProductsEntityAssignmentsInstance;\nvar TrustProductsEntityAssignmentsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsEntityAssignmentsList\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n * @param {string} trustProductSid -\n *          The unique string that identifies the TrustProduct resource.\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsList = function\n    TrustProductsEntityAssignmentsList(version, trustProductSid) {\n  /* jshint ignore:start */\n  /**\n   * @function trustProductsEntityAssignments\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsContext}\n   */\n  /* jshint ignore:end */\n  function TrustProductsEntityAssignmentsListInstance(sid) {\n    return TrustProductsEntityAssignmentsListInstance.get(sid);\n  }\n\n  TrustProductsEntityAssignmentsListInstance._version = version;\n  // Path Solution\n  TrustProductsEntityAssignmentsListInstance._solution = {trustProductSid: trustProductSid};\n  TrustProductsEntityAssignmentsListInstance._uri = `/TrustProducts/${trustProductSid}/EntityAssignments`;\n  /* jshint ignore:start */\n  /**\n   * create a TrustProductsEntityAssignmentsInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.objectSid - The sid of an object bag\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TrustProductsEntityAssignmentsInstance\n   */\n  /* jshint ignore:end */\n  TrustProductsEntityAssignmentsListInstance.create = function create(opts,\n      callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['objectSid'])) {\n      throw new Error('Required parameter \"opts[\\'objectSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'ObjectSid': _.get(opts, 'objectSid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsEntityAssignmentsInstance(\n        this._version,\n        payload,\n        this._solution.trustProductSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams TrustProductsEntityAssignmentsInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TrustProductsEntityAssignmentsListInstance.each = function each(opts, callback)\n      {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TrustProductsEntityAssignmentsInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsEntityAssignmentsListInstance.list = function list(opts, callback)\n      {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TrustProductsEntityAssignmentsInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsEntityAssignmentsListInstance.page = function page(opts, callback)\n      {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsEntityAssignmentsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TrustProductsEntityAssignmentsInstance records\n   * from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsEntityAssignmentsListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsEntityAssignmentsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a trust_products_entity_assignments\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsContext}\n   */\n  /* jshint ignore:end */\n  TrustProductsEntityAssignmentsListInstance.get = function get(sid) {\n    return new TrustProductsEntityAssignmentsContext(\n      this._version,\n      this._solution.trustProductSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TrustProductsEntityAssignmentsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TrustProductsEntityAssignmentsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TrustProductsEntityAssignmentsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsEntityAssignmentsPage\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TrustProductsEntityAssignmentsSolution} solution - Path solution\n *\n * @returns TrustProductsEntityAssignmentsPage\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsPage = function\n    TrustProductsEntityAssignmentsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TrustProductsEntityAssignmentsPage.prototype, Page.prototype);\nTrustProductsEntityAssignmentsPage.prototype.constructor = TrustProductsEntityAssignmentsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TrustProductsEntityAssignmentsInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsPage#\n *\n * @param {TrustProductsEntityAssignmentsPayload} payload -\n *          Payload response from the API\n *\n * @returns TrustProductsEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new TrustProductsEntityAssignmentsInstance(\n    this._version,\n    payload,\n    this._solution.trustProductSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrustProductsEntityAssignmentsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsEntityAssignmentsContext\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} trustProductSid -\n *          The unique string that identifies the TrustProduct resource.\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} objectSid - The sid of an object bag\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {string} url - The absolute URL of the Identity resource\n *\n * @param {V1} version - Version of the resource\n * @param {TrustProductsEntityAssignmentsPayload} payload - The instance payload\n * @param {sid} trustProductSid -\n *          The unique string that identifies the TrustProduct resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsInstance = function\n    TrustProductsEntityAssignmentsInstance(version, payload, trustProductSid,\n    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.trustProductSid = payload.trust_product_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.objectSid = payload.object_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {trustProductSid: trustProductSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TrustProductsEntityAssignmentsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TrustProductsEntityAssignmentsContext(\n          this._version,\n          this._solution.trustProductSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TrustProductsEntityAssignmentsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsInstance.prototype.fetch = function\n    fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TrustProductsEntityAssignmentsInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsInstance.prototype.remove = function\n    remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrustProductsEntityAssignmentsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsEntityAssignmentsContext\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} trustProductSid - The unique string that identifies the resource.\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsContext = function\n    TrustProductsEntityAssignmentsContext(version, trustProductSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {trustProductSid: trustProductSid, sid: sid, };\n  this._uri = `/TrustProducts/${trustProductSid}/EntityAssignments/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TrustProductsEntityAssignmentsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsContext.prototype.fetch = function fetch(callback)\n    {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TrustProductsEntityAssignmentsInstance(\n      this._version,\n      payload,\n      this._solution.trustProductSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TrustProductsEntityAssignmentsInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsEntityAssignmentsInstance\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsContext.prototype.remove = function\n    remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsEntityAssignmentsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTrustProductsEntityAssignmentsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TrustProductsEntityAssignmentsList: TrustProductsEntityAssignmentsList,\n  TrustProductsEntityAssignmentsPage: TrustProductsEntityAssignmentsPage,\n  TrustProductsEntityAssignmentsInstance: TrustProductsEntityAssignmentsInstance,\n  TrustProductsEntityAssignmentsContext: TrustProductsEntityAssignmentsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar TrustProductsEvaluationsList;\nvar TrustProductsEvaluationsPage;\nvar TrustProductsEvaluationsInstance;\nvar TrustProductsEvaluationsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsEvaluationsList\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n * @param {string} trustProductSid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsList = function TrustProductsEvaluationsList(version,\n    trustProductSid) {\n  /* jshint ignore:start */\n  /**\n   * @function trustProductsEvaluations\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsContext}\n   */\n  /* jshint ignore:end */\n  function TrustProductsEvaluationsListInstance(sid) {\n    return TrustProductsEvaluationsListInstance.get(sid);\n  }\n\n  TrustProductsEvaluationsListInstance._version = version;\n  // Path Solution\n  TrustProductsEvaluationsListInstance._solution = {trustProductSid: trustProductSid};\n  TrustProductsEvaluationsListInstance._uri = `/TrustProducts/${trustProductSid}/Evaluations`;\n  /* jshint ignore:start */\n  /**\n   * create a TrustProductsEvaluationsInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.policySid - The unique string of a policy\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TrustProductsEvaluationsInstance\n   */\n  /* jshint ignore:end */\n  TrustProductsEvaluationsListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['policySid'])) {\n      throw new Error('Required parameter \"opts[\\'policySid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'PolicySid': _.get(opts, 'policySid')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsEvaluationsInstance(\n        this._version,\n        payload,\n        this._solution.trustProductSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams TrustProductsEvaluationsInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TrustProductsEvaluationsListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TrustProductsEvaluationsInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsEvaluationsListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TrustProductsEvaluationsInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsEvaluationsListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsEvaluationsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TrustProductsEvaluationsInstance records from\n   * the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsEvaluationsListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsEvaluationsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a trust_products_evaluations\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList#\n   *\n   * @param {string} sid - The unique string that identifies the Evaluation resource\n   *\n   * @returns {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsContext}\n   */\n  /* jshint ignore:end */\n  TrustProductsEvaluationsListInstance.get = function get(sid) {\n    return new TrustProductsEvaluationsContext(this._version, this._solution.trustProductSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TrustProductsEvaluationsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TrustProductsEvaluationsListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TrustProductsEvaluationsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsEvaluationsPage\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TrustProductsEvaluationsSolution} solution - Path solution\n *\n * @returns TrustProductsEvaluationsPage\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsPage = function TrustProductsEvaluationsPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TrustProductsEvaluationsPage.prototype, Page.prototype);\nTrustProductsEvaluationsPage.prototype.constructor = TrustProductsEvaluationsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TrustProductsEvaluationsInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsPage#\n *\n * @param {TrustProductsEvaluationsPayload} payload - Payload response from the API\n *\n * @returns TrustProductsEvaluationsInstance\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new TrustProductsEvaluationsInstance(this._version, payload, this._solution.trustProductSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrustProductsEvaluationsPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsEvaluationsContext\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsInstance\n *\n * @property {string} sid -\n *          The unique string that identifies the Evaluation resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} policySid - The unique string of a policy\n * @property {string} trustProductSid -\n *          The unique string that identifies the resource\n * @property {trust_products_evaluations.status} status -\n *          The compliance status of the Evaluation resource\n * @property {object} results - The results of the Evaluation resource\n * @property {Date} dateCreated - The date_created\n * @property {string} url - The url\n *\n * @param {V1} version - Version of the resource\n * @param {TrustProductsEvaluationsPayload} payload - The instance payload\n * @param {sid} trustProductSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies the Evaluation resource\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsInstance = function\n    TrustProductsEvaluationsInstance(version, payload, trustProductSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.policySid = payload.policy_sid; // jshint ignore:line\n  this.trustProductSid = payload.trust_product_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.results = payload.results; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {trustProductSid: trustProductSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(TrustProductsEvaluationsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TrustProductsEvaluationsContext(\n          this._version,\n          this._solution.trustProductSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TrustProductsEvaluationsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsEvaluationsInstance\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrustProductsEvaluationsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsEvaluationsContext\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} trustProductSid - The unique string that identifies the resource\n * @param {sid} sid - The unique string that identifies the Evaluation resource\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsContext = function\n    TrustProductsEvaluationsContext(version, trustProductSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {trustProductSid: trustProductSid, sid: sid, };\n  this._uri = `/TrustProducts/${trustProductSid}/Evaluations/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TrustProductsEvaluationsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsEvaluationsInstance\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TrustProductsEvaluationsInstance(\n      this._version,\n      payload,\n      this._solution.trustProductSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsEvaluationsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTrustProductsEvaluationsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TrustProductsEvaluationsList: TrustProductsEvaluationsList,\n  TrustProductsEvaluationsPage: TrustProductsEvaluationsPage,\n  TrustProductsEvaluationsInstance: TrustProductsEvaluationsInstance,\n  TrustProductsEvaluationsContext: TrustProductsEvaluationsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar TrustProductsChannelEndpointAssignmentList = require(\n    './trustProducts/trustProductsChannelEndpointAssignment').TrustProductsChannelEndpointAssignmentList;\nvar TrustProductsEntityAssignmentsList = require(\n    './trustProducts/trustProductsEntityAssignments').TrustProductsEntityAssignmentsList;\nvar TrustProductsEvaluationsList = require(\n    './trustProducts/trustProductsEvaluations').TrustProductsEvaluationsList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar TrustProductsList;\nvar TrustProductsPage;\nvar TrustProductsInstance;\nvar TrustProductsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsList\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsList\n *\n * @param {Twilio.Trusthub.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nTrustProductsList = function TrustProductsList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function trustProducts\n   * @memberof Twilio.Trusthub.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Trusthub.V1.TrustProductsContext}\n   */\n  /* jshint ignore:end */\n  function TrustProductsListInstance(sid) {\n    return TrustProductsListInstance.get(sid);\n  }\n\n  TrustProductsListInstance._version = version;\n  // Path Solution\n  TrustProductsListInstance._solution = {};\n  TrustProductsListInstance._uri = `/TrustProducts`;\n  /* jshint ignore:start */\n  /**\n   * create a TrustProductsInstance\n   *\n   * @function create\n   * @memberof Twilio.Trusthub.V1.TrustProductsList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the resource\n   * @param {string} opts.email - The email address\n   * @param {string} opts.policySid - The unique string of a policy.\n   * @param {string} [opts.statusCallback] -\n   *          The URL we call to inform your application of status changes.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed TrustProductsInstance\n   */\n  /* jshint ignore:end */\n  TrustProductsListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['email'])) {\n      throw new Error('Required parameter \"opts[\\'email\\']\" missing.');\n    }\n    if (_.isUndefined(opts['policySid'])) {\n      throw new Error('Required parameter \"opts[\\'policySid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Email': _.get(opts, 'email'),\n      'PolicySid': _.get(opts, 'policySid'),\n      'StatusCallback': _.get(opts, 'statusCallback')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams TrustProductsInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Trusthub.V1.TrustProductsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {trust_products.status} [opts.status] -\n   *          The verification status of the Customer-Profile resource\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.policySid] - The unique string of a policy.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TrustProductsListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TrustProductsInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Trusthub.V1.TrustProductsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {trust_products.status} [opts.status] -\n   *          The verification status of the Customer-Profile resource\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.policySid] - The unique string of a policy.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TrustProductsInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Trusthub.V1.TrustProductsList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {trust_products.status} [opts.status] -\n   *          The verification status of the Customer-Profile resource\n   * @param {string} [opts.friendlyName] -\n   *          The string that you assigned to describe the resource\n   * @param {string} [opts.policySid] - The unique string of a policy.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PolicySid': _.get(opts, 'policySid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TrustProductsInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Trusthub.V1.TrustProductsList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TrustProductsListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TrustProductsPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a trust_products\n   *\n   * @function get\n   * @memberof Twilio.Trusthub.V1.TrustProductsList#\n   *\n   * @param {string} sid - The unique string that identifies the resource.\n   *\n   * @returns {Twilio.Trusthub.V1.TrustProductsContext}\n   */\n  /* jshint ignore:end */\n  TrustProductsListInstance.get = function get(sid) {\n    return new TrustProductsContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Trusthub.V1.TrustProductsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TrustProductsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TrustProductsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TrustProductsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsPage\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TrustProductsSolution} solution - Path solution\n *\n * @returns TrustProductsPage\n */\n/* jshint ignore:end */\nTrustProductsPage = function TrustProductsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TrustProductsPage.prototype, Page.prototype);\nTrustProductsPage.prototype.constructor = TrustProductsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TrustProductsInstance\n *\n * @function getInstance\n * @memberof Twilio.Trusthub.V1.TrustProductsPage#\n *\n * @param {TrustProductsPayload} payload - Payload response from the API\n *\n * @returns TrustProductsInstance\n */\n/* jshint ignore:end */\nTrustProductsPage.prototype.getInstance = function getInstance(payload) {\n  return new TrustProductsInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrustProductsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsContext\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsInstance\n *\n * @property {string} sid - The unique string that identifies the resource.\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} policySid - The unique string of a policy.\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {trust_products.status} status -\n *          The verification status of the Customer-Profile resource\n * @property {Date} validUntil -\n *          The ISO 8601 date and time in GMT when the resource will be valid until.\n * @property {string} email - The email address\n * @property {string} statusCallback -\n *          The URL we call to inform your application of status changes.\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Customer-Profile resource\n * @property {string} links -\n *          The URLs of the Assigned Items of the Customer-Profile resource\n *\n * @param {V1} version - Version of the resource\n * @param {TrustProductsPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nTrustProductsInstance = function TrustProductsInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.policySid = payload.policy_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.validUntil = deserialize.iso8601DateTime(payload.valid_until); // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(TrustProductsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new TrustProductsContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a TrustProductsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.TrustProductsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsInstance\n */\n/* jshint ignore:end */\nTrustProductsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a TrustProductsInstance\n *\n * @function update\n * @memberof Twilio.Trusthub.V1.TrustProductsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {trust_products.status} [opts.status] -\n *          The verification status of the Customer-Profile resource\n * @param {string} [opts.statusCallback] -\n *          The URL we call to inform your application of status changes.\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.email] - The email address\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsInstance\n */\n/* jshint ignore:end */\nTrustProductsInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a TrustProductsInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.TrustProductsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsInstance\n */\n/* jshint ignore:end */\nTrustProductsInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the trustProductsEntityAssignments\n *\n * @function trustProductsEntityAssignments\n * @memberof Twilio.Trusthub.V1.TrustProductsInstance#\n *\n * @returns {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList}\n */\n/* jshint ignore:end */\nTrustProductsInstance.prototype.trustProductsEntityAssignments = function\n    trustProductsEntityAssignments() {\n  return this._proxy.trustProductsEntityAssignments;\n};\n\n/* jshint ignore:start */\n/**\n * Access the trustProductsEvaluations\n *\n * @function trustProductsEvaluations\n * @memberof Twilio.Trusthub.V1.TrustProductsInstance#\n *\n * @returns {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList}\n */\n/* jshint ignore:end */\nTrustProductsInstance.prototype.trustProductsEvaluations = function\n    trustProductsEvaluations() {\n  return this._proxy.trustProductsEvaluations;\n};\n\n/* jshint ignore:start */\n/**\n * Access the trustProductsChannelEndpointAssignment\n *\n * @function trustProductsChannelEndpointAssignment\n * @memberof Twilio.Trusthub.V1.TrustProductsInstance#\n *\n * @returns {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList}\n */\n/* jshint ignore:end */\nTrustProductsInstance.prototype.trustProductsChannelEndpointAssignment =\n    function trustProductsChannelEndpointAssignment() {\n  return this._proxy.trustProductsChannelEndpointAssignment;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTrustProductsInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TrustProductsContext\n *\n * @constructor Twilio.Trusthub.V1.TrustProductsContext\n *\n * @property {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEntityAssignmentsList} trustProductsEntityAssignments -\n *          trustProductsEntityAssignments resource\n * @property {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsEvaluationsList} trustProductsEvaluations -\n *          trustProductsEvaluations resource\n * @property {Twilio.Trusthub.V1.TrustProductsContext.TrustProductsChannelEndpointAssignmentList} trustProductsChannelEndpointAssignment -\n *          trustProductsChannelEndpointAssignment resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource.\n */\n/* jshint ignore:end */\nTrustProductsContext = function TrustProductsContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/TrustProducts/${sid}`;\n\n  // Dependents\n  this._trustProductsEntityAssignments = undefined;\n  this._trustProductsEvaluations = undefined;\n  this._trustProductsChannelEndpointAssignment = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a TrustProductsInstance\n *\n * @function fetch\n * @memberof Twilio.Trusthub.V1.TrustProductsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsInstance\n */\n/* jshint ignore:end */\nTrustProductsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TrustProductsInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a TrustProductsInstance\n *\n * @function update\n * @memberof Twilio.Trusthub.V1.TrustProductsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {trust_products.status} [opts.status] -\n *          The verification status of the Customer-Profile resource\n * @param {string} [opts.statusCallback] -\n *          The URL we call to inform your application of status changes.\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the resource\n * @param {string} [opts.email] - The email address\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsInstance\n */\n/* jshint ignore:end */\nTrustProductsContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Status': _.get(opts, 'status'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Email': _.get(opts, 'email')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new TrustProductsInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a TrustProductsInstance\n *\n * @function remove\n * @memberof Twilio.Trusthub.V1.TrustProductsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed TrustProductsInstance\n */\n/* jshint ignore:end */\nTrustProductsContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(TrustProductsContext.prototype,\n  'trustProductsEntityAssignments', {\n    get: function() {\n      if (!this._trustProductsEntityAssignments) {\n        this._trustProductsEntityAssignments = new TrustProductsEntityAssignmentsList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._trustProductsEntityAssignments;\n    }\n});\n\nObject.defineProperty(TrustProductsContext.prototype,\n  'trustProductsEvaluations', {\n    get: function() {\n      if (!this._trustProductsEvaluations) {\n        this._trustProductsEvaluations = new TrustProductsEvaluationsList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._trustProductsEvaluations;\n    }\n});\n\nObject.defineProperty(TrustProductsContext.prototype,\n  'trustProductsChannelEndpointAssignment', {\n    get: function() {\n      if (!this._trustProductsChannelEndpointAssignment) {\n        this._trustProductsChannelEndpointAssignment = new TrustProductsChannelEndpointAssignmentList(\n          this._version,\n          this._solution.sid\n        );\n      }\n      return this._trustProductsChannelEndpointAssignment;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Trusthub.V1.TrustProductsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTrustProductsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nTrustProductsContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TrustProductsList: TrustProductsList,\n  TrustProductsPage: TrustProductsPage,\n  TrustProductsInstance: TrustProductsInstance,\n  TrustProductsContext: TrustProductsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CustomerProfilesList = require(\n    './v1/customerProfiles').CustomerProfilesList;\nvar EndUserList = require('./v1/endUser').EndUserList;\nvar EndUserTypeList = require('./v1/endUserType').EndUserTypeList;\nvar PoliciesList = require('./v1/policies').PoliciesList;\nvar SupportingDocumentList = require(\n    './v1/supportingDocument').SupportingDocumentList;\nvar SupportingDocumentTypeList = require(\n    './v1/supportingDocumentType').SupportingDocumentTypeList;\nvar TrustProductsList = require('./v1/trustProducts').TrustProductsList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Trusthub\n *\n * @constructor Twilio.Trusthub.V1\n *\n * @property {Twilio.Trusthub.V1.CustomerProfilesList} customerProfiles -\n *          customerProfiles resource\n * @property {Twilio.Trusthub.V1.EndUserList} endUsers - endUsers resource\n * @property {Twilio.Trusthub.V1.EndUserTypeList} endUserTypes -\n *          endUserTypes resource\n * @property {Twilio.Trusthub.V1.PoliciesList} policies - policies resource\n * @property {Twilio.Trusthub.V1.SupportingDocumentList} supportingDocuments -\n *          supportingDocuments resource\n * @property {Twilio.Trusthub.V1.SupportingDocumentTypeList} supportingDocumentTypes -\n *          supportingDocumentTypes resource\n * @property {Twilio.Trusthub.V1.TrustProductsList} trustProducts -\n *          trustProducts resource\n *\n * @param {Twilio.Trusthub} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._customerProfiles = undefined;\n  this._endUsers = undefined;\n  this._endUserTypes = undefined;\n  this._policies = undefined;\n  this._supportingDocuments = undefined;\n  this._supportingDocumentTypes = undefined;\n  this._trustProducts = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'customerProfiles', {\n    get: function() {\n      this._customerProfiles = this._customerProfiles || new CustomerProfilesList(this);\n      return this._customerProfiles;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'endUsers', {\n    get: function() {\n      this._endUsers = this._endUsers || new EndUserList(this);\n      return this._endUsers;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'endUserTypes', {\n    get: function() {\n      this._endUserTypes = this._endUserTypes || new EndUserTypeList(this);\n      return this._endUserTypes;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'policies', {\n    get: function() {\n      this._policies = this._policies || new PoliciesList(this);\n      return this._policies;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'supportingDocuments', {\n    get: function() {\n      this._supportingDocuments = this._supportingDocuments || new SupportingDocumentList(this);\n      return this._supportingDocuments;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'supportingDocumentTypes', {\n    get: function() {\n      this._supportingDocumentTypes = this._supportingDocumentTypes || new SupportingDocumentTypeList(this);\n      return this._supportingDocumentTypes;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'trustProducts', {\n    get: function() {\n      this._trustProducts = this._trustProducts || new TrustProductsList(this);\n      return this._trustProducts;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./trusthub/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize trusthub domain\n *\n * @constructor Twilio.Trusthub\n *\n * @property {Twilio.Trusthub.V1} v1 - v1 version\n * @property {Twilio.Trusthub.V1.CustomerProfilesList} customerProfiles -\n *          customerProfiles resource\n * @property {Twilio.Trusthub.V1.EndUserList} endUsers - endUsers resource\n * @property {Twilio.Trusthub.V1.EndUserTypeList} endUserTypes -\n *          endUserTypes resource\n * @property {Twilio.Trusthub.V1.PoliciesList} policies - policies resource\n * @property {Twilio.Trusthub.V1.SupportingDocumentList} supportingDocuments -\n *          supportingDocuments resource\n * @property {Twilio.Trusthub.V1.SupportingDocumentTypeList} supportingDocumentTypes -\n *          supportingDocumentTypes resource\n * @property {Twilio.Trusthub.V1.TrustProductsList} trustProducts -\n *          trustProducts resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Trusthub(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://trusthub.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Trusthub.prototype, Domain.prototype);\nTrusthub.prototype.constructor = Trusthub;\n\nObject.defineProperty(Trusthub.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Trusthub.prototype,\n  'customerProfiles', {\n    get: function() {\n      return this.v1.customerProfiles;\n    }\n});\n\nObject.defineProperty(Trusthub.prototype,\n  'endUsers', {\n    get: function() {\n      return this.v1.endUsers;\n    }\n});\n\nObject.defineProperty(Trusthub.prototype,\n  'endUserTypes', {\n    get: function() {\n      return this.v1.endUserTypes;\n    }\n});\n\nObject.defineProperty(Trusthub.prototype,\n  'policies', {\n    get: function() {\n      return this.v1.policies;\n    }\n});\n\nObject.defineProperty(Trusthub.prototype,\n  'supportingDocuments', {\n    get: function() {\n      return this.v1.supportingDocuments;\n    }\n});\n\nObject.defineProperty(Trusthub.prototype,\n  'supportingDocumentTypes', {\n    get: function() {\n      return this.v1.supportingDocumentTypes;\n    }\n});\n\nObject.defineProperty(Trusthub.prototype,\n  'trustProducts', {\n    get: function() {\n      return this.v1.trustProducts;\n    }\n});\n\nmodule.exports = Trusthub;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar FormList;\nvar FormPage;\nvar FormInstance;\nvar FormContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FormList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.FormList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nFormList = function FormList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function forms\n   * @memberof Twilio.Verify.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.FormContext}\n   */\n  /* jshint ignore:end */\n  function FormListInstance(sid) {\n    return FormListInstance.get(sid);\n  }\n\n  FormListInstance._version = version;\n  // Path Solution\n  FormListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a form\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.FormList#\n   *\n   * @param {string} formType - The Type of this Form\n   *\n   * @returns {Twilio.Verify.V2.FormContext}\n   */\n  /* jshint ignore:end */\n  FormListInstance.get = function get(formType) {\n    return new FormContext(this._version, formType);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.FormList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FormListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FormListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FormListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FormPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.FormPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FormSolution} solution - Path solution\n *\n * @returns FormPage\n */\n/* jshint ignore:end */\nFormPage = function FormPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FormPage.prototype, Page.prototype);\nFormPage.prototype.constructor = FormPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FormInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.FormPage#\n *\n * @param {FormPayload} payload - Payload response from the API\n *\n * @returns FormInstance\n */\n/* jshint ignore:end */\nFormPage.prototype.getInstance = function getInstance(payload) {\n  return new FormInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.FormPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFormPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFormPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FormContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.FormInstance\n *\n * @property {form.form_types} formType - The Type of this Form\n * @property {object} forms -\n *          Object that contains the available forms for this type.\n * @property {object} formMeta -\n *          Additional information for the available forms for this type.\n * @property {string} url - The URL to access the forms for this type.\n *\n * @param {V2} version - Version of the resource\n * @param {FormPayload} payload - The instance payload\n * @param {form:enum:form_types} formType - The Type of this Form\n */\n/* jshint ignore:end */\nFormInstance = function FormInstance(version, payload, formType) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.formType = payload.form_type; // jshint ignore:line\n  this.forms = payload.forms; // jshint ignore:line\n  this.formMeta = payload.form_meta; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {formType: formType || this.formType, };\n};\n\nObject.defineProperty(FormInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FormContext(this._version, this._solution.formType);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FormInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.FormInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FormInstance\n */\n/* jshint ignore:end */\nFormInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.FormInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFormInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFormInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FormContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.FormContext\n *\n * @param {V2} version - Version of the resource\n * @param {form:enum:form_types} formType - The Type of this Form\n */\n/* jshint ignore:end */\nFormContext = function FormContext(version, formType) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {formType: formType, };\n  this._uri = `/Forms/${formType}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FormInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.FormContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FormInstance\n */\n/* jshint ignore:end */\nFormContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FormInstance(this._version, payload, this._solution.formType));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.FormContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFormContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFormContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FormList: FormList,\n  FormPage: FormPage,\n  FormInstance: FormInstance,\n  FormContext: FormContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar AccessTokenList;\nvar AccessTokenPage;\nvar AccessTokenInstance;\nvar AccessTokenContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the AccessTokenList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.AccessTokenList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid - Verify Service Sid.\n */\n/* jshint ignore:end */\nAccessTokenList = function AccessTokenList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function accessTokens\n   * @memberof Twilio.Verify.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.AccessTokenContext}\n   */\n  /* jshint ignore:end */\n  function AccessTokenListInstance(sid) {\n    return AccessTokenListInstance.get(sid);\n  }\n\n  AccessTokenListInstance._version = version;\n  // Path Solution\n  AccessTokenListInstance._solution = {serviceSid: serviceSid};\n  AccessTokenListInstance._uri = `/Services/${serviceSid}/AccessTokens`;\n  /* jshint ignore:start */\n  /**\n   * create a AccessTokenInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - Unique external identifier of the Entity\n   * @param {access_token.factor_types} opts.factorType - The Type of this Factor\n   * @param {string} [opts.factorFriendlyName] - The factor friendly name\n   * @param {number} [opts.ttl] - How long, in seconds, the access token is valid.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed AccessTokenInstance\n   */\n  /* jshint ignore:end */\n  AccessTokenListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n    if (_.isUndefined(opts['factorType'])) {\n      throw new Error('Required parameter \"opts[\\'factorType\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Identity': _.get(opts, 'identity'),\n      'FactorType': _.get(opts, 'factorType'),\n      'FactorFriendlyName': _.get(opts, 'factorFriendlyName'),\n      'Ttl': _.get(opts, 'ttl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new AccessTokenInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a access_token\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenList#\n   *\n   * @param {string} sid - A string that uniquely identifies this Access Token.\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.AccessTokenContext}\n   */\n  /* jshint ignore:end */\n  AccessTokenListInstance.get = function get(sid) {\n    return new AccessTokenContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  AccessTokenListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  AccessTokenListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return AccessTokenListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AccessTokenPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.AccessTokenPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {AccessTokenSolution} solution - Path solution\n *\n * @returns AccessTokenPage\n */\n/* jshint ignore:end */\nAccessTokenPage = function AccessTokenPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(AccessTokenPage.prototype, Page.prototype);\nAccessTokenPage.prototype.constructor = AccessTokenPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of AccessTokenInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenPage#\n *\n * @param {AccessTokenPayload} payload - Payload response from the API\n *\n * @returns AccessTokenInstance\n */\n/* jshint ignore:end */\nAccessTokenPage.prototype.getInstance = function getInstance(payload) {\n  return new AccessTokenInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAccessTokenPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAccessTokenPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AccessTokenContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.AccessTokenInstance\n *\n * @property {string} sid - A string that uniquely identifies this Access Token.\n * @property {string} accountSid - Account Sid.\n * @property {string} serviceSid - Verify Service Sid.\n * @property {string} entityIdentity - Unique external identifier of the Entity\n * @property {access_token.factor_types} factorType - The Type of the Factor\n * @property {string} factorFriendlyName -\n *          A human readable description of this factor.\n * @property {string} token - Generated access token.\n * @property {string} url - The URL of this resource.\n * @property {number} ttl - How long, in seconds, the access token is valid.\n * @property {Date} dateCreated - The date this access token was created\n *\n * @param {V2} version - Version of the resource\n * @param {AccessTokenPayload} payload - The instance payload\n * @param {sid} serviceSid - Verify Service Sid.\n * @param {sid} sid - A string that uniquely identifies this Access Token.\n */\n/* jshint ignore:end */\nAccessTokenInstance = function AccessTokenInstance(version, payload, serviceSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.entityIdentity = payload.entity_identity; // jshint ignore:line\n  this.factorType = payload.factor_type; // jshint ignore:line\n  this.factorFriendlyName = payload.factor_friendly_name; // jshint ignore:line\n  this.token = payload.token; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.ttl = deserialize.integer(payload.ttl); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(AccessTokenInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new AccessTokenContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a AccessTokenInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AccessTokenInstance\n */\n/* jshint ignore:end */\nAccessTokenInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAccessTokenInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nAccessTokenInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the AccessTokenContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.AccessTokenContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - Service Sid.\n * @param {sid} sid - A string that uniquely identifies this Access Token.\n */\n/* jshint ignore:end */\nAccessTokenContext = function AccessTokenContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/AccessTokens/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a AccessTokenInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed AccessTokenInstance\n */\n/* jshint ignore:end */\nAccessTokenContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new AccessTokenInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.AccessTokenContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nAccessTokenContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nAccessTokenContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  AccessTokenList: AccessTokenList,\n  AccessTokenPage: AccessTokenPage,\n  AccessTokenInstance: AccessTokenInstance,\n  AccessTokenContext: AccessTokenContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../../base/values');  /* jshint ignore:line */\n\nvar NotificationList;\nvar NotificationPage;\nvar NotificationInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n * @param {string} challengeSid - Challenge Sid.\n */\n/* jshint ignore:end */\nNotificationList = function NotificationList(version, serviceSid, identity,\n                                              challengeSid) {\n  /* jshint ignore:start */\n  /**\n   * @function notifications\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationContext}\n   */\n  /* jshint ignore:end */\n  function NotificationListInstance(sid) {\n    return NotificationListInstance.get(sid);\n  }\n\n  NotificationListInstance._version = version;\n  // Path Solution\n  NotificationListInstance._solution = {\n    serviceSid: serviceSid,\n    identity: identity,\n    challengeSid: challengeSid\n  };\n  NotificationListInstance._uri = `/Services/${serviceSid}/Entities/${identity}/Challenges/${challengeSid}/Notifications`;\n  /* jshint ignore:start */\n  /**\n   * create a NotificationInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.ttl] - How long, in seconds, the notification is valid.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed NotificationInstance\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'Ttl': _.get(opts, 'ttl')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NotificationInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NotificationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NotificationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NotificationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NotificationSolution} solution - Path solution\n *\n * @returns NotificationPage\n */\n/* jshint ignore:end */\nNotificationPage = function NotificationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NotificationPage.prototype, Page.prototype);\nNotificationPage.prototype.constructor = NotificationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NotificationInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationPage#\n *\n * @param {NotificationPayload} payload - Payload response from the API\n *\n * @returns NotificationInstance\n */\n/* jshint ignore:end */\nNotificationPage.prototype.getInstance = function getInstance(payload) {\n  return new NotificationInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.identity,\n    this._solution.challengeSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NotificationContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationInstance\n *\n * @property {string} sid - A string that uniquely identifies this Notification.\n * @property {string} accountSid - Account Sid.\n * @property {string} serviceSid - Service Sid.\n * @property {string} entitySid - Entity Sid.\n * @property {string} identity - Unique external identifier of the Entity\n * @property {string} challengeSid - Challenge Sid.\n * @property {string} priority - The priority of the notification.\n * @property {number} ttl - How long, in seconds, the notification is valid.\n * @property {Date} dateCreated - The date this Notification was created\n *\n * @param {V2} version - Version of the resource\n * @param {NotificationPayload} payload - The instance payload\n * @param {sid} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n * @param {sid} challengeSid - Challenge Sid.\n */\n/* jshint ignore:end */\nNotificationInstance = function NotificationInstance(version, payload,\n                                                      serviceSid, identity,\n                                                      challengeSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.entitySid = payload.entity_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.challengeSid = payload.challenge_sid; // jshint ignore:line\n  this.priority = payload.priority; // jshint ignore:line\n  this.ttl = deserialize.integer(payload.ttl); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, identity: identity, challengeSid: challengeSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNotificationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNotificationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NotificationList: NotificationList,\n  NotificationPage: NotificationPage,\n  NotificationInstance: NotificationInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar NotificationList = require('./challenge/notification').NotificationList;\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar ChallengeList;\nvar ChallengePage;\nvar ChallengeInstance;\nvar ChallengeContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ChallengeList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n */\n/* jshint ignore:end */\nChallengeList = function ChallengeList(version, serviceSid, identity) {\n  /* jshint ignore:start */\n  /**\n   * @function challenges\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext}\n   */\n  /* jshint ignore:end */\n  function ChallengeListInstance(sid) {\n    return ChallengeListInstance.get(sid);\n  }\n\n  ChallengeListInstance._version = version;\n  // Path Solution\n  ChallengeListInstance._solution = {serviceSid: serviceSid, identity: identity};\n  ChallengeListInstance._uri = `/Services/${serviceSid}/Entities/${identity}/Challenges`;\n  /* jshint ignore:start */\n  /**\n   * create a ChallengeInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.factorSid - Factor Sid.\n   * @param {Date} [opts.expirationDate] - The date-time when this Challenge expires\n   * @param {string} [opts.details.message] -\n   *          Shown to the user when the push notification arrives\n   * @param {object|list} [opts.details.fields] -\n   *          A list of objects that describe the Fields included in the Challenge\n   * @param {object} [opts.hiddenDetails] -\n   *          Hidden details provided to contextualize the Challenge\n   * @param {string} [opts.authPayload] - Optional payload to verify the Challenge\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ChallengeInstance\n   */\n  /* jshint ignore:end */\n  ChallengeListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['factorSid'])) {\n      throw new Error('Required parameter \"opts[\\'factorSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FactorSid': _.get(opts, 'factorSid'),\n      'ExpirationDate': serialize.iso8601DateTime(_.get(opts, 'expirationDate')),\n      'Details.Message': _.get(opts, 'details.message'),\n      'Details.Fields': serialize.map(_.get(opts, 'details.fields'), function(e) { return serialize.object(e); }),\n      'HiddenDetails': serialize.object(_.get(opts, 'hiddenDetails')),\n      'AuthPayload': _.get(opts, 'authPayload')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChallengeInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.identity,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ChallengeInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.factorSid] - Factor Sid.\n   * @param {challenge.challenge_statuses} [opts.status] -\n   *          The Status of theChallenges to fetch\n   * @param {challenge.list_orders} [opts.order] -\n   *          The sort order of the Challenges list\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ChallengeListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ChallengeInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.factorSid] - Factor Sid.\n   * @param {challenge.challenge_statuses} [opts.status] -\n   *          The Status of theChallenges to fetch\n   * @param {challenge.list_orders} [opts.order] -\n   *          The sort order of the Challenges list\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChallengeListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ChallengeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.factorSid] - Factor Sid.\n   * @param {challenge.challenge_statuses} [opts.status] -\n   *          The Status of theChallenges to fetch\n   * @param {challenge.list_orders} [opts.order] -\n   *          The sort order of the Challenges list\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChallengeListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FactorSid': _.get(opts, 'factorSid'),\n      'Status': _.get(opts, 'status'),\n      'Order': _.get(opts, 'order'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChallengePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ChallengeInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ChallengeListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ChallengePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a challenge\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList#\n   *\n   * @param {string} sid - A string that uniquely identifies this Challenge.\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext}\n   */\n  /* jshint ignore:end */\n  ChallengeListInstance.get = function get(sid) {\n    return new ChallengeContext(this._version, this._solution.serviceSid, this._solution.identity, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ChallengeListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ChallengeListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ChallengeListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChallengePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.ChallengePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ChallengeSolution} solution - Path solution\n *\n * @returns ChallengePage\n */\n/* jshint ignore:end */\nChallengePage = function ChallengePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ChallengePage.prototype, Page.prototype);\nChallengePage.prototype.constructor = ChallengePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ChallengeInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengePage#\n *\n * @param {ChallengePayload} payload - Payload response from the API\n *\n * @returns ChallengeInstance\n */\n/* jshint ignore:end */\nChallengePage.prototype.getInstance = function getInstance(payload) {\n  return new ChallengeInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.identity\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChallengePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChallengePage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChallengeContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeInstance\n *\n * @property {string} sid - A string that uniquely identifies this Challenge.\n * @property {string} accountSid - Account Sid.\n * @property {string} serviceSid - Service Sid.\n * @property {string} entitySid - Entity Sid.\n * @property {string} identity - Unique external identifier of the Entity\n * @property {string} factorSid - Factor Sid.\n * @property {Date} dateCreated - The date this Challenge was created\n * @property {Date} dateUpdated - The date this Challenge was updated\n * @property {Date} dateResponded - The date this Challenge was responded\n * @property {Date} expirationDate - The date-time when this Challenge expires\n * @property {challenge.challenge_statuses} status - The Status of this Challenge\n * @property {challenge.challenge_reasons} respondedReason -\n *          The Reason of this Challenge `status`\n * @property {object} details - Details about the Challenge.\n * @property {object} hiddenDetails - Hidden details about the Challenge\n * @property {object} metadata - Metadata of the challenge.\n * @property {challenge.factor_types} factorType -\n *          The Factor Type of this Challenge\n * @property {string} url - The URL of this resource.\n * @property {string} links - Nested resource URLs.\n *\n * @param {V2} version - Version of the resource\n * @param {ChallengePayload} payload - The instance payload\n * @param {sid} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n * @param {sid} sid - A string that uniquely identifies this Challenge.\n */\n/* jshint ignore:end */\nChallengeInstance = function ChallengeInstance(version, payload, serviceSid,\n                                                identity, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.entitySid = payload.entity_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.factorSid = payload.factor_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.dateResponded = deserialize.iso8601DateTime(payload.date_responded); // jshint ignore:line\n  this.expirationDate = deserialize.iso8601DateTime(payload.expiration_date); // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.respondedReason = payload.responded_reason; // jshint ignore:line\n  this.details = payload.details; // jshint ignore:line\n  this.hiddenDetails = payload.hidden_details; // jshint ignore:line\n  this.metadata = payload.metadata; // jshint ignore:line\n  this.factorType = payload.factor_type; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, identity: identity, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ChallengeInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ChallengeContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.identity,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ChallengeInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChallengeInstance\n */\n/* jshint ignore:end */\nChallengeInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ChallengeInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.authPayload] - Optional payload to verify the Challenge\n * @param {object} [opts.metadata] - Metadata of the challenge.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChallengeInstance\n */\n/* jshint ignore:end */\nChallengeInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the notifications\n *\n * @function notifications\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationList}\n */\n/* jshint ignore:end */\nChallengeInstance.prototype.notifications = function notifications() {\n  return this._proxy.notifications;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChallengeInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nChallengeInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ChallengeContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext\n *\n * @property {Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext.NotificationList} notifications -\n *          notifications resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n * @param {sid} sid - A string that uniquely identifies this Challenge.\n */\n/* jshint ignore:end */\nChallengeContext = function ChallengeContext(version, serviceSid, identity, sid)\n                                              {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, identity: identity, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Entities/${identity}/Challenges/${sid}`;\n\n  // Dependents\n  this._notifications = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ChallengeInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChallengeInstance\n */\n/* jshint ignore:end */\nChallengeContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChallengeInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.identity,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ChallengeInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.authPayload] - Optional payload to verify the Challenge\n * @param {object} [opts.metadata] - Metadata of the challenge.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ChallengeInstance\n */\n/* jshint ignore:end */\nChallengeContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'AuthPayload': _.get(opts, 'authPayload'),\n    'Metadata': serialize.object(_.get(opts, 'metadata'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ChallengeInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.identity,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ChallengeContext.prototype,\n  'notifications', {\n    get: function() {\n      if (!this._notifications) {\n        this._notifications = new NotificationList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.identity,\n          this._solution.sid\n        );\n      }\n      return this._notifications;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nChallengeContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nChallengeContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ChallengeList: ChallengeList,\n  ChallengePage: ChallengePage,\n  ChallengeInstance: ChallengeInstance,\n  ChallengeContext: ChallengeContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar FactorList;\nvar FactorPage;\nvar FactorInstance;\nvar FactorContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FactorList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.FactorList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n */\n/* jshint ignore:end */\nFactorList = function FactorList(version, serviceSid, identity) {\n  /* jshint ignore:start */\n  /**\n   * @function factors\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.FactorContext}\n   */\n  /* jshint ignore:end */\n  function FactorListInstance(sid) {\n    return FactorListInstance.get(sid);\n  }\n\n  FactorListInstance._version = version;\n  // Path Solution\n  FactorListInstance._solution = {serviceSid: serviceSid, identity: identity};\n  FactorListInstance._uri = `/Services/${serviceSid}/Entities/${identity}/Factors`;\n  /* jshint ignore:start */\n  /**\n   * Streams FactorInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FactorListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FactorInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FactorListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FactorInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FactorListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FactorPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FactorInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FactorListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FactorPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a factor\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorList#\n   *\n   * @param {string} sid - A string that uniquely identifies this Factor.\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.FactorContext}\n   */\n  /* jshint ignore:end */\n  FactorListInstance.get = function get(sid) {\n    return new FactorContext(this._version, this._solution.serviceSid, this._solution.identity, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FactorListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FactorListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FactorListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FactorPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.FactorPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FactorSolution} solution - Path solution\n *\n * @returns FactorPage\n */\n/* jshint ignore:end */\nFactorPage = function FactorPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FactorPage.prototype, Page.prototype);\nFactorPage.prototype.constructor = FactorPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FactorInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorPage#\n *\n * @param {FactorPayload} payload - Payload response from the API\n *\n * @returns FactorInstance\n */\n/* jshint ignore:end */\nFactorPage.prototype.getInstance = function getInstance(payload) {\n  return new FactorInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.identity\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFactorPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFactorPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FactorContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.FactorInstance\n *\n * @property {string} sid - A string that uniquely identifies this Factor.\n * @property {string} accountSid - Account Sid.\n * @property {string} serviceSid - Service Sid.\n * @property {string} entitySid - Entity Sid.\n * @property {string} identity - Unique external identifier of the Entity\n * @property {Date} dateCreated - The date this Factor was created\n * @property {Date} dateUpdated - The date this Factor was updated\n * @property {string} friendlyName - A human readable description of this resource.\n * @property {factor.factor_statuses} status - The Status of this Factor\n * @property {factor.factor_types} factorType - The Type of this Factor\n * @property {object} config - Configurations for a `factor_type`.\n * @property {object} metadata - Metadata of the factor.\n * @property {string} url - The URL of this resource.\n *\n * @param {V2} version - Version of the resource\n * @param {FactorPayload} payload - The instance payload\n * @param {sid} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n * @param {sid} sid - A string that uniquely identifies this Factor.\n */\n/* jshint ignore:end */\nFactorInstance = function FactorInstance(version, payload, serviceSid, identity,\n                                          sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.entitySid = payload.entity_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.factorType = payload.factor_type; // jshint ignore:line\n  this.config = payload.config; // jshint ignore:line\n  this.metadata = payload.metadata; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, identity: identity, sid: sid || this.sid, };\n};\n\nObject.defineProperty(FactorInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FactorContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.identity,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a FactorInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FactorInstance\n */\n/* jshint ignore:end */\nFactorInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FactorInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FactorInstance\n */\n/* jshint ignore:end */\nFactorInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FactorInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.authPayload] -\n *          Optional payload to verify the Factor for the first time\n * @param {string} [opts.friendlyName] - The friendly name of this Factor\n * @param {string} [opts.config.notificationToken] -\n *          For APN, the device token. For FCM, the registration token\n * @param {string} [opts.config.sdkVersion] -\n *          The Verify Push SDK version used to configure the factor\n * @param {number} [opts.config.timeStep] -\n *          How often, in seconds, are TOTP codes generated\n * @param {number} [opts.config.skew] -\n *          The number of past and future time-steps valid at a given time\n * @param {number} [opts.config.codeLength] -\n *          Number of digits for generated TOTP codes\n * @param {factor.totp_algorithms} [opts.config.alg] -\n *          The algorithm used to derive the TOTP codes\n * @param {string} [opts.config.notificationPlatform] -\n *          The transport technology used to generate the Notification Token\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FactorInstance\n */\n/* jshint ignore:end */\nFactorInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFactorInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFactorInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FactorContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.FactorContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n * @param {sid} sid - A string that uniquely identifies this Factor.\n */\n/* jshint ignore:end */\nFactorContext = function FactorContext(version, serviceSid, identity, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, identity: identity, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Entities/${identity}/Factors/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a FactorInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FactorInstance\n */\n/* jshint ignore:end */\nFactorContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FactorInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FactorInstance\n */\n/* jshint ignore:end */\nFactorContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FactorInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.identity,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FactorInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.authPayload] -\n *          Optional payload to verify the Factor for the first time\n * @param {string} [opts.friendlyName] - The friendly name of this Factor\n * @param {string} [opts.config.notificationToken] -\n *          For APN, the device token. For FCM, the registration token\n * @param {string} [opts.config.sdkVersion] -\n *          The Verify Push SDK version used to configure the factor\n * @param {number} [opts.config.timeStep] -\n *          How often, in seconds, are TOTP codes generated\n * @param {number} [opts.config.skew] -\n *          The number of past and future time-steps valid at a given time\n * @param {number} [opts.config.codeLength] -\n *          Number of digits for generated TOTP codes\n * @param {factor.totp_algorithms} [opts.config.alg] -\n *          The algorithm used to derive the TOTP codes\n * @param {string} [opts.config.notificationPlatform] -\n *          The transport technology used to generate the Notification Token\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FactorInstance\n */\n/* jshint ignore:end */\nFactorContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'AuthPayload': _.get(opts, 'authPayload'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Config.NotificationToken': _.get(opts, 'config.notificationToken'),\n    'Config.SdkVersion': _.get(opts, 'config.sdkVersion'),\n    'Config.TimeStep': _.get(opts, 'config.timeStep'),\n    'Config.Skew': _.get(opts, 'config.skew'),\n    'Config.CodeLength': _.get(opts, 'config.codeLength'),\n    'Config.Alg': _.get(opts, 'config.alg'),\n    'Config.NotificationPlatform': _.get(opts, 'config.notificationPlatform')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FactorInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.identity,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.FactorContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFactorContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFactorContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FactorList: FactorList,\n  FactorPage: FactorPage,\n  FactorInstance: FactorInstance,\n  FactorContext: FactorContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar NewFactorList;\nvar NewFactorPage;\nvar NewFactorInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the NewFactorList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n */\n/* jshint ignore:end */\nNewFactorList = function NewFactorList(version, serviceSid, identity) {\n  /* jshint ignore:start */\n  /**\n   * @function newFactors\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorContext}\n   */\n  /* jshint ignore:end */\n  function NewFactorListInstance(sid) {\n    return NewFactorListInstance.get(sid);\n  }\n\n  NewFactorListInstance._version = version;\n  // Path Solution\n  NewFactorListInstance._solution = {serviceSid: serviceSid, identity: identity};\n  NewFactorListInstance._uri = `/Services/${serviceSid}/Entities/${identity}/Factors`;\n  /* jshint ignore:start */\n  /**\n   * create a NewFactorInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - The friendly name of this Factor\n   * @param {new_factor.factor_types} opts.factorType - The Type of this Factor\n   * @param {string} [opts.binding.alg] -\n   *          The algorithm used when `factor_type` is `push`\n   * @param {string} [opts.binding.publicKey] - The public key encoded in Base64\n   * @param {string} [opts.config.appId] -\n   *          The ID that uniquely identifies your app in the Google or Apple store\n   * @param {new_factor.notification_platforms} [opts.config.notificationPlatform] -\n   *          The transport technology used to generate the Notification Token\n   * @param {string} [opts.config.notificationToken] -\n   *          For APN, the device token. For FCM, the registration token\n   * @param {string} [opts.config.sdkVersion] -\n   *          The Verify Push SDK version used to configure the factor\n   * @param {string} [opts.binding.secret] - The shared secret in Base32\n   * @param {number} [opts.config.timeStep] -\n   *          How often, in seconds, are TOTP codes generated\n   * @param {number} [opts.config.skew] -\n   *          The number of past and future time-steps valid at a given time\n   * @param {number} [opts.config.codeLength] -\n   *          Number of digits for generated TOTP codes\n   * @param {new_factor.totp_algorithms} [opts.config.alg] -\n   *          The algorithm used to derive the TOTP codes\n   * @param {object} [opts.metadata] - Metadata of the factor.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed NewFactorInstance\n   */\n  /* jshint ignore:end */\n  NewFactorListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['factorType'])) {\n      throw new Error('Required parameter \"opts[\\'factorType\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'FactorType': _.get(opts, 'factorType'),\n      'Binding.Alg': _.get(opts, 'binding.alg'),\n      'Binding.PublicKey': _.get(opts, 'binding.publicKey'),\n      'Config.AppId': _.get(opts, 'config.appId'),\n      'Config.NotificationPlatform': _.get(opts, 'config.notificationPlatform'),\n      'Config.NotificationToken': _.get(opts, 'config.notificationToken'),\n      'Config.SdkVersion': _.get(opts, 'config.sdkVersion'),\n      'Binding.Secret': _.get(opts, 'binding.secret'),\n      'Config.TimeStep': _.get(opts, 'config.timeStep'),\n      'Config.Skew': _.get(opts, 'config.skew'),\n      'Config.CodeLength': _.get(opts, 'config.codeLength'),\n      'Config.Alg': _.get(opts, 'config.alg'),\n      'Metadata': serialize.object(_.get(opts, 'metadata'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NewFactorInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NewFactorListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NewFactorListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NewFactorListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NewFactorPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NewFactorSolution} solution - Path solution\n *\n * @returns NewFactorPage\n */\n/* jshint ignore:end */\nNewFactorPage = function NewFactorPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NewFactorPage.prototype, Page.prototype);\nNewFactorPage.prototype.constructor = NewFactorPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NewFactorInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorPage#\n *\n * @param {NewFactorPayload} payload - Payload response from the API\n *\n * @returns NewFactorInstance\n */\n/* jshint ignore:end */\nNewFactorPage.prototype.getInstance = function getInstance(payload) {\n  return new NewFactorInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.identity\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNewFactorPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNewFactorPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NewFactorContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorInstance\n *\n * @property {string} sid - A string that uniquely identifies this Factor.\n * @property {string} accountSid - Account Sid.\n * @property {string} serviceSid - Service Sid.\n * @property {string} entitySid - Entity Sid.\n * @property {string} identity - Unique external identifier of the Entity\n * @property {object} binding - Binding of the factor\n * @property {Date} dateCreated - The date this Factor was created\n * @property {Date} dateUpdated - The date this Factor was updated\n * @property {string} friendlyName - A human readable description of this resource.\n * @property {new_factor.factor_statuses} status - The Status of this Factor\n * @property {new_factor.factor_types} factorType - The Type of this Factor\n * @property {object} config - Configurations for a `factor_type`.\n * @property {object} metadata - Metadata of the factor.\n * @property {string} url - The URL of this resource.\n *\n * @param {V2} version - Version of the resource\n * @param {NewFactorPayload} payload - The instance payload\n * @param {sid} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n */\n/* jshint ignore:end */\nNewFactorInstance = function NewFactorInstance(version, payload, serviceSid,\n                                                identity) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.entitySid = payload.entity_sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.binding = payload.binding; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.factorType = payload.factor_type; // jshint ignore:line\n  this.config = payload.config; // jshint ignore:line\n  this.metadata = payload.metadata; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, identity: identity, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNewFactorInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNewFactorInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NewFactorList: NewFactorList,\n  NewFactorPage: NewFactorPage,\n  NewFactorInstance: NewFactorInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ChallengeList = require('./entity/challenge').ChallengeList;\nvar FactorList = require('./entity/factor').FactorList;\nvar NewFactorList = require('./entity/newFactor').NewFactorList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar EntityList;\nvar EntityPage;\nvar EntityInstance;\nvar EntityContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EntityList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid - Service Sid.\n */\n/* jshint ignore:end */\nEntityList = function EntityList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function entities\n   * @memberof Twilio.Verify.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.EntityContext}\n   */\n  /* jshint ignore:end */\n  function EntityListInstance(sid) {\n    return EntityListInstance.get(sid);\n  }\n\n  EntityListInstance._version = version;\n  // Path Solution\n  EntityListInstance._solution = {serviceSid: serviceSid};\n  EntityListInstance._uri = `/Services/${serviceSid}/Entities`;\n  /* jshint ignore:start */\n  /**\n   * create a EntityInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.identity - Unique external identifier of the Entity\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed EntityInstance\n   */\n  /* jshint ignore:end */\n  EntityListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['identity'])) {\n      throw new Error('Required parameter \"opts[\\'identity\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Identity': _.get(opts, 'identity')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EntityInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.identity\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams EntityInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EntityListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EntityInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EntityListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EntityInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EntityListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EntityPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EntityInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EntityListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EntityPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a entity\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityList#\n   *\n   * @param {string} identity - Unique external identifier of the Entity\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.EntityContext}\n   */\n  /* jshint ignore:end */\n  EntityListInstance.get = function get(identity) {\n    return new EntityContext(this._version, this._solution.serviceSid, identity);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.EntityList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EntityListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EntityListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EntityListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EntityPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EntitySolution} solution - Path solution\n *\n * @returns EntityPage\n */\n/* jshint ignore:end */\nEntityPage = function EntityPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EntityPage.prototype, Page.prototype);\nEntityPage.prototype.constructor = EntityPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EntityInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.EntityPage#\n *\n * @param {EntityPayload} payload - Payload response from the API\n *\n * @returns EntityInstance\n */\n/* jshint ignore:end */\nEntityPage.prototype.getInstance = function getInstance(payload) {\n  return new EntityInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEntityPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEntityPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EntityContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityInstance\n *\n * @property {string} sid - A string that uniquely identifies this Entity.\n * @property {string} identity - Unique external identifier of the Entity\n * @property {string} accountSid - Account Sid.\n * @property {string} serviceSid - Service Sid.\n * @property {Date} dateCreated - The date this Entity was created\n * @property {Date} dateUpdated - The date this Entity was updated\n * @property {string} url - The URL of this resource.\n * @property {string} links - Nested resource URLs.\n *\n * @param {V2} version - Version of the resource\n * @param {EntityPayload} payload - The instance payload\n * @param {sid} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n */\n/* jshint ignore:end */\nEntityInstance = function EntityInstance(version, payload, serviceSid, identity)\n                                          {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, identity: identity || this.identity, };\n};\n\nObject.defineProperty(EntityInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EntityContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.identity\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a EntityInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.EntityInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EntityInstance\n */\n/* jshint ignore:end */\nEntityInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EntityInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.EntityInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EntityInstance\n */\n/* jshint ignore:end */\nEntityInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the factors\n *\n * @function factors\n * @memberof Twilio.Verify.V2.ServiceContext.EntityInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.FactorList}\n */\n/* jshint ignore:end */\nEntityInstance.prototype.factors = function factors() {\n  return this._proxy.factors;\n};\n\n/* jshint ignore:start */\n/**\n * Access the newFactors\n *\n * @function newFactors\n * @memberof Twilio.Verify.V2.ServiceContext.EntityInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorList}\n */\n/* jshint ignore:end */\nEntityInstance.prototype.newFactors = function newFactors() {\n  return this._proxy.newFactors;\n};\n\n/* jshint ignore:start */\n/**\n * Access the challenges\n *\n * @function challenges\n * @memberof Twilio.Verify.V2.ServiceContext.EntityInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList}\n */\n/* jshint ignore:end */\nEntityInstance.prototype.challenges = function challenges() {\n  return this._proxy.challenges;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEntityInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEntityInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EntityContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.EntityContext\n *\n * @property {Twilio.Verify.V2.ServiceContext.EntityContext.FactorList} factors -\n *          factors resource\n * @property {Twilio.Verify.V2.ServiceContext.EntityContext.NewFactorList} newFactors -\n *          newFactors resource\n * @property {Twilio.Verify.V2.ServiceContext.EntityContext.ChallengeList} challenges -\n *          challenges resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - Service Sid.\n * @param {string} identity - Unique external identifier of the Entity\n */\n/* jshint ignore:end */\nEntityContext = function EntityContext(version, serviceSid, identity) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, identity: identity, };\n  this._uri = `/Services/${serviceSid}/Entities/${identity}`;\n\n  // Dependents\n  this._factors = undefined;\n  this._newFactors = undefined;\n  this._challenges = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * remove a EntityInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EntityInstance\n */\n/* jshint ignore:end */\nEntityContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EntityInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EntityInstance\n */\n/* jshint ignore:end */\nEntityContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EntityInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.identity\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(EntityContext.prototype,\n  'factors', {\n    get: function() {\n      if (!this._factors) {\n        this._factors = new FactorList(this._version, this._solution.serviceSid, this._solution.identity);\n      }\n      return this._factors;\n    }\n});\n\nObject.defineProperty(EntityContext.prototype,\n  'newFactors', {\n    get: function() {\n      if (!this._newFactors) {\n        this._newFactors = new NewFactorList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.identity\n        );\n      }\n      return this._newFactors;\n    }\n});\n\nObject.defineProperty(EntityContext.prototype,\n  'challenges', {\n    get: function() {\n      if (!this._challenges) {\n        this._challenges = new ChallengeList(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.identity\n        );\n      }\n      return this._challenges;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.EntityContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEntityContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEntityContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EntityList: EntityList,\n  EntityPage: EntityPage,\n  EntityInstance: EntityInstance,\n  EntityContext: EntityContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar MessagingConfigurationList;\nvar MessagingConfigurationPage;\nvar MessagingConfigurationInstance;\nvar MessagingConfigurationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagingConfigurationList\n *\n * @constructor Twilio.Verify.V2.ServiceContext.MessagingConfigurationList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nMessagingConfigurationList = function MessagingConfigurationList(version,\n    serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function messagingConfigurations\n   * @memberof Twilio.Verify.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.MessagingConfigurationContext}\n   */\n  /* jshint ignore:end */\n  function MessagingConfigurationListInstance(sid) {\n    return MessagingConfigurationListInstance.get(sid);\n  }\n\n  MessagingConfigurationListInstance._version = version;\n  // Path Solution\n  MessagingConfigurationListInstance._solution = {serviceSid: serviceSid};\n  MessagingConfigurationListInstance._uri = `/Services/${serviceSid}/MessagingConfigurations`;\n  /* jshint ignore:start */\n  /**\n   * create a MessagingConfigurationInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.country -\n   *          The ISO-3166-1 country code of the country or `all`.\n   * @param {string} opts.messagingServiceSid -\n   *          The SID of the Messaging Service used for this configuration.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed MessagingConfigurationInstance\n   */\n  /* jshint ignore:end */\n  MessagingConfigurationListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['country'])) {\n      throw new Error('Required parameter \"opts[\\'country\\']\" missing.');\n    }\n    if (_.isUndefined(opts['messagingServiceSid'])) {\n      throw new Error('Required parameter \"opts[\\'messagingServiceSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Country': _.get(opts, 'country'),\n      'MessagingServiceSid': _.get(opts, 'messagingServiceSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagingConfigurationInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.country\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams MessagingConfigurationInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  MessagingConfigurationListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists MessagingConfigurationInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessagingConfigurationListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of MessagingConfigurationInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessagingConfigurationListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagingConfigurationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of MessagingConfigurationInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  MessagingConfigurationListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new MessagingConfigurationPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a messaging_configuration\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationList#\n   *\n   * @param {string} country - The ISO-3166-1 country code of the country or `all`.\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.MessagingConfigurationContext}\n   */\n  /* jshint ignore:end */\n  MessagingConfigurationListInstance.get = function get(country) {\n    return new MessagingConfigurationContext(this._version, this._solution.serviceSid, country);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  MessagingConfigurationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  MessagingConfigurationListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return MessagingConfigurationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagingConfigurationPage\n *\n * @constructor Twilio.Verify.V2.ServiceContext.MessagingConfigurationPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {MessagingConfigurationSolution} solution - Path solution\n *\n * @returns MessagingConfigurationPage\n */\n/* jshint ignore:end */\nMessagingConfigurationPage = function MessagingConfigurationPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(MessagingConfigurationPage.prototype, Page.prototype);\nMessagingConfigurationPage.prototype.constructor = MessagingConfigurationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of MessagingConfigurationInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationPage#\n *\n * @param {MessagingConfigurationPayload} payload - Payload response from the API\n *\n * @returns MessagingConfigurationInstance\n */\n/* jshint ignore:end */\nMessagingConfigurationPage.prototype.getInstance = function getInstance(payload)\n    {\n  return new MessagingConfigurationInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagingConfigurationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagingConfigurationPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagingConfigurationContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext.MessagingConfigurationInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} country -\n *          The ISO-3166-1 country code of the country or `all`.\n * @property {string} messagingServiceSid -\n *          The SID of the Messaging Service used for this configuration.\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The URL of this resource.\n *\n * @param {V2} version - Version of the resource\n * @param {MessagingConfigurationPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} country - The ISO-3166-1 country code of the country or `all`.\n */\n/* jshint ignore:end */\nMessagingConfigurationInstance = function\n    MessagingConfigurationInstance(version, payload, serviceSid, country) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.country = payload.country; // jshint ignore:line\n  this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, country: country || this.country, };\n};\n\nObject.defineProperty(MessagingConfigurationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new MessagingConfigurationContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.country\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a MessagingConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.messagingServiceSid -\n *          The SID of the Messaging Service used for this configuration.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessagingConfigurationInstance\n */\n/* jshint ignore:end */\nMessagingConfigurationInstance.prototype.update = function update(opts,\n    callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessagingConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessagingConfigurationInstance\n */\n/* jshint ignore:end */\nMessagingConfigurationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessagingConfigurationInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessagingConfigurationInstance\n */\n/* jshint ignore:end */\nMessagingConfigurationInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagingConfigurationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nMessagingConfigurationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the MessagingConfigurationContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext.MessagingConfigurationContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} country - The ISO-3166-1 country code of the country or `all`.\n */\n/* jshint ignore:end */\nMessagingConfigurationContext = function MessagingConfigurationContext(version,\n    serviceSid, country) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, country: country, };\n  this._uri = `/Services/${serviceSid}/MessagingConfigurations/${country}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a MessagingConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.messagingServiceSid -\n *          The SID of the Messaging Service used for this configuration.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessagingConfigurationInstance\n */\n/* jshint ignore:end */\nMessagingConfigurationContext.prototype.update = function update(opts, callback)\n    {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['messagingServiceSid'])) {\n    throw new Error('Required parameter \"opts[\\'messagingServiceSid\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'MessagingServiceSid': _.get(opts, 'messagingServiceSid')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessagingConfigurationInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.country\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a MessagingConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessagingConfigurationInstance\n */\n/* jshint ignore:end */\nMessagingConfigurationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new MessagingConfigurationInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.country\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a MessagingConfigurationInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed MessagingConfigurationInstance\n */\n/* jshint ignore:end */\nMessagingConfigurationContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.MessagingConfigurationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nMessagingConfigurationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nMessagingConfigurationContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  MessagingConfigurationList: MessagingConfigurationList,\n  MessagingConfigurationPage: MessagingConfigurationPage,\n  MessagingConfigurationInstance: MessagingConfigurationInstance,\n  MessagingConfigurationContext: MessagingConfigurationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar BucketList;\nvar BucketPage;\nvar BucketInstance;\nvar BucketContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the BucketList\n *\n * @constructor Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} rateLimitSid - Rate Limit Sid.\n */\n/* jshint ignore:end */\nBucketList = function BucketList(version, serviceSid, rateLimitSid) {\n  /* jshint ignore:start */\n  /**\n   * @function buckets\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketContext}\n   */\n  /* jshint ignore:end */\n  function BucketListInstance(sid) {\n    return BucketListInstance.get(sid);\n  }\n\n  BucketListInstance._version = version;\n  // Path Solution\n  BucketListInstance._solution = {serviceSid: serviceSid, rateLimitSid: rateLimitSid};\n  BucketListInstance._uri = `/Services/${serviceSid}/RateLimits/${rateLimitSid}/Buckets`;\n  /* jshint ignore:start */\n  /**\n   * create a BucketInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList#\n   *\n   * @param {object} opts - Options for request\n   * @param {number} opts.max - Max number of requests.\n   * @param {number} opts.interval -\n   *          Number of seconds that the rate limit will be enforced over.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed BucketInstance\n   */\n  /* jshint ignore:end */\n  BucketListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['max'])) {\n      throw new Error('Required parameter \"opts[\\'max\\']\" missing.');\n    }\n    if (_.isUndefined(opts['interval'])) {\n      throw new Error('Required parameter \"opts[\\'interval\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Max': _.get(opts, 'max'), 'Interval': _.get(opts, 'interval')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BucketInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.rateLimitSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams BucketInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BucketListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BucketInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BucketListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BucketInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BucketListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BucketPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BucketInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BucketListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BucketPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a bucket\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList#\n   *\n   * @param {string} sid - A string that uniquely identifies this Bucket.\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketContext}\n   */\n  /* jshint ignore:end */\n  BucketListInstance.get = function get(sid) {\n    return new BucketContext(\n      this._version,\n      this._solution.serviceSid,\n      this._solution.rateLimitSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BucketListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BucketListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BucketListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BucketPage\n *\n * @constructor Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BucketSolution} solution - Path solution\n *\n * @returns BucketPage\n */\n/* jshint ignore:end */\nBucketPage = function BucketPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BucketPage.prototype, Page.prototype);\nBucketPage.prototype.constructor = BucketPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BucketInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketPage#\n *\n * @param {BucketPayload} payload - Payload response from the API\n *\n * @returns BucketInstance\n */\n/* jshint ignore:end */\nBucketPage.prototype.getInstance = function getInstance(payload) {\n  return new BucketInstance(\n    this._version,\n    payload,\n    this._solution.serviceSid,\n    this._solution.rateLimitSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBucketPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBucketPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BucketContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketInstance\n *\n * @property {string} sid - A string that uniquely identifies this Bucket.\n * @property {string} rateLimitSid - Rate Limit Sid.\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {number} max - Max number of requests.\n * @property {number} interval -\n *          Number of seconds that the rate limit will be enforced over.\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The URL of this resource.\n *\n * @param {V2} version - Version of the resource\n * @param {BucketPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} rateLimitSid - Rate Limit Sid.\n * @param {sid} sid - A string that uniquely identifies this Bucket.\n */\n/* jshint ignore:end */\nBucketInstance = function BucketInstance(version, payload, serviceSid,\n                                          rateLimitSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.rateLimitSid = payload.rate_limit_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.max = deserialize.integer(payload.max); // jshint ignore:line\n  this.interval = deserialize.integer(payload.interval); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, rateLimitSid: rateLimitSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(BucketInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new BucketContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.rateLimitSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a BucketInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.max] - Max number of requests.\n * @param {number} [opts.interval] -\n *          Number of seconds that the rate limit will be enforced over.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BucketInstance\n */\n/* jshint ignore:end */\nBucketInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BucketInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BucketInstance\n */\n/* jshint ignore:end */\nBucketInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a BucketInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BucketInstance\n */\n/* jshint ignore:end */\nBucketInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBucketInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBucketInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BucketContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} rateLimitSid - Rate Limit Sid.\n * @param {sid} sid - A string that uniquely identifies this Bucket.\n */\n/* jshint ignore:end */\nBucketContext = function BucketContext(version, serviceSid, rateLimitSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, rateLimitSid: rateLimitSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/RateLimits/${rateLimitSid}/Buckets/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a BucketInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketContext#\n *\n * @param {object} [opts] - Options for request\n * @param {number} [opts.max] - Max number of requests.\n * @param {number} [opts.interval] -\n *          Number of seconds that the rate limit will be enforced over.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BucketInstance\n */\n/* jshint ignore:end */\nBucketContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Max': _.get(opts, 'max'), 'Interval': _.get(opts, 'interval')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BucketInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.rateLimitSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a BucketInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BucketInstance\n */\n/* jshint ignore:end */\nBucketContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new BucketInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.rateLimitSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a BucketInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed BucketInstance\n */\n/* jshint ignore:end */\nBucketContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBucketContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nBucketContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BucketList: BucketList,\n  BucketPage: BucketPage,\n  BucketInstance: BucketInstance,\n  BucketContext: BucketContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BucketList = require('./rateLimit/bucket').BucketList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RateLimitList;\nvar RateLimitPage;\nvar RateLimitInstance;\nvar RateLimitContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RateLimitList\n *\n * @constructor Twilio.Verify.V2.ServiceContext.RateLimitList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nRateLimitList = function RateLimitList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function rateLimits\n   * @memberof Twilio.Verify.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.RateLimitContext}\n   */\n  /* jshint ignore:end */\n  function RateLimitListInstance(sid) {\n    return RateLimitListInstance.get(sid);\n  }\n\n  RateLimitListInstance._version = version;\n  // Path Solution\n  RateLimitListInstance._solution = {serviceSid: serviceSid};\n  RateLimitListInstance._uri = `/Services/${serviceSid}/RateLimits`;\n  /* jshint ignore:start */\n  /**\n   * create a RateLimitInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.uniqueName -\n   *          A unique, developer assigned name of this Rate Limit.\n   * @param {string} [opts.description] - Description of this Rate Limit\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RateLimitInstance\n   */\n  /* jshint ignore:end */\n  RateLimitListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['uniqueName'])) {\n      throw new Error('Required parameter \"opts[\\'uniqueName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Description': _.get(opts, 'description')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RateLimitInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams RateLimitInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RateLimitListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RateLimitInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RateLimitListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RateLimitInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RateLimitListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RateLimitPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RateLimitInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RateLimitListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RateLimitPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a rate_limit\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.RateLimitContext}\n   */\n  /* jshint ignore:end */\n  RateLimitListInstance.get = function get(sid) {\n    return new RateLimitContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.RateLimitList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RateLimitListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RateLimitListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RateLimitListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RateLimitPage\n *\n * @constructor Twilio.Verify.V2.ServiceContext.RateLimitPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RateLimitSolution} solution - Path solution\n *\n * @returns RateLimitPage\n */\n/* jshint ignore:end */\nRateLimitPage = function RateLimitPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RateLimitPage.prototype, Page.prototype);\nRateLimitPage.prototype.constructor = RateLimitPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RateLimitInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitPage#\n *\n * @param {RateLimitPayload} payload - Payload response from the API\n *\n * @returns RateLimitInstance\n */\n/* jshint ignore:end */\nRateLimitPage.prototype.getInstance = function getInstance(payload) {\n  return new RateLimitInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRateLimitPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRateLimitPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RateLimitContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext.RateLimitInstance\n *\n * @property {string} sid - A string that uniquely identifies this Rate Limit.\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} uniqueName -\n *          A unique, developer assigned name of this Rate Limit.\n * @property {string} description - Description of this Rate Limit\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The URL of this resource.\n * @property {string} links - The URLs of related resources\n *\n * @param {V2} version - Version of the resource\n * @param {RateLimitPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRateLimitInstance = function RateLimitInstance(version, payload, serviceSid,\n                                                sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.description = payload.description; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RateLimitInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RateLimitContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a RateLimitInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.description] - Description of this Rate Limit\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RateLimitInstance\n */\n/* jshint ignore:end */\nRateLimitInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RateLimitInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RateLimitInstance\n */\n/* jshint ignore:end */\nRateLimitInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RateLimitInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RateLimitInstance\n */\n/* jshint ignore:end */\nRateLimitInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the buckets\n *\n * @function buckets\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList}\n */\n/* jshint ignore:end */\nRateLimitInstance.prototype.buckets = function buckets() {\n  return this._proxy.buckets;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRateLimitInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRateLimitInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RateLimitContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext.RateLimitContext\n *\n * @property {Twilio.Verify.V2.ServiceContext.RateLimitContext.BucketList} buckets -\n *          buckets resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nRateLimitContext = function RateLimitContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/RateLimits/${sid}`;\n\n  // Dependents\n  this._buckets = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * update a RateLimitInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.description] - Description of this Rate Limit\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RateLimitInstance\n */\n/* jshint ignore:end */\nRateLimitContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Description': _.get(opts, 'description')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RateLimitInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RateLimitInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RateLimitInstance\n */\n/* jshint ignore:end */\nRateLimitContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RateLimitInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RateLimitInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RateLimitInstance\n */\n/* jshint ignore:end */\nRateLimitContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(RateLimitContext.prototype,\n  'buckets', {\n    get: function() {\n      if (!this._buckets) {\n        this._buckets = new BucketList(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n      return this._buckets;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.RateLimitContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRateLimitContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRateLimitContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RateLimitList: RateLimitList,\n  RateLimitPage: RateLimitPage,\n  RateLimitInstance: RateLimitInstance,\n  RateLimitContext: RateLimitContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar VerificationCheckList;\nvar VerificationCheckPage;\nvar VerificationCheckInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationCheckList\n *\n * @constructor Twilio.Verify.V2.ServiceContext.VerificationCheckList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nVerificationCheckList = function VerificationCheckList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function verificationChecks\n   * @memberof Twilio.Verify.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.VerificationCheckContext}\n   */\n  /* jshint ignore:end */\n  function VerificationCheckListInstance(sid) {\n    return VerificationCheckListInstance.get(sid);\n  }\n\n  VerificationCheckListInstance._version = version;\n  // Path Solution\n  VerificationCheckListInstance._solution = {serviceSid: serviceSid};\n  VerificationCheckListInstance._uri = `/Services/${serviceSid}/VerificationCheck`;\n  /* jshint ignore:start */\n  /**\n   * create a VerificationCheckInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.VerificationCheckList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.code - The verification string\n   * @param {string} [opts.to] - The phone number or email to verify\n   * @param {string} [opts.verificationSid] -\n   *          A SID that uniquely identifies the Verification Check\n   * @param {string} [opts.amount] -\n   *          The amount of the associated PSD2 compliant transaction.\n   * @param {string} [opts.payee] -\n   *          The payee of the associated PSD2 compliant transaction\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed VerificationCheckInstance\n   */\n  /* jshint ignore:end */\n  VerificationCheckListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['code'])) {\n      throw new Error('Required parameter \"opts[\\'code\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Code': _.get(opts, 'code'),\n      'To': _.get(opts, 'to'),\n      'VerificationSid': _.get(opts, 'verificationSid'),\n      'Amount': _.get(opts, 'amount'),\n      'Payee': _.get(opts, 'payee')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new VerificationCheckInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.VerificationCheckList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  VerificationCheckListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  VerificationCheckListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return VerificationCheckListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationCheckPage\n *\n * @constructor Twilio.Verify.V2.ServiceContext.VerificationCheckPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {VerificationCheckSolution} solution - Path solution\n *\n * @returns VerificationCheckPage\n */\n/* jshint ignore:end */\nVerificationCheckPage = function VerificationCheckPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(VerificationCheckPage.prototype, Page.prototype);\nVerificationCheckPage.prototype.constructor = VerificationCheckPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of VerificationCheckInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationCheckPage#\n *\n * @param {VerificationCheckPayload} payload - Payload response from the API\n *\n * @returns VerificationCheckInstance\n */\n/* jshint ignore:end */\nVerificationCheckPage.prototype.getInstance = function getInstance(payload) {\n  return new VerificationCheckInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationCheckPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationCheckPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVerificationCheckPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationCheckContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext.VerificationCheckInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} to - The phone number or email being verified\n * @property {verification_check.channel} channel - The verification method to use\n * @property {string} status - The status of the verification resource\n * @property {boolean} valid - Whether the verification was successful\n * @property {string} amount -\n *          The amount of the associated PSD2 compliant transaction.\n * @property {string} payee -\n *          The payee of the associated PSD2 compliant transaction\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the Verification Check resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Verification Check resource was last updated\n *\n * @param {V2} version - Version of the resource\n * @param {VerificationCheckPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nVerificationCheckInstance = function VerificationCheckInstance(version, payload,\n    serviceSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.channel = payload.channel; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.valid = payload.valid; // jshint ignore:line\n  this.amount = payload.amount; // jshint ignore:line\n  this.payee = payload.payee; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationCheckInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationCheckInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVerificationCheckInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  VerificationCheckList: VerificationCheckList,\n  VerificationCheckPage: VerificationCheckPage,\n  VerificationCheckInstance: VerificationCheckInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar VerificationList;\nvar VerificationPage;\nvar VerificationInstance;\nvar VerificationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationList\n *\n * @constructor Twilio.Verify.V2.ServiceContext.VerificationList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n */\n/* jshint ignore:end */\nVerificationList = function VerificationList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function verifications\n   * @memberof Twilio.Verify.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.VerificationContext}\n   */\n  /* jshint ignore:end */\n  function VerificationListInstance(sid) {\n    return VerificationListInstance.get(sid);\n  }\n\n  VerificationListInstance._version = version;\n  // Path Solution\n  VerificationListInstance._solution = {serviceSid: serviceSid};\n  VerificationListInstance._uri = `/Services/${serviceSid}/Verifications`;\n  /* jshint ignore:start */\n  /**\n   * create a VerificationInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.VerificationList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.to - The phone number or email to verify\n   * @param {string} opts.channel - The verification method to use\n   * @param {string} [opts.customFriendlyName] - A custom user defined friendly name\n   * @param {string} [opts.customMessage] -\n   *          The text of a custom message to use for the verification\n   * @param {string} [opts.sendDigits] -\n   *          The digits to send after a phone call is answered\n   * @param {string} [opts.locale] -\n   *          The locale to use for the verification SMS, WhatsApp or call\n   * @param {string} [opts.customCode] - A pre-generated code\n   * @param {string} [opts.amount] -\n   *          The amount of the associated PSD2 compliant transaction.\n   * @param {string} [opts.payee] -\n   *          The payee of the associated PSD2 compliant transaction\n   * @param {object} [opts.rateLimits] -\n   *          The custom key-value pairs of Programmable Rate Limits.\n   * @param {object} [opts.channelConfiguration] -\n   *          Channel specific configuration in json format.\n   * @param {string} [opts.appHash] -\n   *          Your App Hash to be appended at the end of an SMS.\n   * @param {string} [opts.templateSid] - The verification template SMS messages.\n   * @param {string} [opts.templateCustomSubstitutions] -\n   *          The values of the special variables declared on the message template.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed VerificationInstance\n   */\n  /* jshint ignore:end */\n  VerificationListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['to'])) {\n      throw new Error('Required parameter \"opts[\\'to\\']\" missing.');\n    }\n    if (_.isUndefined(opts['channel'])) {\n      throw new Error('Required parameter \"opts[\\'channel\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'To': _.get(opts, 'to'),\n      'Channel': _.get(opts, 'channel'),\n      'CustomFriendlyName': _.get(opts, 'customFriendlyName'),\n      'CustomMessage': _.get(opts, 'customMessage'),\n      'SendDigits': _.get(opts, 'sendDigits'),\n      'Locale': _.get(opts, 'locale'),\n      'CustomCode': _.get(opts, 'customCode'),\n      'Amount': _.get(opts, 'amount'),\n      'Payee': _.get(opts, 'payee'),\n      'RateLimits': serialize.object(_.get(opts, 'rateLimits')),\n      'ChannelConfiguration': serialize.object(_.get(opts, 'channelConfiguration')),\n      'AppHash': _.get(opts, 'appHash'),\n      'TemplateSid': _.get(opts, 'templateSid'),\n      'TemplateCustomSubstitutions': _.get(opts, 'templateCustomSubstitutions')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new VerificationInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a verification\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceContext.VerificationList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.VerificationContext}\n   */\n  /* jshint ignore:end */\n  VerificationListInstance.get = function get(sid) {\n    return new VerificationContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.VerificationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  VerificationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  VerificationListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return VerificationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationPage\n *\n * @constructor Twilio.Verify.V2.ServiceContext.VerificationPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {VerificationSolution} solution - Path solution\n *\n * @returns VerificationPage\n */\n/* jshint ignore:end */\nVerificationPage = function VerificationPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(VerificationPage.prototype, Page.prototype);\nVerificationPage.prototype.constructor = VerificationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of VerificationInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationPage#\n *\n * @param {VerificationPayload} payload - Payload response from the API\n *\n * @returns VerificationInstance\n */\n/* jshint ignore:end */\nVerificationPage.prototype.getInstance = function getInstance(payload) {\n  return new VerificationInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVerificationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext.VerificationInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} to - The phone number or email being verified\n * @property {verification.channel} channel - The verification method used.\n * @property {string} status - The status of the verification resource\n * @property {boolean} valid - Whether the verification was successful\n * @property {object} lookup - Information about the phone number being verified\n * @property {string} amount -\n *          The amount of the associated PSD2 compliant transaction.\n * @property {string} payee -\n *          The payee of the associated PSD2 compliant transaction\n * @property {object} sendCodeAttempts - An array of verification attempt objects.\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Verification resource\n *\n * @param {V2} version - Version of the resource\n * @param {VerificationPayload} payload - The instance payload\n * @param {sid} serviceSid -\n *          The SID of the Service that the resource is associated with\n * @param {string} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nVerificationInstance = function VerificationInstance(version, payload,\n                                                      serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.to = payload.to; // jshint ignore:line\n  this.channel = payload.channel; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.valid = payload.valid; // jshint ignore:line\n  this.lookup = payload.lookup; // jshint ignore:line\n  this.amount = payload.amount; // jshint ignore:line\n  this.payee = payload.payee; // jshint ignore:line\n  this.sendCodeAttempts = payload.send_code_attempts; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(VerificationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new VerificationContext(\n          this._version,\n          this._solution.serviceSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a VerificationInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationInstance#\n *\n * @param {object} opts - Options for request\n * @param {verification.status} opts.status - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VerificationInstance\n */\n/* jshint ignore:end */\nVerificationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a VerificationInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VerificationInstance\n */\n/* jshint ignore:end */\nVerificationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVerificationInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext.VerificationContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid -\n *          The SID of the verification Service to fetch the resource from\n * @param {string} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nVerificationContext = function VerificationContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Verifications/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a VerificationInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationContext#\n *\n * @param {object} opts - Options for request\n * @param {verification.status} opts.status - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VerificationInstance\n */\n/* jshint ignore:end */\nVerificationContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new VerificationInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a VerificationInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VerificationInstance\n */\n/* jshint ignore:end */\nVerificationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new VerificationInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.VerificationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nVerificationContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  VerificationList: VerificationList,\n  VerificationPage: VerificationPage,\n  VerificationInstance: VerificationInstance,\n  VerificationContext: VerificationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar WebhookList;\nvar WebhookPage;\nvar WebhookInstance;\nvar WebhookContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.WebhookList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n * @param {string} serviceSid - Service Sid.\n */\n/* jshint ignore:end */\nWebhookList = function WebhookList(version, serviceSid) {\n  /* jshint ignore:start */\n  /**\n   * @function webhooks\n   * @memberof Twilio.Verify.V2.ServiceContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  function WebhookListInstance(sid) {\n    return WebhookListInstance.get(sid);\n  }\n\n  WebhookListInstance._version = version;\n  // Path Solution\n  WebhookListInstance._solution = {serviceSid: serviceSid};\n  WebhookListInstance._uri = `/Services/${serviceSid}/Webhooks`;\n  /* jshint ignore:start */\n  /**\n   * create a WebhookInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceContext.WebhookList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          The string that you assigned to describe the webhook\n   * @param {string|list} opts.eventTypes -\n   *          The array of events that this Webhook is subscribed to.\n   * @param {string} opts.webhookUrl - The URL associated with this Webhook.\n   * @param {webhook.status} [opts.status] - The webhook status\n   * @param {webhook.version} [opts.version] - The webhook version\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed WebhookInstance\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n    if (_.isUndefined(opts['eventTypes'])) {\n      throw new Error('Required parameter \"opts[\\'eventTypes\\']\" missing.');\n    }\n    if (_.isUndefined(opts['webhookUrl'])) {\n      throw new Error('Required parameter \"opts[\\'webhookUrl\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'EventTypes': serialize.map(_.get(opts, 'eventTypes'), function(e) { return e; }),\n      'WebhookUrl': _.get(opts, 'webhookUrl'),\n      'Status': _.get(opts, 'status'),\n      'Version': _.get(opts, 'version')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookInstance(\n        this._version,\n        payload,\n        this._solution.serviceSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams WebhookInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.ServiceContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists WebhookInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.ServiceContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.ServiceContext.WebhookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of WebhookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.ServiceContext.WebhookList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new WebhookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a webhook\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceContext.WebhookList#\n   *\n   * @param {string} sid - The unique string that identifies the resource to fetch\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext.WebhookContext}\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.get = function get(sid) {\n    return new WebhookContext(this._version, this._solution.serviceSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceContext.WebhookList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  WebhookListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  WebhookListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return WebhookListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.WebhookPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {WebhookSolution} solution - Path solution\n *\n * @returns WebhookPage\n */\n/* jshint ignore:end */\nWebhookPage = function WebhookPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(WebhookPage.prototype, Page.prototype);\nWebhookPage.prototype.constructor = WebhookPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of WebhookInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookPage#\n *\n * @param {WebhookPayload} payload - Payload response from the API\n *\n * @returns WebhookInstance\n */\n/* jshint ignore:end */\nWebhookPage.prototype.getInstance = function getInstance(payload) {\n  return new WebhookInstance(this._version, payload, this._solution.serviceSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.WebhookInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} serviceSid - Service Sid.\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the webhook\n * @property {string} eventTypes -\n *          The array of events that this Webhook is subscribed to.\n * @property {webhook.status} status - The webhook status\n * @property {webhook.version} version - The webhook version\n * @property {string} webhookUrl - The URL associated with this Webhook.\n * @property {webhook.methods} webhookMethod -\n *          The method used when calling the webhook's URL.\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Webhook resource\n *\n * @param {V2} version - Version of the resource\n * @param {WebhookPayload} payload - The instance payload\n * @param {sid} serviceSid - Service Sid.\n * @param {sid} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nWebhookInstance = function WebhookInstance(version, payload, serviceSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.eventTypes = payload.event_types; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.version = payload.version; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {serviceSid: serviceSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(WebhookInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new WebhookContext(this._version, this._solution.serviceSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the webhook\n * @param {string|list} [opts.eventTypes] -\n *          The array of events that this Webhook is subscribed to.\n * @param {string} [opts.webhookUrl] - The URL associated with this Webhook.\n * @param {webhook.status} [opts.status] - The webhook status\n * @param {webhook.version} [opts.version] - The webhook version\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nWebhookInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the WebhookContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Verify.V2.ServiceContext.WebhookContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} serviceSid - Service Sid.\n * @param {sid} sid - The unique string that identifies the resource to fetch\n */\n/* jshint ignore:end */\nWebhookContext = function WebhookContext(version, serviceSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {serviceSid: serviceSid, sid: sid, };\n  this._uri = `/Services/${serviceSid}/Webhooks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * update a WebhookInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          The string that you assigned to describe the webhook\n * @param {string|list} [opts.eventTypes] -\n *          The array of events that this Webhook is subscribed to.\n * @param {string} [opts.webhookUrl] - The URL associated with this Webhook.\n * @param {webhook.status} [opts.status] - The webhook status\n * @param {webhook.version} [opts.version] - The webhook version\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'EventTypes': serialize.map(_.get(opts, 'eventTypes'), function(e) { return e; }),\n    'WebhookUrl': _.get(opts, 'webhookUrl'),\n    'Status': _.get(opts, 'status'),\n    'Version': _.get(opts, 'version')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a WebhookInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a WebhookInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed WebhookInstance\n */\n/* jshint ignore:end */\nWebhookContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new WebhookInstance(\n      this._version,\n      payload,\n      this._solution.serviceSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext.WebhookContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nWebhookContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nWebhookContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  WebhookList: WebhookList,\n  WebhookPage: WebhookPage,\n  WebhookInstance: WebhookInstance,\n  WebhookContext: WebhookContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar AccessTokenList = require('./service/accessToken').AccessTokenList;\nvar EntityList = require('./service/entity').EntityList;\nvar MessagingConfigurationList = require(\n    './service/messagingConfiguration').MessagingConfigurationList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar RateLimitList = require('./service/rateLimit').RateLimitList;\nvar VerificationCheckList = require(\n    './service/verificationCheck').VerificationCheckList;\nvar VerificationList = require('./service/verification').VerificationList;\nvar WebhookList = require('./service/webhook').WebhookList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ServiceList;\nvar ServicePage;\nvar ServiceInstance;\nvar ServiceContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceList\n *\n * @constructor Twilio.Verify.V2.ServiceList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nServiceList = function ServiceList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function services\n   * @memberof Twilio.Verify.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext}\n   */\n  /* jshint ignore:end */\n  function ServiceListInstance(sid) {\n    return ServiceListInstance.get(sid);\n  }\n\n  ServiceListInstance._version = version;\n  // Path Solution\n  ServiceListInstance._solution = {};\n  ServiceListInstance._uri = `/Services`;\n  /* jshint ignore:start */\n  /**\n   * create a ServiceInstance\n   *\n   * @function create\n   * @memberof Twilio.Verify.V2.ServiceList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName -\n   *          A string to describe the verification service\n   * @param {number} [opts.codeLength] -\n   *          The length of the verification code to generate\n   * @param {boolean} [opts.lookupEnabled] -\n   *          Whether to perform a lookup with each verification\n   * @param {boolean} [opts.skipSmsToLandlines] -\n   *          Whether to skip sending SMS verifications to landlines\n   * @param {boolean} [opts.dtmfInputRequired] -\n   *          Whether to ask the user to press a number before delivering the verify code in a phone call\n   * @param {string} [opts.ttsName] -\n   *          The name of an alternative text-to-speech service to use in phone calls\n   * @param {boolean} [opts.psd2Enabled] -\n   *          Whether to pass PSD2 transaction parameters when starting a verification\n   * @param {boolean} [opts.doNotShareWarningEnabled] -\n   *          Whether to add a security warning at the end of an SMS.\n   * @param {boolean} [opts.customCodeEnabled] -\n   *          Whether to allow sending verifications with a custom code.\n   * @param {boolean} [opts.push.includeDate] -\n   *          Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.\n   * @param {string} [opts.push.apnCredentialSid] -\n   *          Optional. Set APN Credential for this service.\n   * @param {string} [opts.push.fcmCredentialSid] -\n   *          Optional. Set FCM Credential for this service.\n   * @param {string} [opts.totp.issuer] - Optional. Set TOTP Issuer for this service.\n   * @param {number} [opts.totp.timeStep] -\n   *          Optional. How often, in seconds, are TOTP codes generated\n   * @param {number} [opts.totp.codeLength] -\n   *          Optional. Number of digits for generated TOTP codes\n   * @param {number} [opts.totp.skew] -\n   *          Optional. The number of past and future time-steps valid at a given time\n   * @param {string} [opts.defaultTemplateSid] -\n   *          The verification template SMS messages.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ServiceInstance\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'CodeLength': _.get(opts, 'codeLength'),\n      'LookupEnabled': serialize.bool(_.get(opts, 'lookupEnabled')),\n      'SkipSmsToLandlines': serialize.bool(_.get(opts, 'skipSmsToLandlines')),\n      'DtmfInputRequired': serialize.bool(_.get(opts, 'dtmfInputRequired')),\n      'TtsName': _.get(opts, 'ttsName'),\n      'Psd2Enabled': serialize.bool(_.get(opts, 'psd2Enabled')),\n      'DoNotShareWarningEnabled': serialize.bool(_.get(opts, 'doNotShareWarningEnabled')),\n      'CustomCodeEnabled': serialize.bool(_.get(opts, 'customCodeEnabled')),\n      'Push.IncludeDate': serialize.bool(_.get(opts, 'push.includeDate')),\n      'Push.ApnCredentialSid': _.get(opts, 'push.apnCredentialSid'),\n      'Push.FcmCredentialSid': _.get(opts, 'push.fcmCredentialSid'),\n      'Totp.Issuer': _.get(opts, 'totp.issuer'),\n      'Totp.TimeStep': _.get(opts, 'totp.timeStep'),\n      'Totp.CodeLength': _.get(opts, 'totp.codeLength'),\n      'Totp.Skew': _.get(opts, 'totp.skew'),\n      'DefaultTemplateSid': _.get(opts, 'defaultTemplateSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ServiceInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ServiceInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.ServiceList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ServiceInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.ServiceList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ServicePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a service\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.ServiceList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Verify.V2.ServiceContext}\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.get = function get(sid) {\n    return new ServiceContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.ServiceList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ServiceListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ServiceListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ServiceListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServicePage\n *\n * @constructor Twilio.Verify.V2.ServicePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ServiceSolution} solution - Path solution\n *\n * @returns ServicePage\n */\n/* jshint ignore:end */\nServicePage = function ServicePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ServicePage.prototype, Page.prototype);\nServicePage.prototype.constructor = ServicePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ServiceInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.ServicePage#\n *\n * @param {ServicePayload} payload - Payload response from the API\n *\n * @returns ServiceInstance\n */\n/* jshint ignore:end */\nServicePage.prototype.getInstance = function getInstance(payload) {\n  return new ServiceInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServicePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServicePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServicePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Verify.V2.ServiceInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the verification service\n * @property {number} codeLength - The length of the verification code\n * @property {boolean} lookupEnabled -\n *          Whether to perform a lookup with each verification\n * @property {boolean} psd2Enabled -\n *          Whether to pass PSD2 transaction parameters when starting a verification\n * @property {boolean} skipSmsToLandlines -\n *          Whether to skip sending SMS verifications to landlines\n * @property {boolean} dtmfInputRequired -\n *          Whether to ask the user to press a number before delivering the verify code in a phone call\n * @property {string} ttsName -\n *          The name of an alternative text-to-speech service to use in phone calls\n * @property {boolean} doNotShareWarningEnabled -\n *          Whether to add a security warning at the end of an SMS.\n * @property {boolean} customCodeEnabled -\n *          Whether to allow sending verifications with a custom code.\n * @property {object} push - The service level configuration of factor push type.\n * @property {object} totp - The service level configuration of factor TOTP type.\n * @property {string} defaultTemplateSid - The default_template_sid\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V2} version - Version of the resource\n * @param {ServicePayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nServiceInstance = function ServiceInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.codeLength = deserialize.integer(payload.code_length); // jshint ignore:line\n  this.lookupEnabled = payload.lookup_enabled; // jshint ignore:line\n  this.psd2Enabled = payload.psd2_enabled; // jshint ignore:line\n  this.skipSmsToLandlines = payload.skip_sms_to_landlines; // jshint ignore:line\n  this.dtmfInputRequired = payload.dtmf_input_required; // jshint ignore:line\n  this.ttsName = payload.tts_name; // jshint ignore:line\n  this.doNotShareWarningEnabled = payload.do_not_share_warning_enabled; // jshint ignore:line\n  this.customCodeEnabled = payload.custom_code_enabled; // jshint ignore:line\n  this.push = payload.push; // jshint ignore:line\n  this.totp = payload.totp; // jshint ignore:line\n  this.defaultTemplateSid = payload.default_template_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ServiceInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ServiceContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A string to describe the verification service\n * @param {number} [opts.codeLength] -\n *          The length of the verification code to generate\n * @param {boolean} [opts.lookupEnabled] -\n *          Whether to perform a lookup with each verification\n * @param {boolean} [opts.skipSmsToLandlines] -\n *          Whether to skip sending SMS verifications to landlines\n * @param {boolean} [opts.dtmfInputRequired] -\n *          Whether to ask the user to press a number before delivering the verify code in a phone call\n * @param {string} [opts.ttsName] -\n *          The name of an alternative text-to-speech service to use in phone calls\n * @param {boolean} [opts.psd2Enabled] -\n *          Whether to pass PSD2 transaction parameters when starting a verification\n * @param {boolean} [opts.doNotShareWarningEnabled] -\n *          Whether to add a privacy warning at the end of an SMS.\n * @param {boolean} [opts.customCodeEnabled] -\n *          Whether to allow sending verifications with a custom code.\n * @param {boolean} [opts.push.includeDate] -\n *          Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.\n * @param {string} [opts.push.apnCredentialSid] -\n *          Optional. Set APN Credential for this service.\n * @param {string} [opts.push.fcmCredentialSid] -\n *          Optional. Set FCM Credential for this service.\n * @param {string} [opts.totp.issuer] - Optional. Set TOTP Issuer for this service.\n * @param {number} [opts.totp.timeStep] -\n *          Optional. How often, in seconds, are TOTP codes generated\n * @param {number} [opts.totp.codeLength] -\n *          Optional. Number of digits for generated TOTP codes\n * @param {number} [opts.totp.skew] -\n *          Optional. The number of past and future time-steps valid at a given time\n * @param {string} [opts.defaultTemplateSid] -\n *          The verification template SMS messages.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the verifications\n *\n * @function verifications\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.VerificationList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.verifications = function verifications() {\n  return this._proxy.verifications;\n};\n\n/* jshint ignore:start */\n/**\n * Access the verificationChecks\n *\n * @function verificationChecks\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.VerificationCheckList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.verificationChecks = function verificationChecks() {\n  return this._proxy.verificationChecks;\n};\n\n/* jshint ignore:start */\n/**\n * Access the rateLimits\n *\n * @function rateLimits\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.RateLimitList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.rateLimits = function rateLimits() {\n  return this._proxy.rateLimits;\n};\n\n/* jshint ignore:start */\n/**\n * Access the messagingConfigurations\n *\n * @function messagingConfigurations\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.MessagingConfigurationList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.messagingConfigurations = function\n    messagingConfigurations() {\n  return this._proxy.messagingConfigurations;\n};\n\n/* jshint ignore:start */\n/**\n * Access the entities\n *\n * @function entities\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.EntityList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.entities = function entities() {\n  return this._proxy.entities;\n};\n\n/* jshint ignore:start */\n/**\n * Access the webhooks\n *\n * @function webhooks\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.WebhookList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.webhooks = function webhooks() {\n  return this._proxy.webhooks;\n};\n\n/* jshint ignore:start */\n/**\n * Access the accessTokens\n *\n * @function accessTokens\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @returns {Twilio.Verify.V2.ServiceContext.AccessTokenList}\n */\n/* jshint ignore:end */\nServiceInstance.prototype.accessTokens = function accessTokens() {\n  return this._proxy.accessTokens;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nServiceInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ServiceContext\n *\n * @constructor Twilio.Verify.V2.ServiceContext\n *\n * @property {Twilio.Verify.V2.ServiceContext.VerificationList} verifications -\n *          verifications resource\n * @property {Twilio.Verify.V2.ServiceContext.VerificationCheckList} verificationChecks -\n *          verificationChecks resource\n * @property {Twilio.Verify.V2.ServiceContext.RateLimitList} rateLimits -\n *          rateLimits resource\n * @property {Twilio.Verify.V2.ServiceContext.MessagingConfigurationList} messagingConfigurations -\n *          messagingConfigurations resource\n * @property {Twilio.Verify.V2.ServiceContext.EntityList} entities -\n *          entities resource\n * @property {Twilio.Verify.V2.ServiceContext.WebhookList} webhooks -\n *          webhooks resource\n * @property {Twilio.Verify.V2.ServiceContext.AccessTokenList} accessTokens -\n *          accessTokens resource\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nServiceContext = function ServiceContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Services/${sid}`;\n\n  // Dependents\n  this._verifications = undefined;\n  this._verificationChecks = undefined;\n  this._rateLimits = undefined;\n  this._messagingConfigurations = undefined;\n  this._entities = undefined;\n  this._webhooks = undefined;\n  this._accessTokens = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ServiceInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ServiceInstance\n *\n * @function remove\n * @memberof Twilio.Verify.V2.ServiceContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ServiceInstance\n *\n * @function update\n * @memberof Twilio.Verify.V2.ServiceContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] -\n *          A string to describe the verification service\n * @param {number} [opts.codeLength] -\n *          The length of the verification code to generate\n * @param {boolean} [opts.lookupEnabled] -\n *          Whether to perform a lookup with each verification\n * @param {boolean} [opts.skipSmsToLandlines] -\n *          Whether to skip sending SMS verifications to landlines\n * @param {boolean} [opts.dtmfInputRequired] -\n *          Whether to ask the user to press a number before delivering the verify code in a phone call\n * @param {string} [opts.ttsName] -\n *          The name of an alternative text-to-speech service to use in phone calls\n * @param {boolean} [opts.psd2Enabled] -\n *          Whether to pass PSD2 transaction parameters when starting a verification\n * @param {boolean} [opts.doNotShareWarningEnabled] -\n *          Whether to add a privacy warning at the end of an SMS.\n * @param {boolean} [opts.customCodeEnabled] -\n *          Whether to allow sending verifications with a custom code.\n * @param {boolean} [opts.push.includeDate] -\n *          Optional. Include the date in the Challenge's response. Default: false. **Deprecated** do not use this parameter.\n * @param {string} [opts.push.apnCredentialSid] -\n *          Optional. Set APN Credential for this service.\n * @param {string} [opts.push.fcmCredentialSid] -\n *          Optional. Set FCM Credential for this service.\n * @param {string} [opts.totp.issuer] - Optional. Set TOTP Issuer for this service.\n * @param {number} [opts.totp.timeStep] -\n *          Optional. How often, in seconds, are TOTP codes generated\n * @param {number} [opts.totp.codeLength] -\n *          Optional. Number of digits for generated TOTP codes\n * @param {number} [opts.totp.skew] -\n *          Optional. The number of past and future time-steps valid at a given time\n * @param {string} [opts.defaultTemplateSid] -\n *          The verification template SMS messages.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ServiceInstance\n */\n/* jshint ignore:end */\nServiceContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'CodeLength': _.get(opts, 'codeLength'),\n    'LookupEnabled': serialize.bool(_.get(opts, 'lookupEnabled')),\n    'SkipSmsToLandlines': serialize.bool(_.get(opts, 'skipSmsToLandlines')),\n    'DtmfInputRequired': serialize.bool(_.get(opts, 'dtmfInputRequired')),\n    'TtsName': _.get(opts, 'ttsName'),\n    'Psd2Enabled': serialize.bool(_.get(opts, 'psd2Enabled')),\n    'DoNotShareWarningEnabled': serialize.bool(_.get(opts, 'doNotShareWarningEnabled')),\n    'CustomCodeEnabled': serialize.bool(_.get(opts, 'customCodeEnabled')),\n    'Push.IncludeDate': serialize.bool(_.get(opts, 'push.includeDate')),\n    'Push.ApnCredentialSid': _.get(opts, 'push.apnCredentialSid'),\n    'Push.FcmCredentialSid': _.get(opts, 'push.fcmCredentialSid'),\n    'Totp.Issuer': _.get(opts, 'totp.issuer'),\n    'Totp.TimeStep': _.get(opts, 'totp.timeStep'),\n    'Totp.CodeLength': _.get(opts, 'totp.codeLength'),\n    'Totp.Skew': _.get(opts, 'totp.skew'),\n    'DefaultTemplateSid': _.get(opts, 'defaultTemplateSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ServiceInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ServiceContext.prototype,\n  'verifications', {\n    get: function() {\n      if (!this._verifications) {\n        this._verifications = new VerificationList(this._version, this._solution.sid);\n      }\n      return this._verifications;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'verificationChecks', {\n    get: function() {\n      if (!this._verificationChecks) {\n        this._verificationChecks = new VerificationCheckList(this._version, this._solution.sid);\n      }\n      return this._verificationChecks;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'rateLimits', {\n    get: function() {\n      if (!this._rateLimits) {\n        this._rateLimits = new RateLimitList(this._version, this._solution.sid);\n      }\n      return this._rateLimits;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'messagingConfigurations', {\n    get: function() {\n      if (!this._messagingConfigurations) {\n        this._messagingConfigurations = new MessagingConfigurationList(this._version, this._solution.sid);\n      }\n      return this._messagingConfigurations;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'entities', {\n    get: function() {\n      if (!this._entities) {\n        this._entities = new EntityList(this._version, this._solution.sid);\n      }\n      return this._entities;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'webhooks', {\n    get: function() {\n      if (!this._webhooks) {\n        this._webhooks = new WebhookList(this._version, this._solution.sid);\n      }\n      return this._webhooks;\n    }\n});\n\nObject.defineProperty(ServiceContext.prototype,\n  'accessTokens', {\n    get: function() {\n      if (!this._accessTokens) {\n        this._accessTokens = new AccessTokenList(this._version, this._solution.sid);\n      }\n      return this._accessTokens;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.ServiceContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nServiceContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nServiceContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ServiceList: ServiceList,\n  ServicePage: ServicePage,\n  ServiceInstance: ServiceInstance,\n  ServiceContext: ServiceContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar TemplateList;\nvar TemplatePage;\nvar TemplateInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the TemplateList\n *\n * @constructor Twilio.Verify.V2.TemplateList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nTemplateList = function TemplateList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function templates\n   * @memberof Twilio.Verify.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.TemplateContext}\n   */\n  /* jshint ignore:end */\n  function TemplateListInstance(sid) {\n    return TemplateListInstance.get(sid);\n  }\n\n  TemplateListInstance._version = version;\n  // Path Solution\n  TemplateListInstance._solution = {};\n  TemplateListInstance._uri = `/Templates`;\n  /* jshint ignore:start */\n  /**\n   * Streams TemplateInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.TemplateList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - Filter templates using friendly name\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  TemplateListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists TemplateInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.TemplateList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - Filter templates using friendly name\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TemplateListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of TemplateInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.TemplateList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - Filter templates using friendly name\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TemplateListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TemplatePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of TemplateInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.TemplateList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  TemplateListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new TemplatePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.TemplateList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  TemplateListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  TemplateListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return TemplateListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TemplatePage\n *\n * @constructor Twilio.Verify.V2.TemplatePage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {TemplateSolution} solution - Path solution\n *\n * @returns TemplatePage\n */\n/* jshint ignore:end */\nTemplatePage = function TemplatePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(TemplatePage.prototype, Page.prototype);\nTemplatePage.prototype.constructor = TemplatePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of TemplateInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.TemplatePage#\n *\n * @param {TemplatePayload} payload - Payload response from the API\n *\n * @returns TemplateInstance\n */\n/* jshint ignore:end */\nTemplatePage.prototype.getInstance = function getInstance(payload) {\n  return new TemplateInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.TemplatePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTemplatePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTemplatePage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the TemplateContext\n *\n * @constructor Twilio.Verify.V2.TemplateInstance\n *\n * @property {string} sid - A string that uniquely identifies this Template\n * @property {string} accountSid - Account Sid\n * @property {string} friendlyName - A string to describe the verification template\n * @property {object} translations - Object with the template translations.\n *\n * @param {V2} version - Version of the resource\n * @param {TemplatePayload} payload - The instance payload\n */\n/* jshint ignore:end */\nTemplateInstance = function TemplateInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.translations = payload.translations; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.TemplateInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nTemplateInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nTemplateInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  TemplateList: TemplateList,\n  TemplatePage: TemplatePage,\n  TemplateInstance: TemplateInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar VerificationAttemptList;\nvar VerificationAttemptPage;\nvar VerificationAttemptInstance;\nvar VerificationAttemptContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationAttemptList\n *\n * @constructor Twilio.Verify.V2.VerificationAttemptList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nVerificationAttemptList = function VerificationAttemptList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function verificationAttempts\n   * @memberof Twilio.Verify.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.VerificationAttemptContext}\n   */\n  /* jshint ignore:end */\n  function VerificationAttemptListInstance(sid) {\n    return VerificationAttemptListInstance.get(sid);\n  }\n\n  VerificationAttemptListInstance._version = version;\n  // Path Solution\n  VerificationAttemptListInstance._solution = {};\n  VerificationAttemptListInstance._uri = `/Attempts`;\n  /* jshint ignore:start */\n  /**\n   * Streams VerificationAttemptInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Verify.V2.VerificationAttemptList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Filter verification attempts after this date.\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Filter verification attempts before this date.\n   * @param {string} [opts.channelData.to] -\n   *          Filters by destination of the verification attempt.\n   * @param {string} [opts.country] -\n   *          Filter verification attempts by destination country.\n   * @param {verification_attempt.channels} [opts.channel] -\n   *          Filter verification attempts by communication channel.\n   * @param {string} [opts.verifyServiceSid] -\n   *          Filter verification attempts by verify service.\n   * @param {string} [opts.verificationSid] - Filter attempts by verification.\n   * @param {verification_attempt.conversion_status} [opts.status] -\n   *          Filter verification attempts by conversion status.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  VerificationAttemptListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists VerificationAttemptInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Verify.V2.VerificationAttemptList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Filter verification attempts after this date.\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Filter verification attempts before this date.\n   * @param {string} [opts.channelData.to] -\n   *          Filters by destination of the verification attempt.\n   * @param {string} [opts.country] -\n   *          Filter verification attempts by destination country.\n   * @param {verification_attempt.channels} [opts.channel] -\n   *          Filter verification attempts by communication channel.\n   * @param {string} [opts.verifyServiceSid] -\n   *          Filter verification attempts by verify service.\n   * @param {string} [opts.verificationSid] - Filter attempts by verification.\n   * @param {verification_attempt.conversion_status} [opts.status] -\n   *          Filter verification attempts by conversion status.\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  VerificationAttemptListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of VerificationAttemptInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Verify.V2.VerificationAttemptList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Filter verification attempts after this date.\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Filter verification attempts before this date.\n   * @param {string} [opts.channelData.to] -\n   *          Filters by destination of the verification attempt.\n   * @param {string} [opts.country] -\n   *          Filter verification attempts by destination country.\n   * @param {verification_attempt.channels} [opts.channel] -\n   *          Filter verification attempts by communication channel.\n   * @param {string} [opts.verifyServiceSid] -\n   *          Filter verification attempts by verify service.\n   * @param {string} [opts.verificationSid] - Filter attempts by verification.\n   * @param {verification_attempt.conversion_status} [opts.status] -\n   *          Filter verification attempts by conversion status.\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  VerificationAttemptListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n      'ChannelData.To': _.get(opts, 'channelData.to'),\n      'Country': _.get(opts, 'country'),\n      'Channel': _.get(opts, 'channel'),\n      'VerifyServiceSid': _.get(opts, 'verifyServiceSid'),\n      'VerificationSid': _.get(opts, 'verificationSid'),\n      'Status': _.get(opts, 'status'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new VerificationAttemptPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of VerificationAttemptInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Verify.V2.VerificationAttemptList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  VerificationAttemptListInstance.getPage = function getPage(targetUrl, callback)\n                                                              {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new VerificationAttemptPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a verification_attempt\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.VerificationAttemptList#\n   *\n   * @param {string} sid - Verification Attempt Sid.\n   *\n   * @returns {Twilio.Verify.V2.VerificationAttemptContext}\n   */\n  /* jshint ignore:end */\n  VerificationAttemptListInstance.get = function get(sid) {\n    return new VerificationAttemptContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.VerificationAttemptList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  VerificationAttemptListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  VerificationAttemptListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return VerificationAttemptListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationAttemptPage\n *\n * @constructor Twilio.Verify.V2.VerificationAttemptPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {VerificationAttemptSolution} solution - Path solution\n *\n * @returns VerificationAttemptPage\n */\n/* jshint ignore:end */\nVerificationAttemptPage = function VerificationAttemptPage(version, response,\n                                                            solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(VerificationAttemptPage.prototype, Page.prototype);\nVerificationAttemptPage.prototype.constructor = VerificationAttemptPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of VerificationAttemptInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.VerificationAttemptPage#\n *\n * @param {VerificationAttemptPayload} payload - Payload response from the API\n *\n * @returns VerificationAttemptInstance\n */\n/* jshint ignore:end */\nVerificationAttemptPage.prototype.getInstance = function getInstance(payload) {\n  return new VerificationAttemptInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.VerificationAttemptPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationAttemptPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVerificationAttemptPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationAttemptContext\n *\n * @constructor Twilio.Verify.V2.VerificationAttemptInstance\n *\n * @property {string} sid -\n *          The SID that uniquely identifies the verification attempt.\n * @property {string} accountSid -\n *          The SID of the Account that created the verification.\n * @property {string} serviceSid -\n *          The SID of the verify service that generated this attempt.\n * @property {string} verificationSid -\n *          The SID of the verification that generated this attempt.\n * @property {Date} dateCreated - The date this Attempt was created\n * @property {Date} dateUpdated - The date this Attempt was updated\n * @property {verification_attempt.conversion_status} conversionStatus -\n *          Status of the conversion for the verification.\n * @property {verification_attempt.channels} channel -\n *          Communication channel used for the attempt.\n * @property {object} price -\n *          An object containing the charge for this verification attempt.\n * @property {object} channelData -\n *          An object containing the channel specific information for an attempt.\n * @property {string} url - The url\n *\n * @param {V2} version - Version of the resource\n * @param {VerificationAttemptPayload} payload - The instance payload\n * @param {sid} sid - Verification Attempt Sid.\n */\n/* jshint ignore:end */\nVerificationAttemptInstance = function VerificationAttemptInstance(version,\n    payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.serviceSid = payload.service_sid; // jshint ignore:line\n  this.verificationSid = payload.verification_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.conversionStatus = payload.conversion_status; // jshint ignore:line\n  this.channel = payload.channel; // jshint ignore:line\n  this.price = payload.price; // jshint ignore:line\n  this.channelData = payload.channel_data; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(VerificationAttemptInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new VerificationAttemptContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a VerificationAttemptInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.VerificationAttemptInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VerificationAttemptInstance\n */\n/* jshint ignore:end */\nVerificationAttemptInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.VerificationAttemptInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationAttemptInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVerificationAttemptInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationAttemptContext\n *\n * @constructor Twilio.Verify.V2.VerificationAttemptContext\n *\n * @param {V2} version - Version of the resource\n * @param {sid} sid - Verification Attempt Sid.\n */\n/* jshint ignore:end */\nVerificationAttemptContext = function VerificationAttemptContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Attempts/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a VerificationAttemptInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.VerificationAttemptContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VerificationAttemptInstance\n */\n/* jshint ignore:end */\nVerificationAttemptContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new VerificationAttemptInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.VerificationAttemptContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationAttemptContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nVerificationAttemptContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  VerificationAttemptList: VerificationAttemptList,\n  VerificationAttemptPage: VerificationAttemptPage,\n  VerificationAttemptInstance: VerificationAttemptInstance,\n  VerificationAttemptContext: VerificationAttemptContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar VerificationAttemptsSummaryList;\nvar VerificationAttemptsSummaryPage;\nvar VerificationAttemptsSummaryInstance;\nvar VerificationAttemptsSummaryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationAttemptsSummaryList\n *\n * @constructor Twilio.Verify.V2.VerificationAttemptsSummaryList\n *\n * @param {Twilio.Verify.V2} version - Version of the resource\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryList = function\n    VerificationAttemptsSummaryList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function verificationAttemptsSummary\n   * @memberof Twilio.Verify.V2#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Verify.V2.VerificationAttemptsSummaryContext}\n   */\n  /* jshint ignore:end */\n  function VerificationAttemptsSummaryListInstance(sid) {\n    return VerificationAttemptsSummaryListInstance.get(sid);\n  }\n\n  VerificationAttemptsSummaryListInstance._version = version;\n  // Path Solution\n  VerificationAttemptsSummaryListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a verification_attempts_summary\n   *\n   * @function get\n   * @memberof Twilio.Verify.V2.VerificationAttemptsSummaryList#\n   *\n   * @returns {Twilio.Verify.V2.VerificationAttemptsSummaryContext}\n   */\n  /* jshint ignore:end */\n  VerificationAttemptsSummaryListInstance.get = function get() {\n    return new VerificationAttemptsSummaryContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Verify.V2.VerificationAttemptsSummaryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  VerificationAttemptsSummaryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  VerificationAttemptsSummaryListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return VerificationAttemptsSummaryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationAttemptsSummaryPage\n *\n * @constructor Twilio.Verify.V2.VerificationAttemptsSummaryPage\n *\n * @param {V2} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {VerificationAttemptsSummarySolution} solution - Path solution\n *\n * @returns VerificationAttemptsSummaryPage\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryPage = function\n    VerificationAttemptsSummaryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(VerificationAttemptsSummaryPage.prototype, Page.prototype);\nVerificationAttemptsSummaryPage.prototype.constructor = VerificationAttemptsSummaryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of VerificationAttemptsSummaryInstance\n *\n * @function getInstance\n * @memberof Twilio.Verify.V2.VerificationAttemptsSummaryPage#\n *\n * @param {VerificationAttemptsSummaryPayload} payload -\n *          Payload response from the API\n *\n * @returns VerificationAttemptsSummaryInstance\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new VerificationAttemptsSummaryInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.VerificationAttemptsSummaryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVerificationAttemptsSummaryPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationAttemptsSummaryContext\n *\n * @constructor Twilio.Verify.V2.VerificationAttemptsSummaryInstance\n *\n * @property {number} totalAttempts - Total of attempts made.\n * @property {number} totalConverted - Total of attempts confirmed by the end user.\n * @property {number} totalUnconverted -\n *          Total of attempts made that were not confirmed by the end user.\n * @property {number} conversionRatePercentage -\n *          Percentage of the confirmed messages over the total.\n * @property {string} url - The url\n *\n * @param {V2} version - Version of the resource\n * @param {VerificationAttemptsSummaryPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryInstance = function\n    VerificationAttemptsSummaryInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.totalAttempts = deserialize.integer(payload.total_attempts); // jshint ignore:line\n  this.totalConverted = deserialize.integer(payload.total_converted); // jshint ignore:line\n  this.totalUnconverted = deserialize.integer(payload.total_unconverted); // jshint ignore:line\n  this.conversionRatePercentage = deserialize.decimal(payload.conversion_rate_percentage); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(VerificationAttemptsSummaryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new VerificationAttemptsSummaryContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a VerificationAttemptsSummaryInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.VerificationAttemptsSummaryInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.verifyServiceSid] -\n *          Filter the verification attempts considered on the summary by verify service.\n * @param {Date} [opts.dateCreatedAfter] -\n *          Consider verification attempts create after this date on the summary.\n * @param {Date} [opts.dateCreatedBefore] -\n *          Consider verification attempts created before this date on the summary.\n * @param {string} [opts.country] -\n *          Filter verification attempts considered on the summary by destination country.\n * @param {verification_attempts_summary.channels} [opts.channel] -\n *          Filter verification attempts considered on the summary by communication channel.\n * @param {string} [opts.destinationPrefix] -\n *          Filters the attempts considered on the summary by destination prefix.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VerificationAttemptsSummaryInstance\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryInstance.prototype.fetch = function fetch(opts,\n    callback) {\n  return this._proxy.fetch(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.VerificationAttemptsSummaryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nVerificationAttemptsSummaryInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the VerificationAttemptsSummaryContext\n *\n * @constructor Twilio.Verify.V2.VerificationAttemptsSummaryContext\n *\n * @param {V2} version - Version of the resource\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryContext = function\n    VerificationAttemptsSummaryContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/Attempts/Summary`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a VerificationAttemptsSummaryInstance\n *\n * @function fetch\n * @memberof Twilio.Verify.V2.VerificationAttemptsSummaryContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.verifyServiceSid] -\n *          Filter the verification attempts considered on the summary by verify service.\n * @param {Date} [opts.dateCreatedAfter] -\n *          Consider verification attempts create after this date on the summary.\n * @param {Date} [opts.dateCreatedBefore] -\n *          Consider verification attempts created before this date on the summary.\n * @param {string} [opts.country] -\n *          Filter verification attempts considered on the summary by destination country.\n * @param {verification_attempts_summary.channels} [opts.channel] -\n *          Filter verification attempts considered on the summary by communication channel.\n * @param {string} [opts.destinationPrefix] -\n *          Filters the attempts considered on the summary by destination prefix.\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed VerificationAttemptsSummaryInstance\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryContext.prototype.fetch = function fetch(opts,\n    callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'VerifyServiceSid': _.get(opts, 'verifyServiceSid'),\n    'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n    'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n    'Country': _.get(opts, 'country'),\n    'Channel': _.get(opts, 'channel'),\n    'DestinationPrefix': _.get(opts, 'destinationPrefix')\n  });\n\n  var promise = this._version.fetch({uri: this._uri, method: 'GET', params: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new VerificationAttemptsSummaryInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Verify.V2.VerificationAttemptsSummaryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nVerificationAttemptsSummaryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nVerificationAttemptsSummaryContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  VerificationAttemptsSummaryList: VerificationAttemptsSummaryList,\n  VerificationAttemptsSummaryPage: VerificationAttemptsSummaryPage,\n  VerificationAttemptsSummaryInstance: VerificationAttemptsSummaryInstance,\n  VerificationAttemptsSummaryContext: VerificationAttemptsSummaryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar FormList = require('./v2/form').FormList;\nvar ServiceList = require('./v2/service').ServiceList;\nvar TemplateList = require('./v2/template').TemplateList;\nvar VerificationAttemptList = require(\n    './v2/verificationAttempt').VerificationAttemptList;\nvar VerificationAttemptsSummaryList = require(\n    './v2/verificationAttemptsSummary').VerificationAttemptsSummaryList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V2 version of Verify\n *\n * @constructor Twilio.Verify.V2\n *\n * @property {Twilio.Verify.V2.FormList} forms - forms resource\n * @property {Twilio.Verify.V2.ServiceList} services - services resource\n * @property {Twilio.Verify.V2.VerificationAttemptList} verificationAttempts -\n *          verificationAttempts resource\n * @property {Twilio.Verify.V2.VerificationAttemptsSummaryList} verificationAttemptsSummary -\n *          verificationAttemptsSummary resource\n * @property {Twilio.Verify.V2.TemplateList} templates - templates resource\n *\n * @param {Twilio.Verify} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V2(domain) {\n  Version.prototype.constructor.call(this, domain, 'v2');\n\n  // Resources\n  this._forms = undefined;\n  this._services = undefined;\n  this._verificationAttempts = undefined;\n  this._verificationAttemptsSummary = undefined;\n  this._templates = undefined;\n}\n\n_.extend(V2.prototype, Version.prototype);\nV2.prototype.constructor = V2;\n\nObject.defineProperty(V2.prototype,\n  'forms', {\n    get: function() {\n      this._forms = this._forms || new FormList(this);\n      return this._forms;\n    }\n});\n\nObject.defineProperty(V2.prototype,\n  'services', {\n    get: function() {\n      this._services = this._services || new ServiceList(this);\n      return this._services;\n    }\n});\n\nObject.defineProperty(V2.prototype,\n  'verificationAttempts', {\n    get: function() {\n      this._verificationAttempts = this._verificationAttempts || new VerificationAttemptList(this);\n      return this._verificationAttempts;\n    }\n});\n\nObject.defineProperty(V2.prototype,\n  'verificationAttemptsSummary', {\n    get: function() {\n      this._verificationAttemptsSummary = this._verificationAttemptsSummary || new VerificationAttemptsSummaryList(this);\n      return this._verificationAttemptsSummary;\n    }\n});\n\nObject.defineProperty(V2.prototype,\n  'templates', {\n    get: function() {\n      this._templates = this._templates || new TemplateList(this);\n      return this._templates;\n    }\n});\n\nmodule.exports = V2;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V2 = require('./verify/V2');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize verify domain\n *\n * @constructor Twilio.Verify\n *\n * @property {Twilio.Verify.V2} v2 - v2 version\n * @property {Twilio.Verify.V2.FormList} forms - forms resource\n * @property {Twilio.Verify.V2.ServiceList} services - services resource\n * @property {Twilio.Verify.V2.VerificationAttemptList} verificationAttempts -\n *          verificationAttempts resource\n * @property {Twilio.Verify.V2.VerificationAttemptsSummaryList} verificationAttemptsSummary -\n *          verificationAttemptsSummary resource\n * @property {Twilio.Verify.V2.TemplateList} templates - templates resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Verify(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://verify.twilio.com');\n\n  // Versions\n  this._v2 = undefined;\n}\n\n_.extend(Verify.prototype, Domain.prototype);\nVerify.prototype.constructor = Verify;\n\nObject.defineProperty(Verify.prototype,\n  'v2', {\n    get: function() {\n      this._v2 = this._v2 || new V2(this);\n      return this._v2;\n    }\n});\n\nObject.defineProperty(Verify.prototype,\n  'forms', {\n    get: function() {\n      return this.v2.forms;\n    }\n});\n\nObject.defineProperty(Verify.prototype,\n  'services', {\n    get: function() {\n      return this.v2.services;\n    }\n});\n\nObject.defineProperty(Verify.prototype,\n  'verificationAttempts', {\n    get: function() {\n      return this.v2.verificationAttempts;\n    }\n});\n\nObject.defineProperty(Verify.prototype,\n  'verificationAttemptsSummary', {\n    get: function() {\n      return this.v2.verificationAttemptsSummary;\n    }\n});\n\nObject.defineProperty(Verify.prototype,\n  'templates', {\n    get: function() {\n      return this.v2.templates;\n    }\n});\n\nmodule.exports = Verify;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CompositionHookList;\nvar CompositionHookPage;\nvar CompositionHookInstance;\nvar CompositionHookContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionHookList\n *\n * @constructor Twilio.Video.V1.CompositionHookList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCompositionHookList = function CompositionHookList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function compositionHooks\n   * @memberof Twilio.Video.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.CompositionHookContext}\n   */\n  /* jshint ignore:end */\n  function CompositionHookListInstance(sid) {\n    return CompositionHookListInstance.get(sid);\n  }\n\n  CompositionHookListInstance._version = version;\n  // Path Solution\n  CompositionHookListInstance._solution = {};\n  CompositionHookListInstance._uri = `/CompositionHooks`;\n  /* jshint ignore:start */\n  /**\n   * Streams CompositionHookInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Video.V1.CompositionHookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.enabled] -\n   *          Read only CompositionHook resources with an enabled value that matches this parameter\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only CompositionHook resources created on or after this ISO 8601 datetime with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only CompositionHook resources created before this ISO 8601 datetime with time zone\n   * @param {string} [opts.friendlyName] -\n   *          Read only CompositionHook resources with friendly names that match this string\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CompositionHookListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CompositionHookInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Video.V1.CompositionHookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.enabled] -\n   *          Read only CompositionHook resources with an enabled value that matches this parameter\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only CompositionHook resources created on or after this ISO 8601 datetime with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only CompositionHook resources created before this ISO 8601 datetime with time zone\n   * @param {string} [opts.friendlyName] -\n   *          Read only CompositionHook resources with friendly names that match this string\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CompositionHookListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CompositionHookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Video.V1.CompositionHookList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.enabled] -\n   *          Read only CompositionHook resources with an enabled value that matches this parameter\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only CompositionHook resources created on or after this ISO 8601 datetime with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only CompositionHook resources created before this ISO 8601 datetime with time zone\n   * @param {string} [opts.friendlyName] -\n   *          Read only CompositionHook resources with friendly names that match this string\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CompositionHookListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Enabled': serialize.bool(_.get(opts, 'enabled')),\n      'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CompositionHookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CompositionHookInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Video.V1.CompositionHookList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CompositionHookListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CompositionHookPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CompositionHookInstance\n   *\n   * @function create\n   * @memberof Twilio.Video.V1.CompositionHookList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.friendlyName - A unique string to describe the resource\n   * @param {boolean} [opts.enabled] - Whether the composition hook is active\n   * @param {object} [opts.videoLayout] -\n   *          An object that describes the video layout of the composition hook\n   * @param {string|list} [opts.audioSources] -\n   *          An array of track names from the same group room to merge\n   * @param {string|list} [opts.audioSourcesExcluded] -\n   *          An array of track names to exclude\n   * @param {string} [opts.resolution] -\n   *          A string that describes the rows (width) and columns (height) of the generated composed video in pixels\n   * @param {composition_hook.format} [opts.format] -\n   *          The container format of the media files used by the compositions created by the composition hook\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method we should use to call status_callback\n   * @param {boolean} [opts.trim] -\n   *          Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CompositionHookInstance\n   */\n  /* jshint ignore:end */\n  CompositionHookListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Enabled': serialize.bool(_.get(opts, 'enabled')),\n      'VideoLayout': serialize.object(_.get(opts, 'videoLayout')),\n      'AudioSources': serialize.map(_.get(opts, 'audioSources'), function(e) { return e; }),\n      'AudioSourcesExcluded': serialize.map(_.get(opts, 'audioSourcesExcluded'), function(e) { return e; }),\n      'Resolution': _.get(opts, 'resolution'),\n      'Format': _.get(opts, 'format'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'Trim': serialize.bool(_.get(opts, 'trim'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CompositionHookInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a composition_hook\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.CompositionHookList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Video.V1.CompositionHookContext}\n   */\n  /* jshint ignore:end */\n  CompositionHookListInstance.get = function get(sid) {\n    return new CompositionHookContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.CompositionHookList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CompositionHookListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CompositionHookListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CompositionHookListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionHookPage\n *\n * @constructor Twilio.Video.V1.CompositionHookPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CompositionHookSolution} solution - Path solution\n *\n * @returns CompositionHookPage\n */\n/* jshint ignore:end */\nCompositionHookPage = function CompositionHookPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CompositionHookPage.prototype, Page.prototype);\nCompositionHookPage.prototype.constructor = CompositionHookPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CompositionHookInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.CompositionHookPage#\n *\n * @param {CompositionHookPayload} payload - Payload response from the API\n *\n * @returns CompositionHookInstance\n */\n/* jshint ignore:end */\nCompositionHookPage.prototype.getInstance = function getInstance(payload) {\n  return new CompositionHookInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.CompositionHookPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCompositionHookPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCompositionHookPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionHookContext\n *\n * @constructor Twilio.Video.V1.CompositionHookInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {boolean} enabled - Whether the CompositionHook is active\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} audioSources -\n *          The array of track names to include in the compositions created by the composition hook\n * @property {string} audioSourcesExcluded -\n *          The array of track names to exclude from the compositions created by the composition hook\n * @property {object} videoLayout -\n *          A JSON object that describes the video layout of the Composition\n * @property {string} resolution -\n *          The dimensions of the video image in pixels expressed as columns (width) and rows (height)\n * @property {boolean} trim - Whether intervals with no media are clipped\n * @property {composition_hook.format} format -\n *          The container format of the media files used by the compositions created by the composition hook\n * @property {string} statusCallback -\n *          The URL to send status information to your application\n * @property {string} statusCallbackMethod -\n *          The HTTP method we should use to call status_callback\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {CompositionHookPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nCompositionHookInstance = function CompositionHookInstance(version, payload,\n                                                            sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.audioSources = payload.audio_sources; // jshint ignore:line\n  this.audioSourcesExcluded = payload.audio_sources_excluded; // jshint ignore:line\n  this.videoLayout = payload.video_layout; // jshint ignore:line\n  this.resolution = payload.resolution; // jshint ignore:line\n  this.trim = payload.trim; // jshint ignore:line\n  this.format = payload.format; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CompositionHookInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CompositionHookContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CompositionHookInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.CompositionHookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionHookInstance\n */\n/* jshint ignore:end */\nCompositionHookInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CompositionHookInstance\n *\n * @function remove\n * @memberof Twilio.Video.V1.CompositionHookInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionHookInstance\n */\n/* jshint ignore:end */\nCompositionHookInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a CompositionHookInstance\n *\n * @function update\n * @memberof Twilio.Video.V1.CompositionHookInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - A unique string to describe the resource\n * @param {boolean} [opts.enabled] - Whether the composition hook is active\n * @param {object} [opts.videoLayout] -\n *          A JSON object that describes the video layout of the composition hook\n * @param {string|list} [opts.audioSources] -\n *          An array of track names from the same group room to merge\n * @param {string|list} [opts.audioSourcesExcluded] -\n *          An array of track names to exclude\n * @param {boolean} [opts.trim] -\n *          Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook\n * @param {composition_hook.format} [opts.format] -\n *          The container format of the media files used by the compositions created by the composition hook\n * @param {string} [opts.resolution] -\n *          A string that describes the columns (width) and rows (height) of the generated composed video in pixels\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionHookInstance\n */\n/* jshint ignore:end */\nCompositionHookInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.CompositionHookInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCompositionHookInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCompositionHookInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionHookContext\n *\n * @constructor Twilio.Video.V1.CompositionHookContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nCompositionHookContext = function CompositionHookContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/CompositionHooks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CompositionHookInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.CompositionHookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionHookInstance\n */\n/* jshint ignore:end */\nCompositionHookContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CompositionHookInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CompositionHookInstance\n *\n * @function remove\n * @memberof Twilio.Video.V1.CompositionHookContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionHookInstance\n */\n/* jshint ignore:end */\nCompositionHookContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a CompositionHookInstance\n *\n * @function update\n * @memberof Twilio.Video.V1.CompositionHookContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - A unique string to describe the resource\n * @param {boolean} [opts.enabled] - Whether the composition hook is active\n * @param {object} [opts.videoLayout] -\n *          A JSON object that describes the video layout of the composition hook\n * @param {string|list} [opts.audioSources] -\n *          An array of track names from the same group room to merge\n * @param {string|list} [opts.audioSourcesExcluded] -\n *          An array of track names to exclude\n * @param {boolean} [opts.trim] -\n *          Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook\n * @param {composition_hook.format} [opts.format] -\n *          The container format of the media files used by the compositions created by the composition hook\n * @param {string} [opts.resolution] -\n *          A string that describes the columns (width) and rows (height) of the generated composed video in pixels\n * @param {string} [opts.statusCallback] -\n *          The URL we should call to send status information to your application\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionHookInstance\n */\n/* jshint ignore:end */\nCompositionHookContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['friendlyName'])) {\n    throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Enabled': serialize.bool(_.get(opts, 'enabled')),\n    'VideoLayout': serialize.object(_.get(opts, 'videoLayout')),\n    'AudioSources': serialize.map(_.get(opts, 'audioSources'), function(e) { return e; }),\n    'AudioSourcesExcluded': serialize.map(_.get(opts, 'audioSourcesExcluded'), function(e) { return e; }),\n    'Trim': serialize.bool(_.get(opts, 'trim')),\n    'Format': _.get(opts, 'format'),\n    'Resolution': _.get(opts, 'resolution'),\n    'StatusCallback': _.get(opts, 'statusCallback'),\n    'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CompositionHookInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.CompositionHookContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCompositionHookContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCompositionHookContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CompositionHookList: CompositionHookList,\n  CompositionHookPage: CompositionHookPage,\n  CompositionHookInstance: CompositionHookInstance,\n  CompositionHookContext: CompositionHookContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CompositionList;\nvar CompositionPage;\nvar CompositionInstance;\nvar CompositionContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionList\n *\n * @constructor Twilio.Video.V1.CompositionList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCompositionList = function CompositionList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function compositions\n   * @memberof Twilio.Video.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.CompositionContext}\n   */\n  /* jshint ignore:end */\n  function CompositionListInstance(sid) {\n    return CompositionListInstance.get(sid);\n  }\n\n  CompositionListInstance._version = version;\n  // Path Solution\n  CompositionListInstance._solution = {};\n  CompositionListInstance._uri = `/Compositions`;\n  /* jshint ignore:start */\n  /**\n   * Streams CompositionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Video.V1.CompositionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {composition.status} [opts.status] -\n   *          Read only Composition resources with this status\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only Composition resources created on or after this {@link https://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date-time with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only Composition resources created before this ISO 8601 date-time with time zone\n   * @param {string} [opts.roomSid] -\n   *          Read only Composition resources with this Room SID\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CompositionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CompositionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Video.V1.CompositionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {composition.status} [opts.status] -\n   *          Read only Composition resources with this status\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only Composition resources created on or after this {@link https://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date-time with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only Composition resources created before this ISO 8601 date-time with time zone\n   * @param {string} [opts.roomSid] -\n   *          Read only Composition resources with this Room SID\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CompositionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CompositionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Video.V1.CompositionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {composition.status} [opts.status] -\n   *          Read only Composition resources with this status\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only Composition resources created on or after this {@link https://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date-time with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only Composition resources created before this ISO 8601 date-time with time zone\n   * @param {string} [opts.roomSid] -\n   *          Read only Composition resources with this Room SID\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CompositionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n      'RoomSid': _.get(opts, 'roomSid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CompositionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CompositionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Video.V1.CompositionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CompositionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CompositionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CompositionInstance\n   *\n   * @function create\n   * @memberof Twilio.Video.V1.CompositionList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.roomSid -\n   *          The SID of the Group Room with the media tracks to be used as composition sources\n   * @param {object} [opts.videoLayout] -\n   *          An object that describes the video layout of the composition\n   * @param {string|list} [opts.audioSources] -\n   *          An array of track names from the same group room to merge\n   * @param {string|list} [opts.audioSourcesExcluded] -\n   *          An array of track names to exclude\n   * @param {string} [opts.resolution] -\n   *          A string that describes the columns (width) and rows (height) of the generated composed video in pixels\n   * @param {composition.format} [opts.format] -\n   *          The container format of the composition's media files\n   * @param {string} [opts.statusCallback] -\n   *          The URL we should call to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method we should use to call status_callback\n   * @param {boolean} [opts.trim] -\n   *          Whether to clip the intervals where there is no active media in the composition\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CompositionInstance\n   */\n  /* jshint ignore:end */\n  CompositionListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['roomSid'])) {\n      throw new Error('Required parameter \"opts[\\'roomSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'RoomSid': _.get(opts, 'roomSid'),\n      'VideoLayout': serialize.object(_.get(opts, 'videoLayout')),\n      'AudioSources': serialize.map(_.get(opts, 'audioSources'), function(e) { return e; }),\n      'AudioSourcesExcluded': serialize.map(_.get(opts, 'audioSourcesExcluded'), function(e) { return e; }),\n      'Resolution': _.get(opts, 'resolution'),\n      'Format': _.get(opts, 'format'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'Trim': serialize.bool(_.get(opts, 'trim'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CompositionInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a composition\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.CompositionList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Video.V1.CompositionContext}\n   */\n  /* jshint ignore:end */\n  CompositionListInstance.get = function get(sid) {\n    return new CompositionContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.CompositionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CompositionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CompositionListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CompositionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionPage\n *\n * @constructor Twilio.Video.V1.CompositionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CompositionSolution} solution - Path solution\n *\n * @returns CompositionPage\n */\n/* jshint ignore:end */\nCompositionPage = function CompositionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CompositionPage.prototype, Page.prototype);\nCompositionPage.prototype.constructor = CompositionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CompositionInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.CompositionPage#\n *\n * @param {CompositionPayload} payload - Payload response from the API\n *\n * @returns CompositionInstance\n */\n/* jshint ignore:end */\nCompositionPage.prototype.getInstance = function getInstance(payload) {\n  return new CompositionInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.CompositionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCompositionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCompositionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionContext\n *\n * @constructor Twilio.Video.V1.CompositionInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {composition.status} status - The status of the composition\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateCompleted - Date when the media processing task finished\n * @property {Date} dateDeleted -\n *          The ISO 8601 date and time in GMT when the composition generated media was deleted\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} roomSid -\n *          The SID of the Group Room that generated the audio and video tracks used in the composition\n * @property {string} audioSources -\n *          The array of track names to include in the composition\n * @property {string} audioSourcesExcluded -\n *          The array of track names to exclude from the composition\n * @property {object} videoLayout -\n *          An object that describes the video layout of the composition\n * @property {string} resolution -\n *          The dimensions of the video image in pixels expressed as columns (width) and rows (height)\n * @property {boolean} trim - Whether to remove intervals with no media\n * @property {composition.format} format -\n *          The container format of the composition's media files as specified in the POST request that created the Composition resource\n * @property {number} bitrate - The average bit rate of the composition's media\n * @property {number} size - The size of the composed media file in bytes\n * @property {number} duration -\n *          The duration of the composition's media file in seconds\n * @property {string} mediaExternalLocation -\n *          The URL of the media file associated with the composition when stored externally\n * @property {string} statusCallback -\n *          The URL called to send status information on every composition event.\n * @property {string} statusCallbackMethod -\n *          The HTTP method used to call `status_callback`\n * @property {string} url - The absolute URL of the resource\n * @property {string} links -\n *          The URL of the media file associated with the composition\n *\n * @param {V1} version - Version of the resource\n * @param {CompositionPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nCompositionInstance = function CompositionInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateCompleted = deserialize.iso8601DateTime(payload.date_completed); // jshint ignore:line\n  this.dateDeleted = deserialize.iso8601DateTime(payload.date_deleted); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.roomSid = payload.room_sid; // jshint ignore:line\n  this.audioSources = payload.audio_sources; // jshint ignore:line\n  this.audioSourcesExcluded = payload.audio_sources_excluded; // jshint ignore:line\n  this.videoLayout = payload.video_layout; // jshint ignore:line\n  this.resolution = payload.resolution; // jshint ignore:line\n  this.trim = payload.trim; // jshint ignore:line\n  this.format = payload.format; // jshint ignore:line\n  this.bitrate = deserialize.integer(payload.bitrate); // jshint ignore:line\n  this.size = deserialize.integer(payload.size); // jshint ignore:line\n  this.duration = deserialize.integer(payload.duration); // jshint ignore:line\n  this.mediaExternalLocation = payload.media_external_location; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CompositionInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CompositionContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CompositionInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.CompositionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionInstance\n */\n/* jshint ignore:end */\nCompositionInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CompositionInstance\n *\n * @function remove\n * @memberof Twilio.Video.V1.CompositionInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionInstance\n */\n/* jshint ignore:end */\nCompositionInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.CompositionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCompositionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCompositionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionContext\n *\n * @constructor Twilio.Video.V1.CompositionContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nCompositionContext = function CompositionContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Compositions/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CompositionInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.CompositionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionInstance\n */\n/* jshint ignore:end */\nCompositionContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CompositionInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CompositionInstance\n *\n * @function remove\n * @memberof Twilio.Video.V1.CompositionContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionInstance\n */\n/* jshint ignore:end */\nCompositionContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.CompositionContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCompositionContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCompositionContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CompositionList: CompositionList,\n  CompositionPage: CompositionPage,\n  CompositionInstance: CompositionInstance,\n  CompositionContext: CompositionContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CompositionSettingsList;\nvar CompositionSettingsPage;\nvar CompositionSettingsInstance;\nvar CompositionSettingsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionSettingsList\n *\n * @constructor Twilio.Video.V1.CompositionSettingsList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCompositionSettingsList = function CompositionSettingsList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function compositionSettings\n   * @memberof Twilio.Video.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.CompositionSettingsContext}\n   */\n  /* jshint ignore:end */\n  function CompositionSettingsListInstance(sid) {\n    return CompositionSettingsListInstance.get(sid);\n  }\n\n  CompositionSettingsListInstance._version = version;\n  // Path Solution\n  CompositionSettingsListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a composition_settings\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.CompositionSettingsList#\n   *\n   * @returns {Twilio.Video.V1.CompositionSettingsContext}\n   */\n  /* jshint ignore:end */\n  CompositionSettingsListInstance.get = function get() {\n    return new CompositionSettingsContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.CompositionSettingsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CompositionSettingsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CompositionSettingsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CompositionSettingsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionSettingsPage\n *\n * @constructor Twilio.Video.V1.CompositionSettingsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CompositionSettingsSolution} solution - Path solution\n *\n * @returns CompositionSettingsPage\n */\n/* jshint ignore:end */\nCompositionSettingsPage = function CompositionSettingsPage(version, response,\n                                                            solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CompositionSettingsPage.prototype, Page.prototype);\nCompositionSettingsPage.prototype.constructor = CompositionSettingsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CompositionSettingsInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.CompositionSettingsPage#\n *\n * @param {CompositionSettingsPayload} payload - Payload response from the API\n *\n * @returns CompositionSettingsInstance\n */\n/* jshint ignore:end */\nCompositionSettingsPage.prototype.getInstance = function getInstance(payload) {\n  return new CompositionSettingsInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.CompositionSettingsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCompositionSettingsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCompositionSettingsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionSettingsContext\n *\n * @constructor Twilio.Video.V1.CompositionSettingsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} awsCredentialsSid - The SID of the stored Credential resource\n * @property {string} awsS3Url -\n *          The URL of the AWS S3 bucket where the compositions are stored\n * @property {boolean} awsStorageEnabled -\n *          Whether all compositions are written to the aws_s3_url\n * @property {string} encryptionKeySid -\n *          The SID of the Public Key resource used for encryption\n * @property {boolean} encryptionEnabled -\n *          Whether all compositions are stored in an encrypted form\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {CompositionSettingsPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nCompositionSettingsInstance = function CompositionSettingsInstance(version,\n    payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.awsCredentialsSid = payload.aws_credentials_sid; // jshint ignore:line\n  this.awsS3Url = payload.aws_s3_url; // jshint ignore:line\n  this.awsStorageEnabled = payload.aws_storage_enabled; // jshint ignore:line\n  this.encryptionKeySid = payload.encryption_key_sid; // jshint ignore:line\n  this.encryptionEnabled = payload.encryption_enabled; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(CompositionSettingsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CompositionSettingsContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CompositionSettingsInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.CompositionSettingsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionSettingsInstance\n */\n/* jshint ignore:end */\nCompositionSettingsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * create a CompositionSettingsInstance\n *\n * @function create\n * @memberof Twilio.Video.V1.CompositionSettingsInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName -\n *          A descriptive string that you create to describe the resource\n * @param {string} [opts.awsCredentialsSid] -\n *          The SID of the stored Credential resource\n * @param {string} [opts.encryptionKeySid] -\n *          The SID of the Public Key resource to use for encryption\n * @param {string} [opts.awsS3Url] -\n *          The URL of the AWS S3 bucket where the compositions should be stored\n * @param {boolean} [opts.awsStorageEnabled] -\n *          Whether all compositions should be written to the aws_s3_url\n * @param {boolean} [opts.encryptionEnabled] -\n *          Whether all compositions should be stored in an encrypted form\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionSettingsInstance\n */\n/* jshint ignore:end */\nCompositionSettingsInstance.prototype.create = function create(opts, callback) {\n  return this._proxy.create(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.CompositionSettingsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCompositionSettingsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCompositionSettingsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CompositionSettingsContext\n *\n * @constructor Twilio.Video.V1.CompositionSettingsContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCompositionSettingsContext = function CompositionSettingsContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/CompositionSettings/Default`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CompositionSettingsInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.CompositionSettingsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionSettingsInstance\n */\n/* jshint ignore:end */\nCompositionSettingsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CompositionSettingsInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * create a CompositionSettingsInstance\n *\n * @function create\n * @memberof Twilio.Video.V1.CompositionSettingsContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName -\n *          A descriptive string that you create to describe the resource\n * @param {string} [opts.awsCredentialsSid] -\n *          The SID of the stored Credential resource\n * @param {string} [opts.encryptionKeySid] -\n *          The SID of the Public Key resource to use for encryption\n * @param {string} [opts.awsS3Url] -\n *          The URL of the AWS S3 bucket where the compositions should be stored\n * @param {boolean} [opts.awsStorageEnabled] -\n *          Whether all compositions should be written to the aws_s3_url\n * @param {boolean} [opts.encryptionEnabled] -\n *          Whether all compositions should be stored in an encrypted form\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CompositionSettingsInstance\n */\n/* jshint ignore:end */\nCompositionSettingsContext.prototype.create = function create(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['friendlyName'])) {\n    throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'AwsCredentialsSid': _.get(opts, 'awsCredentialsSid'),\n    'EncryptionKeySid': _.get(opts, 'encryptionKeySid'),\n    'AwsS3Url': _.get(opts, 'awsS3Url'),\n    'AwsStorageEnabled': serialize.bool(_.get(opts, 'awsStorageEnabled')),\n    'EncryptionEnabled': serialize.bool(_.get(opts, 'encryptionEnabled'))\n  });\n\n  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CompositionSettingsInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.CompositionSettingsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCompositionSettingsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCompositionSettingsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CompositionSettingsList: CompositionSettingsList,\n  CompositionSettingsPage: CompositionSettingsPage,\n  CompositionSettingsInstance: CompositionSettingsInstance,\n  CompositionSettingsContext: CompositionSettingsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar RecordingList;\nvar RecordingPage;\nvar RecordingInstance;\nvar RecordingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingList\n *\n * @constructor Twilio.Video.V1.RecordingList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nRecordingList = function RecordingList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function recordings\n   * @memberof Twilio.Video.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.RecordingContext}\n   */\n  /* jshint ignore:end */\n  function RecordingListInstance(sid) {\n    return RecordingListInstance.get(sid);\n  }\n\n  RecordingListInstance._version = version;\n  // Path Solution\n  RecordingListInstance._solution = {};\n  RecordingListInstance._uri = `/Recordings`;\n  /* jshint ignore:start */\n  /**\n   * Streams RecordingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Video.V1.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {recording.status} [opts.status] -\n   *          Read only the recordings that have this status\n   * @param {string} [opts.sourceSid] -\n   *          Read only the recordings that have this source_sid\n   * @param {string|list} [opts.groupingSid] -\n   *          Read only recordings that have this grouping_sid\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only recordings that started on or after this {@link https://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date-time with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only recordings that started before this {@link https://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date-time with time zone\n   * @param {recording.type} [opts.mediaType] -\n   *          Read only recordings that have this media type\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RecordingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Video.V1.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {recording.status} [opts.status] -\n   *          Read only the recordings that have this status\n   * @param {string} [opts.sourceSid] -\n   *          Read only the recordings that have this source_sid\n   * @param {string|list} [opts.groupingSid] -\n   *          Read only recordings that have this grouping_sid\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only recordings that started on or after this {@link https://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date-time with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only recordings that started before this {@link https://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date-time with time zone\n   * @param {recording.type} [opts.mediaType] -\n   *          Read only recordings that have this media type\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Video.V1.RecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {recording.status} [opts.status] -\n   *          Read only the recordings that have this status\n   * @param {string} [opts.sourceSid] -\n   *          Read only the recordings that have this source_sid\n   * @param {string|list} [opts.groupingSid] -\n   *          Read only recordings that have this grouping_sid\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only recordings that started on or after this {@link https://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date-time with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only recordings that started before this {@link https://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date-time with time zone\n   * @param {recording.type} [opts.mediaType] -\n   *          Read only recordings that have this media type\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'SourceSid': _.get(opts, 'sourceSid'),\n      'GroupingSid': serialize.map(_.get(opts, 'groupingSid'), function(e) { return e; }),\n      'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n      'MediaType': _.get(opts, 'mediaType'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Video.V1.RecordingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a recording\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.RecordingList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Video.V1.RecordingContext}\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.get = function get(sid) {\n    return new RecordingContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.RecordingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RecordingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RecordingListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RecordingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingPage\n *\n * @constructor Twilio.Video.V1.RecordingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RecordingSolution} solution - Path solution\n *\n * @returns RecordingPage\n */\n/* jshint ignore:end */\nRecordingPage = function RecordingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RecordingPage.prototype, Page.prototype);\nRecordingPage.prototype.constructor = RecordingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RecordingInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.RecordingPage#\n *\n * @param {RecordingPayload} payload - Payload response from the API\n *\n * @returns RecordingInstance\n */\n/* jshint ignore:end */\nRecordingPage.prototype.getInstance = function getInstance(payload) {\n  return new RecordingInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RecordingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Video.V1.RecordingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {recording.status} status - The status of the recording\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} sourceSid - The SID of the recording source\n * @property {number} size - The size of the recorded track, in bytes\n * @property {string} url - The absolute URL of the resource\n * @property {recording.type} type - The recording's media type\n * @property {number} duration - The duration of the recording in seconds\n * @property {recording.format} containerFormat - The file format for the recording\n * @property {recording.codec} codec - The codec used to encode the track\n * @property {object} groupingSids - A list of SIDs related to the recording\n * @property {string} trackName -\n *          The name that was given to the source track of the recording\n * @property {number} offset -\n *          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\n * @property {string} mediaExternalLocation -\n *          The URL of the media file associated with the recording when stored externally\n * @property {string} statusCallback -\n *          The URL called to send status information on every recording event.\n * @property {string} statusCallbackMethod -\n *          The HTTP method used to call `status_callback`\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {RecordingPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nRecordingInstance = function RecordingInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.sourceSid = payload.source_sid; // jshint ignore:line\n  this.size = deserialize.integer(payload.size); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.duration = deserialize.integer(payload.duration); // jshint ignore:line\n  this.containerFormat = payload.container_format; // jshint ignore:line\n  this.codec = payload.codec; // jshint ignore:line\n  this.groupingSids = payload.grouping_sids; // jshint ignore:line\n  this.trackName = payload.track_name; // jshint ignore:line\n  this.offset = deserialize.integer(payload.offset); // jshint ignore:line\n  this.mediaExternalLocation = payload.media_external_location; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(RecordingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RecordingContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RecordingInstance\n *\n * @function remove\n * @memberof Twilio.Video.V1.RecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RecordingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingContext\n *\n * @constructor Twilio.Video.V1.RecordingContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nRecordingContext = function RecordingContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Recordings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RecordingInstance\n *\n * @function remove\n * @memberof Twilio.Video.V1.RecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingInstance\n */\n/* jshint ignore:end */\nRecordingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RecordingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRecordingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RecordingList: RecordingList,\n  RecordingPage: RecordingPage,\n  RecordingInstance: RecordingInstance,\n  RecordingContext: RecordingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar RecordingSettingsList;\nvar RecordingSettingsPage;\nvar RecordingSettingsInstance;\nvar RecordingSettingsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingSettingsList\n *\n * @constructor Twilio.Video.V1.RecordingSettingsList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nRecordingSettingsList = function RecordingSettingsList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function recordingSettings\n   * @memberof Twilio.Video.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.RecordingSettingsContext}\n   */\n  /* jshint ignore:end */\n  function RecordingSettingsListInstance(sid) {\n    return RecordingSettingsListInstance.get(sid);\n  }\n\n  RecordingSettingsListInstance._version = version;\n  // Path Solution\n  RecordingSettingsListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a recording_settings\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.RecordingSettingsList#\n   *\n   * @returns {Twilio.Video.V1.RecordingSettingsContext}\n   */\n  /* jshint ignore:end */\n  RecordingSettingsListInstance.get = function get() {\n    return new RecordingSettingsContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.RecordingSettingsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RecordingSettingsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RecordingSettingsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RecordingSettingsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingSettingsPage\n *\n * @constructor Twilio.Video.V1.RecordingSettingsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RecordingSettingsSolution} solution - Path solution\n *\n * @returns RecordingSettingsPage\n */\n/* jshint ignore:end */\nRecordingSettingsPage = function RecordingSettingsPage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RecordingSettingsPage.prototype, Page.prototype);\nRecordingSettingsPage.prototype.constructor = RecordingSettingsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RecordingSettingsInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.RecordingSettingsPage#\n *\n * @param {RecordingSettingsPayload} payload - Payload response from the API\n *\n * @returns RecordingSettingsInstance\n */\n/* jshint ignore:end */\nRecordingSettingsPage.prototype.getInstance = function getInstance(payload) {\n  return new RecordingSettingsInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RecordingSettingsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingSettingsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingSettingsPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingSettingsContext\n *\n * @constructor Twilio.Video.V1.RecordingSettingsInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} awsCredentialsSid - The SID of the stored Credential resource\n * @property {string} awsS3Url -\n *          The URL of the AWS S3 bucket where the recordings are stored\n * @property {boolean} awsStorageEnabled -\n *          Whether all recordings are written to the aws_s3_url\n * @property {string} encryptionKeySid -\n *          The SID of the Public Key resource used for encryption\n * @property {boolean} encryptionEnabled -\n *          Whether all recordings are stored in an encrypted form\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {RecordingSettingsPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nRecordingSettingsInstance = function RecordingSettingsInstance(version, payload)\n    {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.awsCredentialsSid = payload.aws_credentials_sid; // jshint ignore:line\n  this.awsS3Url = payload.aws_s3_url; // jshint ignore:line\n  this.awsStorageEnabled = payload.aws_storage_enabled; // jshint ignore:line\n  this.encryptionKeySid = payload.encryption_key_sid; // jshint ignore:line\n  this.encryptionEnabled = payload.encryption_enabled; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(RecordingSettingsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RecordingSettingsContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingSettingsInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RecordingSettingsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingSettingsInstance\n */\n/* jshint ignore:end */\nRecordingSettingsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * create a RecordingSettingsInstance\n *\n * @function create\n * @memberof Twilio.Video.V1.RecordingSettingsInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - A string to describe the resource\n * @param {string} [opts.awsCredentialsSid] -\n *          The SID of the stored Credential resource\n * @param {string} [opts.encryptionKeySid] -\n *          The SID of the Public Key resource to use for encryption\n * @param {string} [opts.awsS3Url] -\n *          The URL of the AWS S3 bucket where the recordings should be stored\n * @param {boolean} [opts.awsStorageEnabled] -\n *          Whether all recordings should be written to the aws_s3_url\n * @param {boolean} [opts.encryptionEnabled] -\n *          Whether all recordings should be stored in an encrypted form\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingSettingsInstance\n */\n/* jshint ignore:end */\nRecordingSettingsInstance.prototype.create = function create(opts, callback) {\n  return this._proxy.create(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RecordingSettingsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingSettingsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingSettingsInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingSettingsContext\n *\n * @constructor Twilio.Video.V1.RecordingSettingsContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nRecordingSettingsContext = function RecordingSettingsContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/RecordingSettings/Default`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RecordingSettingsInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RecordingSettingsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingSettingsInstance\n */\n/* jshint ignore:end */\nRecordingSettingsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingSettingsInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * create a RecordingSettingsInstance\n *\n * @function create\n * @memberof Twilio.Video.V1.RecordingSettingsContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.friendlyName - A string to describe the resource\n * @param {string} [opts.awsCredentialsSid] -\n *          The SID of the stored Credential resource\n * @param {string} [opts.encryptionKeySid] -\n *          The SID of the Public Key resource to use for encryption\n * @param {string} [opts.awsS3Url] -\n *          The URL of the AWS S3 bucket where the recordings should be stored\n * @param {boolean} [opts.awsStorageEnabled] -\n *          Whether all recordings should be written to the aws_s3_url\n * @param {boolean} [opts.encryptionEnabled] -\n *          Whether all recordings should be stored in an encrypted form\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RecordingSettingsInstance\n */\n/* jshint ignore:end */\nRecordingSettingsContext.prototype.create = function create(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['friendlyName'])) {\n    throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'AwsCredentialsSid': _.get(opts, 'awsCredentialsSid'),\n    'EncryptionKeySid': _.get(opts, 'encryptionKeySid'),\n    'AwsS3Url': _.get(opts, 'awsS3Url'),\n    'AwsStorageEnabled': serialize.bool(_.get(opts, 'awsStorageEnabled')),\n    'EncryptionEnabled': serialize.bool(_.get(opts, 'encryptionEnabled'))\n  });\n\n  var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RecordingSettingsInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RecordingSettingsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingSettingsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRecordingSettingsContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RecordingSettingsList: RecordingSettingsList,\n  RecordingSettingsPage: RecordingSettingsPage,\n  RecordingSettingsInstance: RecordingSettingsInstance,\n  RecordingSettingsContext: RecordingSettingsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar PublishedTrackList;\nvar PublishedTrackPage;\nvar PublishedTrackInstance;\nvar PublishedTrackContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the PublishedTrackList\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n * @param {string} roomSid -\n *          The SID of the Room resource where the track is published\n * @param {string} participantSid -\n *          The SID of the Participant resource with the published track\n */\n/* jshint ignore:end */\nPublishedTrackList = function PublishedTrackList(version, roomSid,\n                                                  participantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function publishedTracks\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackContext}\n   */\n  /* jshint ignore:end */\n  function PublishedTrackListInstance(sid) {\n    return PublishedTrackListInstance.get(sid);\n  }\n\n  PublishedTrackListInstance._version = version;\n  // Path Solution\n  PublishedTrackListInstance._solution = {roomSid: roomSid, participantSid: participantSid};\n  PublishedTrackListInstance._uri = `/Rooms/${roomSid}/Participants/${participantSid}/PublishedTracks`;\n  /* jshint ignore:start */\n  /**\n   * Streams PublishedTrackInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  PublishedTrackListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists PublishedTrackInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PublishedTrackListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of PublishedTrackInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PublishedTrackListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PublishedTrackPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of PublishedTrackInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  PublishedTrackListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new PublishedTrackPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a published_track\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackContext}\n   */\n  /* jshint ignore:end */\n  PublishedTrackListInstance.get = function get(sid) {\n    return new PublishedTrackContext(\n      this._version,\n      this._solution.roomSid,\n      this._solution.participantSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  PublishedTrackListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  PublishedTrackListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return PublishedTrackListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PublishedTrackPage\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {PublishedTrackSolution} solution - Path solution\n *\n * @returns PublishedTrackPage\n */\n/* jshint ignore:end */\nPublishedTrackPage = function PublishedTrackPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(PublishedTrackPage.prototype, Page.prototype);\nPublishedTrackPage.prototype.constructor = PublishedTrackPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of PublishedTrackInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackPage#\n *\n * @param {PublishedTrackPayload} payload - Payload response from the API\n *\n * @returns PublishedTrackInstance\n */\n/* jshint ignore:end */\nPublishedTrackPage.prototype.getInstance = function getInstance(payload) {\n  return new PublishedTrackInstance(\n    this._version,\n    payload,\n    this._solution.roomSid,\n    this._solution.participantSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPublishedTrackPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPublishedTrackPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PublishedTrackContext\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} participantSid -\n *          The SID of the Participant resource with the published track\n * @property {string} roomSid -\n *          The SID of the Room resource where the track is published\n * @property {string} name - The track name\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {boolean} enabled - Whether the track is enabled\n * @property {published_track.kind} kind - The track type\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {PublishedTrackPayload} payload - The instance payload\n * @param {sid} roomSid - The SID of the Room resource where the track is published\n * @param {sid} participantSid -\n *          The SID of the Participant resource with the published track\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nPublishedTrackInstance = function PublishedTrackInstance(version, payload,\n                                                          roomSid,\n                                                          participantSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.roomSid = payload.room_sid; // jshint ignore:line\n  this.name = payload.name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.kind = payload.kind; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {roomSid: roomSid, participantSid: participantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(PublishedTrackInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new PublishedTrackContext(\n          this._version,\n          this._solution.roomSid,\n          this._solution.participantSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a PublishedTrackInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PublishedTrackInstance\n */\n/* jshint ignore:end */\nPublishedTrackInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPublishedTrackInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nPublishedTrackInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the PublishedTrackContext\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} roomSid -\n *          The SID of the Room resource where the Track resource to fetch is published\n * @param {sid_like} participantSid -\n *          The SID of the Participant resource with the published track to fetch\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nPublishedTrackContext = function PublishedTrackContext(version, roomSid,\n                                                        participantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {roomSid: roomSid, participantSid: participantSid, sid: sid, };\n  this._uri = `/Rooms/${roomSid}/Participants/${participantSid}/PublishedTracks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a PublishedTrackInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed PublishedTrackInstance\n */\n/* jshint ignore:end */\nPublishedTrackContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new PublishedTrackInstance(\n      this._version,\n      payload,\n      this._solution.roomSid,\n      this._solution.participantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nPublishedTrackContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nPublishedTrackContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  PublishedTrackList: PublishedTrackList,\n  PublishedTrackPage: PublishedTrackPage,\n  PublishedTrackInstance: PublishedTrackInstance,\n  PublishedTrackContext: PublishedTrackContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require(\n    '../../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SubscribeRulesList;\nvar SubscribeRulesPage;\nvar SubscribeRulesInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribeRulesList\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n * @param {string} roomSid - The SID of the Room resource for the Subscribe Rules\n * @param {string} participantSid -\n *          The SID of the Participant resource for the Subscribe Rules\n */\n/* jshint ignore:end */\nSubscribeRulesList = function SubscribeRulesList(version, roomSid,\n                                                  participantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function subscribeRules\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesContext}\n   */\n  /* jshint ignore:end */\n  function SubscribeRulesListInstance(sid) {\n    return SubscribeRulesListInstance.get(sid);\n  }\n\n  SubscribeRulesListInstance._version = version;\n  // Path Solution\n  SubscribeRulesListInstance._solution = {roomSid: roomSid, participantSid: participantSid};\n  SubscribeRulesListInstance._uri = `/Rooms/${roomSid}/Participants/${participantSid}/SubscribeRules`;\n  /* jshint ignore:start */\n  /**\n   * fetch a SubscribeRulesInstance\n   *\n   * @function fetch\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesList#\n   *\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SubscribeRulesInstance\n   */\n  /* jshint ignore:end */\n  SubscribeRulesListInstance.fetch = function fetch(callback) {\n    var deferred = Q.defer();\n    var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscribeRulesInstance(\n        this._version,\n        payload,\n        this._solution.roomSid,\n        this._solution.participantSid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * update a SubscribeRulesInstance\n   *\n   * @function update\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {object} [opts.rules] - A JSON-encoded array of subscribe rules\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SubscribeRulesInstance\n   */\n  /* jshint ignore:end */\n  SubscribeRulesListInstance.update = function update(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'Rules': serialize.object(_.get(opts, 'rules'))});\n\n    var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscribeRulesInstance(\n        this._version,\n        payload,\n        this._solution.roomSid,\n        this._solution.participantSid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SubscribeRulesListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SubscribeRulesListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SubscribeRulesListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribeRulesPage\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SubscribeRulesSolution} solution - Path solution\n *\n * @returns SubscribeRulesPage\n */\n/* jshint ignore:end */\nSubscribeRulesPage = function SubscribeRulesPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SubscribeRulesPage.prototype, Page.prototype);\nSubscribeRulesPage.prototype.constructor = SubscribeRulesPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SubscribeRulesInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesPage#\n *\n * @param {SubscribeRulesPayload} payload - Payload response from the API\n *\n * @returns SubscribeRulesInstance\n */\n/* jshint ignore:end */\nSubscribeRulesPage.prototype.getInstance = function getInstance(payload) {\n  return new SubscribeRulesInstance(\n    this._version,\n    payload,\n    this._solution.roomSid,\n    this._solution.participantSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscribeRulesPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSubscribeRulesPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribeRulesContext\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesInstance\n *\n * @property {string} participantSid -\n *          The SID of the Participant resource for the Subscribe Rules\n * @property {string} roomSid -\n *          The SID of the Room resource for the Subscribe Rules\n * @property {string} rules -\n *          A collection of Subscribe Rules that describe how to include or exclude matching tracks\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n *\n * @param {V1} version - Version of the resource\n * @param {SubscribeRulesPayload} payload - The instance payload\n * @param {sid} roomSid - The SID of the Room resource for the Subscribe Rules\n * @param {sid} participantSid -\n *          The SID of the Participant resource for the Subscribe Rules\n */\n/* jshint ignore:end */\nSubscribeRulesInstance = function SubscribeRulesInstance(version, payload,\n                                                          roomSid,\n                                                          participantSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.roomSid = payload.room_sid; // jshint ignore:line\n  this.rules = payload.rules; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {roomSid: roomSid, participantSid: participantSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscribeRulesInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSubscribeRulesInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SubscribeRulesList: SubscribeRulesList,\n  SubscribeRulesPage: SubscribeRulesPage,\n  SubscribeRulesInstance: SubscribeRulesInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar SubscribedTrackList;\nvar SubscribedTrackPage;\nvar SubscribedTrackInstance;\nvar SubscribedTrackContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribedTrackList\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n * @param {string} roomSid - The SID of the room where the track is published\n * @param {string} participantSid -\n *          The SID of the participant that subscribes to the track\n */\n/* jshint ignore:end */\nSubscribedTrackList = function SubscribedTrackList(version, roomSid,\n                                                    participantSid) {\n  /* jshint ignore:start */\n  /**\n   * @function subscribedTracks\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackContext}\n   */\n  /* jshint ignore:end */\n  function SubscribedTrackListInstance(sid) {\n    return SubscribedTrackListInstance.get(sid);\n  }\n\n  SubscribedTrackListInstance._version = version;\n  // Path Solution\n  SubscribedTrackListInstance._solution = {roomSid: roomSid, participantSid: participantSid};\n  SubscribedTrackListInstance._uri = `/Rooms/${roomSid}/Participants/${participantSid}/SubscribedTracks`;\n  /* jshint ignore:start */\n  /**\n   * Streams SubscribedTrackInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SubscribedTrackListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SubscribedTrackInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SubscribedTrackListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SubscribedTrackInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SubscribedTrackListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscribedTrackPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SubscribedTrackInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SubscribedTrackListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SubscribedTrackPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a subscribed_track\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackContext}\n   */\n  /* jshint ignore:end */\n  SubscribedTrackListInstance.get = function get(sid) {\n    return new SubscribedTrackContext(\n      this._version,\n      this._solution.roomSid,\n      this._solution.participantSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SubscribedTrackListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SubscribedTrackListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SubscribedTrackListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribedTrackPage\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SubscribedTrackSolution} solution - Path solution\n *\n * @returns SubscribedTrackPage\n */\n/* jshint ignore:end */\nSubscribedTrackPage = function SubscribedTrackPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SubscribedTrackPage.prototype, Page.prototype);\nSubscribedTrackPage.prototype.constructor = SubscribedTrackPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SubscribedTrackInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackPage#\n *\n * @param {SubscribedTrackPayload} payload - Payload response from the API\n *\n * @returns SubscribedTrackInstance\n */\n/* jshint ignore:end */\nSubscribedTrackPage.prototype.getInstance = function getInstance(payload) {\n  return new SubscribedTrackInstance(\n    this._version,\n    payload,\n    this._solution.roomSid,\n    this._solution.participantSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscribedTrackPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSubscribedTrackPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribedTrackContext\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} participantSid -\n *          The SID of the participant that subscribes to the track\n * @property {string} publisherSid -\n *          The SID of the participant that publishes the track\n * @property {string} roomSid - The SID of the room where the track is published\n * @property {string} name - The track name\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {boolean} enabled - Whether the track is enabled\n * @property {subscribed_track.kind} kind - The track type\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {SubscribedTrackPayload} payload - The instance payload\n * @param {sid} roomSid - The SID of the room where the track is published\n * @param {sid} participantSid -\n *          The SID of the participant that subscribes to the track\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nSubscribedTrackInstance = function SubscribedTrackInstance(version, payload,\n                                                            roomSid,\n                                                            participantSid, sid)\n                                                            {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.participantSid = payload.participant_sid; // jshint ignore:line\n  this.publisherSid = payload.publisher_sid; // jshint ignore:line\n  this.roomSid = payload.room_sid; // jshint ignore:line\n  this.name = payload.name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.kind = payload.kind; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {roomSid: roomSid, participantSid: participantSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(SubscribedTrackInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SubscribedTrackContext(\n          this._version,\n          this._solution.roomSid,\n          this._solution.participantSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SubscribedTrackInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscribedTrackInstance\n */\n/* jshint ignore:end */\nSubscribedTrackInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscribedTrackInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSubscribedTrackInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SubscribedTrackContext\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} roomSid -\n *          The SID of the Room where the Track resource to fetch is subscribed\n * @param {sid_like} participantSid -\n *          The SID of the participant that subscribes to the Track resource to fetch\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nSubscribedTrackContext = function SubscribedTrackContext(version, roomSid,\n                                                          participantSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {roomSid: roomSid, participantSid: participantSid, sid: sid, };\n  this._uri = `/Rooms/${roomSid}/Participants/${participantSid}/SubscribedTracks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SubscribedTrackInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SubscribedTrackInstance\n */\n/* jshint ignore:end */\nSubscribedTrackContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SubscribedTrackInstance(\n      this._version,\n      payload,\n      this._solution.roomSid,\n      this._solution.participantSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSubscribedTrackContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSubscribedTrackContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SubscribedTrackList: SubscribedTrackList,\n  SubscribedTrackPage: SubscribedTrackPage,\n  SubscribedTrackInstance: SubscribedTrackInstance,\n  SubscribedTrackContext: SubscribedTrackContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar PublishedTrackList = require(\n    './roomParticipant/roomParticipantPublishedTrack').PublishedTrackList;\nvar SubscribeRulesList = require(\n    './roomParticipant/roomParticipantSubscribeRule').SubscribeRulesList;\nvar SubscribedTrackList = require(\n    './roomParticipant/roomParticipantSubscribedTrack').SubscribedTrackList;\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ParticipantList;\nvar ParticipantPage;\nvar ParticipantInstance;\nvar ParticipantContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantList\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n * @param {string} roomSid - The SID of the participant's room\n */\n/* jshint ignore:end */\nParticipantList = function ParticipantList(version, roomSid) {\n  /* jshint ignore:start */\n  /**\n   * @function participants\n   * @memberof Twilio.Video.V1.RoomContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.RoomContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  function ParticipantListInstance(sid) {\n    return ParticipantListInstance.get(sid);\n  }\n\n  ParticipantListInstance._version = version;\n  // Path Solution\n  ParticipantListInstance._solution = {roomSid: roomSid};\n  ParticipantListInstance._uri = `/Rooms/${roomSid}/Participants`;\n  /* jshint ignore:start */\n  /**\n   * Streams ParticipantInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {participant.status} [opts.status] -\n   *          Read only the participants with this status\n   * @param {string} [opts.identity] -\n   *          Read only the Participants with this user identity value\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only Participants that started after this date in UTC ISO 8601 format\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only Participants that started before this date in ISO 8601 format\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ParticipantInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {participant.status} [opts.status] -\n   *          Read only the participants with this status\n   * @param {string} [opts.identity] -\n   *          Read only the Participants with this user identity value\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only Participants that started after this date in UTC ISO 8601 format\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only Participants that started before this date in ISO 8601 format\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {participant.status} [opts.status] -\n   *          Read only the participants with this status\n   * @param {string} [opts.identity] -\n   *          Read only the Participants with this user identity value\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only Participants that started after this date in UTC ISO 8601 format\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only Participants that started before this date in ISO 8601 format\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'Identity': _.get(opts, 'identity'),\n      'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ParticipantInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ParticipantPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a participant\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Video.V1.RoomContext.ParticipantContext}\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.get = function get(sid) {\n    return new ParticipantContext(this._version, this._solution.roomSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.RoomContext.ParticipantList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ParticipantListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ParticipantListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ParticipantListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantPage\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ParticipantSolution} solution - Path solution\n *\n * @returns ParticipantPage\n */\n/* jshint ignore:end */\nParticipantPage = function ParticipantPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ParticipantPage.prototype, Page.prototype);\nParticipantPage.prototype.constructor = ParticipantPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ParticipantInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.RoomContext.ParticipantPage#\n *\n * @param {ParticipantPayload} payload - Payload response from the API\n *\n * @returns ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantPage.prototype.getInstance = function getInstance(payload) {\n  return new ParticipantInstance(this._version, payload, this._solution.roomSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} roomSid - The SID of the participant's room\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {participant.status} status - The status of the Participant\n * @property {string} identity - The string that identifies the resource's User\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {Date} startTime -\n *          The time of participant connected to the room in ISO 8601 format\n * @property {Date} endTime -\n *          The time when the participant disconnected from the room in ISO 8601 format\n * @property {number} duration -\n *          Duration of time in seconds the participant was connected\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {ParticipantPayload} payload - The instance payload\n * @param {sid} roomSid - The SID of the participant's room\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nParticipantInstance = function ParticipantInstance(version, payload, roomSid,\n                                                    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.roomSid = payload.room_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.identity = payload.identity; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.startTime = deserialize.iso8601DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.duration = deserialize.integer(payload.duration); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {roomSid: roomSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ParticipantInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ParticipantContext(this._version, this._solution.roomSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomContext.ParticipantInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ParticipantInstance\n *\n * @function update\n * @memberof Twilio.Video.V1.RoomContext.ParticipantInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {participant.status} [opts.status] - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the publishedTracks\n *\n * @function publishedTracks\n * @memberof Twilio.Video.V1.RoomContext.ParticipantInstance#\n *\n * @returns {Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList}\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.publishedTracks = function publishedTracks() {\n  return this._proxy.publishedTracks;\n};\n\n/* jshint ignore:start */\n/**\n * Access the subscribedTracks\n *\n * @function subscribedTracks\n * @memberof Twilio.Video.V1.RoomContext.ParticipantInstance#\n *\n * @returns {Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackList}\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.subscribedTracks = function subscribedTracks() {\n  return this._proxy.subscribedTracks;\n};\n\n/* jshint ignore:start */\n/**\n * Access the subscribeRules\n *\n * @function subscribeRules\n * @memberof Twilio.Video.V1.RoomContext.ParticipantInstance#\n *\n * @returns {Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesList}\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.subscribeRules = function subscribeRules() {\n  return this._proxy.subscribeRules;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nParticipantInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ParticipantContext\n *\n * @constructor Twilio.Video.V1.RoomContext.ParticipantContext\n *\n * @property {Twilio.Video.V1.RoomContext.ParticipantContext.PublishedTrackList} publishedTracks -\n *          publishedTracks resource\n * @property {Twilio.Video.V1.RoomContext.ParticipantContext.SubscribedTrackList} subscribedTracks -\n *          subscribedTracks resource\n * @property {Twilio.Video.V1.RoomContext.ParticipantContext.SubscribeRulesList} subscribeRules -\n *          subscribeRules resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} roomSid -\n *          The SID of the room with the Participant resource to fetch\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nParticipantContext = function ParticipantContext(version, roomSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {roomSid: roomSid, sid: sid, };\n  this._uri = `/Rooms/${roomSid}/Participants/${sid}`;\n\n  // Dependents\n  this._publishedTracks = undefined;\n  this._subscribedTracks = undefined;\n  this._subscribeRules = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ParticipantInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.roomSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ParticipantInstance\n *\n * @function update\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext#\n *\n * @param {object} [opts] - Options for request\n * @param {participant.status} [opts.status] - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ParticipantInstance\n */\n/* jshint ignore:end */\nParticipantContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ParticipantInstance(\n      this._version,\n      payload,\n      this._solution.roomSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ParticipantContext.prototype,\n  'publishedTracks', {\n    get: function() {\n      if (!this._publishedTracks) {\n        this._publishedTracks = new PublishedTrackList(\n          this._version,\n          this._solution.roomSid,\n          this._solution.sid\n        );\n      }\n      return this._publishedTracks;\n    }\n});\n\nObject.defineProperty(ParticipantContext.prototype,\n  'subscribedTracks', {\n    get: function() {\n      if (!this._subscribedTracks) {\n        this._subscribedTracks = new SubscribedTrackList(\n          this._version,\n          this._solution.roomSid,\n          this._solution.sid\n        );\n      }\n      return this._subscribedTracks;\n    }\n});\n\nObject.defineProperty(ParticipantContext.prototype,\n  'subscribeRules', {\n    get: function() {\n      if (!this._subscribeRules) {\n        this._subscribeRules = new SubscribeRulesList(\n          this._version,\n          this._solution.roomSid,\n          this._solution.sid\n        );\n      }\n      return this._subscribeRules;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.ParticipantContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nParticipantContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nParticipantContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ParticipantList: ParticipantList,\n  ParticipantPage: ParticipantPage,\n  ParticipantInstance: ParticipantInstance,\n  ParticipantContext: ParticipantContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RecordingRulesList;\nvar RecordingRulesPage;\nvar RecordingRulesInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingRulesList\n *\n * @constructor Twilio.Video.V1.RoomContext.RecordingRulesList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n * @param {string} roomSid - The SID of the Room resource for the Recording Rules\n */\n/* jshint ignore:end */\nRecordingRulesList = function RecordingRulesList(version, roomSid) {\n  /* jshint ignore:start */\n  /**\n   * @function recordingRules\n   * @memberof Twilio.Video.V1.RoomContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.RoomContext.RecordingRulesContext}\n   */\n  /* jshint ignore:end */\n  function RecordingRulesListInstance(sid) {\n    return RecordingRulesListInstance.get(sid);\n  }\n\n  RecordingRulesListInstance._version = version;\n  // Path Solution\n  RecordingRulesListInstance._solution = {roomSid: roomSid};\n  RecordingRulesListInstance._uri = `/Rooms/${roomSid}/RecordingRules`;\n  /* jshint ignore:start */\n  /**\n   * fetch a RecordingRulesInstance\n   *\n   * @function fetch\n   * @memberof Twilio.Video.V1.RoomContext.RecordingRulesList#\n   *\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RecordingRulesInstance\n   */\n  /* jshint ignore:end */\n  RecordingRulesListInstance.fetch = function fetch(callback) {\n    var deferred = Q.defer();\n    var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingRulesInstance(this._version, payload, this._solution.roomSid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * update a RecordingRulesInstance\n   *\n   * @function update\n   * @memberof Twilio.Video.V1.RoomContext.RecordingRulesList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {object} [opts.rules] - A JSON-encoded array of recording rules\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RecordingRulesInstance\n   */\n  /* jshint ignore:end */\n  RecordingRulesListInstance.update = function update(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'Rules': serialize.object(_.get(opts, 'rules'))});\n\n    var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RecordingRulesInstance(this._version, payload, this._solution.roomSid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.RoomContext.RecordingRulesList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RecordingRulesListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RecordingRulesListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RecordingRulesListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingRulesPage\n *\n * @constructor Twilio.Video.V1.RoomContext.RecordingRulesPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RecordingRulesSolution} solution - Path solution\n *\n * @returns RecordingRulesPage\n */\n/* jshint ignore:end */\nRecordingRulesPage = function RecordingRulesPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RecordingRulesPage.prototype, Page.prototype);\nRecordingRulesPage.prototype.constructor = RecordingRulesPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RecordingRulesInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.RoomContext.RecordingRulesPage#\n *\n * @param {RecordingRulesPayload} payload - Payload response from the API\n *\n * @returns RecordingRulesInstance\n */\n/* jshint ignore:end */\nRecordingRulesPage.prototype.getInstance = function getInstance(payload) {\n  return new RecordingRulesInstance(this._version, payload, this._solution.roomSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.RecordingRulesPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingRulesPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingRulesPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RecordingRulesContext\n *\n * @constructor Twilio.Video.V1.RoomContext.RecordingRulesInstance\n *\n * @property {string} roomSid -\n *          The SID of the Room resource for the Recording Rules\n * @property {string} rules -\n *          A collection of recording Rules that describe how to include or exclude matching tracks for recording\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n *\n * @param {V1} version - Version of the resource\n * @param {RecordingRulesPayload} payload - The instance payload\n * @param {sid} roomSid - The SID of the Room resource for the Recording Rules\n */\n/* jshint ignore:end */\nRecordingRulesInstance = function RecordingRulesInstance(version, payload,\n                                                          roomSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.roomSid = payload.room_sid; // jshint ignore:line\n  this.rules = payload.rules; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {roomSid: roomSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.RecordingRulesInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRecordingRulesInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRecordingRulesInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RecordingRulesList: RecordingRulesList,\n  RecordingRulesPage: RecordingRulesPage,\n  RecordingRulesInstance: RecordingRulesInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar RoomRecordingList;\nvar RoomRecordingPage;\nvar RoomRecordingInstance;\nvar RoomRecordingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomRecordingList\n *\n * @constructor Twilio.Video.V1.RoomContext.RoomRecordingList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n * @param {string} roomSid -\n *          The SID of the Room resource the recording is associated with\n */\n/* jshint ignore:end */\nRoomRecordingList = function RoomRecordingList(version, roomSid) {\n  /* jshint ignore:start */\n  /**\n   * @function recordings\n   * @memberof Twilio.Video.V1.RoomContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.RoomContext.RoomRecordingContext}\n   */\n  /* jshint ignore:end */\n  function RoomRecordingListInstance(sid) {\n    return RoomRecordingListInstance.get(sid);\n  }\n\n  RoomRecordingListInstance._version = version;\n  // Path Solution\n  RoomRecordingListInstance._solution = {roomSid: roomSid};\n  RoomRecordingListInstance._uri = `/Rooms/${roomSid}/Recordings`;\n  /* jshint ignore:start */\n  /**\n   * Streams RoomRecordingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Video.V1.RoomContext.RoomRecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {room_recording.status} [opts.status] -\n   *          Read only the recordings with this status\n   * @param {string} [opts.sourceSid] -\n   *          Read only the recordings that have this source_sid\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only Recordings that started on or after this ISO 8601 datetime with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only Recordings that started before this ISO 8601 date-time with time zone\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RoomRecordingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RoomRecordingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Video.V1.RoomContext.RoomRecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {room_recording.status} [opts.status] -\n   *          Read only the recordings with this status\n   * @param {string} [opts.sourceSid] -\n   *          Read only the recordings that have this source_sid\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only Recordings that started on or after this ISO 8601 datetime with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only Recordings that started before this ISO 8601 date-time with time zone\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoomRecordingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RoomRecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Video.V1.RoomContext.RoomRecordingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {room_recording.status} [opts.status] -\n   *          Read only the recordings with this status\n   * @param {string} [opts.sourceSid] -\n   *          Read only the recordings that have this source_sid\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only Recordings that started on or after this ISO 8601 datetime with time zone\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only Recordings that started before this ISO 8601 date-time with time zone\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoomRecordingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'SourceSid': _.get(opts, 'sourceSid'),\n      'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoomRecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RoomRecordingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Video.V1.RoomContext.RoomRecordingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoomRecordingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoomRecordingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a room_recording\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.RoomContext.RoomRecordingList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Video.V1.RoomContext.RoomRecordingContext}\n   */\n  /* jshint ignore:end */\n  RoomRecordingListInstance.get = function get(sid) {\n    return new RoomRecordingContext(this._version, this._solution.roomSid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.RoomContext.RoomRecordingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RoomRecordingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RoomRecordingListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RoomRecordingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomRecordingPage\n *\n * @constructor Twilio.Video.V1.RoomContext.RoomRecordingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RoomRecordingSolution} solution - Path solution\n *\n * @returns RoomRecordingPage\n */\n/* jshint ignore:end */\nRoomRecordingPage = function RoomRecordingPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RoomRecordingPage.prototype, Page.prototype);\nRoomRecordingPage.prototype.constructor = RoomRecordingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RoomRecordingInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.RoomContext.RoomRecordingPage#\n *\n * @param {RoomRecordingPayload} payload - Payload response from the API\n *\n * @returns RoomRecordingInstance\n */\n/* jshint ignore:end */\nRoomRecordingPage.prototype.getInstance = function getInstance(payload) {\n  return new RoomRecordingInstance(this._version, payload, this._solution.roomSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.RoomRecordingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoomRecordingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoomRecordingPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomRecordingContext\n *\n * @constructor Twilio.Video.V1.RoomContext.RoomRecordingInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {room_recording.status} status - The status of the recording\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} sourceSid - The SID of the recording source\n * @property {number} size - The size of the recorded track in bytes\n * @property {string} url - The absolute URL of the resource\n * @property {room_recording.type} type - The recording's media type\n * @property {number} duration - The duration of the recording in seconds\n * @property {room_recording.format} containerFormat -\n *          The file format for the recording\n * @property {room_recording.codec} codec - The codec used for the recording\n * @property {object} groupingSids - A list of SIDs related to the Recording\n * @property {string} trackName -\n *          The name that was given to the source track of the recording\n * @property {number} offset -\n *          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\n * @property {string} mediaExternalLocation -\n *          The URL of the media file associated with the recording when stored externally\n * @property {string} roomSid -\n *          The SID of the Room resource the recording is associated with\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {RoomRecordingPayload} payload - The instance payload\n * @param {sid} roomSid -\n *          The SID of the Room resource the recording is associated with\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nRoomRecordingInstance = function RoomRecordingInstance(version, payload,\n                                                        roomSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.sourceSid = payload.source_sid; // jshint ignore:line\n  this.size = deserialize.integer(payload.size); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.duration = deserialize.integer(payload.duration); // jshint ignore:line\n  this.containerFormat = payload.container_format; // jshint ignore:line\n  this.codec = payload.codec; // jshint ignore:line\n  this.groupingSids = payload.grouping_sids; // jshint ignore:line\n  this.trackName = payload.track_name; // jshint ignore:line\n  this.offset = deserialize.integer(payload.offset); // jshint ignore:line\n  this.mediaExternalLocation = payload.media_external_location; // jshint ignore:line\n  this.roomSid = payload.room_sid; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {roomSid: roomSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(RoomRecordingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RoomRecordingContext(this._version, this._solution.roomSid, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RoomRecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomContext.RoomRecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomRecordingInstance\n */\n/* jshint ignore:end */\nRoomRecordingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoomRecordingInstance\n *\n * @function remove\n * @memberof Twilio.Video.V1.RoomContext.RoomRecordingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomRecordingInstance\n */\n/* jshint ignore:end */\nRoomRecordingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.RoomRecordingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoomRecordingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoomRecordingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomRecordingContext\n *\n * @constructor Twilio.Video.V1.RoomContext.RoomRecordingContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} roomSid - The SID of the Room resource with the recording to fetch\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nRoomRecordingContext = function RoomRecordingContext(version, roomSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {roomSid: roomSid, sid: sid, };\n  this._uri = `/Rooms/${roomSid}/Recordings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoomRecordingInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomContext.RoomRecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomRecordingInstance\n */\n/* jshint ignore:end */\nRoomRecordingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoomRecordingInstance(\n      this._version,\n      payload,\n      this._solution.roomSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RoomRecordingInstance\n *\n * @function remove\n * @memberof Twilio.Video.V1.RoomContext.RoomRecordingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomRecordingInstance\n */\n/* jshint ignore:end */\nRoomRecordingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext.RoomRecordingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoomRecordingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRoomRecordingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RoomRecordingList: RoomRecordingList,\n  RoomRecordingPage: RoomRecordingPage,\n  RoomRecordingInstance: RoomRecordingInstance,\n  RoomRecordingContext: RoomRecordingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar ParticipantList = require('./room/roomParticipant').ParticipantList;\nvar RecordingRulesList = require('./room/roomRecordingRule').RecordingRulesList;\nvar RoomRecordingList = require('./room/recording').RoomRecordingList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar RoomList;\nvar RoomPage;\nvar RoomInstance;\nvar RoomContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomList\n *\n * @constructor Twilio.Video.V1.RoomList\n *\n * @param {Twilio.Video.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nRoomList = function RoomList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function rooms\n   * @memberof Twilio.Video.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Video.V1.RoomContext}\n   */\n  /* jshint ignore:end */\n  function RoomListInstance(sid) {\n    return RoomListInstance.get(sid);\n  }\n\n  RoomListInstance._version = version;\n  // Path Solution\n  RoomListInstance._solution = {};\n  RoomListInstance._uri = `/Rooms`;\n  /* jshint ignore:start */\n  /**\n   * create a RoomInstance\n   *\n   * @function create\n   * @memberof Twilio.Video.V1.RoomList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {boolean} [opts.enableTurn] -\n   *          Enable Twilio's Network Traversal TURN service\n   * @param {room.room_type} [opts.type] - The type of room\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {string} [opts.statusCallback] -\n   *          The URL to send status information to your application\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method we should use to call status_callback\n   * @param {number} [opts.maxParticipants] -\n   *          The maximum number of concurrent Participants allowed in the room\n   * @param {boolean} [opts.recordParticipantsOnConnect] -\n   *          Whether to start recording when Participants connect\n   * @param {room.video_codec|list} [opts.videoCodecs] -\n   *          An array of the video codecs that are supported when publishing a track in the room\n   * @param {string} [opts.mediaRegion] -\n   *          The region for the media server in Group Rooms\n   * @param {object} [opts.recordingRules] - A collection of Recording Rules\n   * @param {boolean} [opts.audioOnly] -\n   *          Indicates whether the room will only contain audio track participants for group rooms.\n   * @param {number} [opts.maxParticipantDuration] -\n   *          The maximum number of seconds a Participant can be connected to the room\n   * @param {number} [opts.emptyRoomTimeout] -\n   *          Configures the time a room will remain active after last participant leaves.\n   * @param {number} [opts.unusedRoomTimeout] -\n   *          Configures the time a room will remain active when no one joins.\n   * @param {boolean} [opts.largeRoom] - Indicates whether this is a large room.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RoomInstance\n   */\n  /* jshint ignore:end */\n  RoomListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'EnableTurn': serialize.bool(_.get(opts, 'enableTurn')),\n      'Type': _.get(opts, 'type'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'StatusCallback': _.get(opts, 'statusCallback'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'MaxParticipants': _.get(opts, 'maxParticipants'),\n      'RecordParticipantsOnConnect': serialize.bool(_.get(opts, 'recordParticipantsOnConnect')),\n      'VideoCodecs': serialize.map(_.get(opts, 'videoCodecs'), function(e) { return e; }),\n      'MediaRegion': _.get(opts, 'mediaRegion'),\n      'RecordingRules': serialize.object(_.get(opts, 'recordingRules')),\n      'AudioOnly': serialize.bool(_.get(opts, 'audioOnly')),\n      'MaxParticipantDuration': _.get(opts, 'maxParticipantDuration'),\n      'EmptyRoomTimeout': _.get(opts, 'emptyRoomTimeout'),\n      'UnusedRoomTimeout': _.get(opts, 'unusedRoomTimeout'),\n      'LargeRoom': serialize.bool(_.get(opts, 'largeRoom'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoomInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams RoomInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Video.V1.RoomList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {room.room_status} [opts.status] - Read only the rooms with this status\n   * @param {string} [opts.uniqueName] - Read only rooms with this unique_name\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only rooms that started on or after this date, given as YYYY-MM-DD\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only rooms that started before this date, given as YYYY-MM-DD\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RoomListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RoomInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Video.V1.RoomList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {room.room_status} [opts.status] - Read only the rooms with this status\n   * @param {string} [opts.uniqueName] - Read only rooms with this unique_name\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only rooms that started on or after this date, given as YYYY-MM-DD\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only rooms that started before this date, given as YYYY-MM-DD\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoomListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RoomInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Video.V1.RoomList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {room.room_status} [opts.status] - Read only the rooms with this status\n   * @param {string} [opts.uniqueName] - Read only rooms with this unique_name\n   * @param {Date} [opts.dateCreatedAfter] -\n   *          Read only rooms that started on or after this date, given as YYYY-MM-DD\n   * @param {Date} [opts.dateCreatedBefore] -\n   *          Read only rooms that started before this date, given as YYYY-MM-DD\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoomListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')),\n      'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoomPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RoomInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Video.V1.RoomList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RoomListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RoomPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a room\n   *\n   * @function get\n   * @memberof Twilio.Video.V1.RoomList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Video.V1.RoomContext}\n   */\n  /* jshint ignore:end */\n  RoomListInstance.get = function get(sid) {\n    return new RoomContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Video.V1.RoomList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RoomListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RoomListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RoomListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomPage\n *\n * @constructor Twilio.Video.V1.RoomPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RoomSolution} solution - Path solution\n *\n * @returns RoomPage\n */\n/* jshint ignore:end */\nRoomPage = function RoomPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RoomPage.prototype, Page.prototype);\nRoomPage.prototype.constructor = RoomPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RoomInstance\n *\n * @function getInstance\n * @memberof Twilio.Video.V1.RoomPage#\n *\n * @param {RoomPayload} payload - Payload response from the API\n *\n * @returns RoomInstance\n */\n/* jshint ignore:end */\nRoomPage.prototype.getInstance = function getInstance(payload) {\n  return new RoomInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoomPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoomPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomContext\n *\n * @constructor Twilio.Video.V1.RoomInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {room.room_status} status - The status of the room\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {boolean} enableTurn - Enable Twilio's Network Traversal TURN service\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} statusCallback -\n *          The URL to send status information to your application\n * @property {string} statusCallbackMethod -\n *          The HTTP method we use to call status_callback\n * @property {Date} endTime - The UTC end time of the room in UTC ISO 8601 format\n * @property {number} duration - The duration of the room in seconds\n * @property {room.room_type} type - The type of room\n * @property {number} maxParticipants -\n *          The maximum number of concurrent Participants allowed in the room\n * @property {number} maxParticipantDuration -\n *          The maximum number of seconds a Participant can be connected to the room\n * @property {number} maxConcurrentPublishedTracks -\n *          The maximum number of published tracks allowed in the room at the same time\n * @property {boolean} recordParticipantsOnConnect -\n *          Whether to start recording when Participants connect\n * @property {room.video_codec} videoCodecs -\n *          An array of the video codecs that are supported when publishing a track in the room\n * @property {string} mediaRegion - The region for the media server in Group Rooms\n * @property {boolean} audioOnly -\n *          Indicates whether the room will only contain audio track participants for group rooms.\n * @property {number} emptyRoomTimeout -\n *          The time a room will remain active after last participant leaves.\n * @property {number} unusedRoomTimeout -\n *          The time a room will remain active when no one joins.\n * @property {boolean} largeRoom - Indicates if this is a large room.\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {RoomPayload} payload - The instance payload\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nRoomInstance = function RoomInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.enableTurn = payload.enable_turn; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.statusCallback = payload.status_callback; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.duration = deserialize.integer(payload.duration); // jshint ignore:line\n  this.type = payload.type; // jshint ignore:line\n  this.maxParticipants = deserialize.integer(payload.max_participants); // jshint ignore:line\n  this.maxParticipantDuration = deserialize.integer(payload.max_participant_duration); // jshint ignore:line\n  this.maxConcurrentPublishedTracks = deserialize.integer(payload.max_concurrent_published_tracks); // jshint ignore:line\n  this.recordParticipantsOnConnect = payload.record_participants_on_connect; // jshint ignore:line\n  this.videoCodecs = payload.video_codecs; // jshint ignore:line\n  this.mediaRegion = payload.media_region; // jshint ignore:line\n  this.audioOnly = payload.audio_only; // jshint ignore:line\n  this.emptyRoomTimeout = deserialize.integer(payload.empty_room_timeout); // jshint ignore:line\n  this.unusedRoomTimeout = deserialize.integer(payload.unused_room_timeout); // jshint ignore:line\n  this.largeRoom = payload.large_room; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(RoomInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RoomContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RoomInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomInstance\n */\n/* jshint ignore:end */\nRoomInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a RoomInstance\n *\n * @function update\n * @memberof Twilio.Video.V1.RoomInstance#\n *\n * @param {object} opts - Options for request\n * @param {room.room_status} opts.status - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomInstance\n */\n/* jshint ignore:end */\nRoomInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the recordings\n *\n * @function recordings\n * @memberof Twilio.Video.V1.RoomInstance#\n *\n * @returns {Twilio.Video.V1.RoomContext.RoomRecordingList}\n */\n/* jshint ignore:end */\nRoomInstance.prototype.recordings = function recordings() {\n  return this._proxy.recordings;\n};\n\n/* jshint ignore:start */\n/**\n * Access the participants\n *\n * @function participants\n * @memberof Twilio.Video.V1.RoomInstance#\n *\n * @returns {Twilio.Video.V1.RoomContext.ParticipantList}\n */\n/* jshint ignore:end */\nRoomInstance.prototype.participants = function participants() {\n  return this._proxy.participants;\n};\n\n/* jshint ignore:start */\n/**\n * Access the recordingRules\n *\n * @function recordingRules\n * @memberof Twilio.Video.V1.RoomInstance#\n *\n * @returns {Twilio.Video.V1.RoomContext.RecordingRulesList}\n */\n/* jshint ignore:end */\nRoomInstance.prototype.recordingRules = function recordingRules() {\n  return this._proxy.recordingRules;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoomInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRoomInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RoomContext\n *\n * @constructor Twilio.Video.V1.RoomContext\n *\n * @property {Twilio.Video.V1.RoomContext.RoomRecordingList} recordings -\n *          recordings resource\n * @property {Twilio.Video.V1.RoomContext.ParticipantList} participants -\n *          participants resource\n * @property {Twilio.Video.V1.RoomContext.RecordingRulesList} recordingRules -\n *          recordingRules resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nRoomContext = function RoomContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Rooms/${sid}`;\n\n  // Dependents\n  this._recordings = undefined;\n  this._participants = undefined;\n  this._recordingRules = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RoomInstance\n *\n * @function fetch\n * @memberof Twilio.Video.V1.RoomContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomInstance\n */\n/* jshint ignore:end */\nRoomContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoomInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a RoomInstance\n *\n * @function update\n * @memberof Twilio.Video.V1.RoomContext#\n *\n * @param {object} opts - Options for request\n * @param {room.room_status} opts.status - The new status of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RoomInstance\n */\n/* jshint ignore:end */\nRoomContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['status'])) {\n    throw new Error('Required parameter \"opts[\\'status\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'Status': _.get(opts, 'status')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RoomInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(RoomContext.prototype,\n  'recordings', {\n    get: function() {\n      if (!this._recordings) {\n        this._recordings = new RoomRecordingList(this._version, this._solution.sid);\n      }\n      return this._recordings;\n    }\n});\n\nObject.defineProperty(RoomContext.prototype,\n  'participants', {\n    get: function() {\n      if (!this._participants) {\n        this._participants = new ParticipantList(this._version, this._solution.sid);\n      }\n      return this._participants;\n    }\n});\n\nObject.defineProperty(RoomContext.prototype,\n  'recordingRules', {\n    get: function() {\n      if (!this._recordingRules) {\n        this._recordingRules = new RecordingRulesList(this._version, this._solution.sid);\n      }\n      return this._recordingRules;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Video.V1.RoomContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRoomContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRoomContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RoomList: RoomList,\n  RoomPage: RoomPage,\n  RoomInstance: RoomInstance,\n  RoomContext: RoomContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CompositionHookList = require('./v1/compositionHook').CompositionHookList;\nvar CompositionList = require('./v1/composition').CompositionList;\nvar CompositionSettingsList = require(\n    './v1/compositionSettings').CompositionSettingsList;\nvar RecordingList = require('./v1/recording').RecordingList;\nvar RecordingSettingsList = require(\n    './v1/recordingSettings').RecordingSettingsList;\nvar RoomList = require('./v1/room').RoomList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Video\n *\n * @constructor Twilio.Video.V1\n *\n * @property {Twilio.Video.V1.CompositionList} compositions - compositions resource\n * @property {Twilio.Video.V1.CompositionHookList} compositionHooks -\n *          compositionHooks resource\n * @property {Twilio.Video.V1.CompositionSettingsList} compositionSettings -\n *          compositionSettings resource\n * @property {Twilio.Video.V1.RecordingList} recordings - recordings resource\n * @property {Twilio.Video.V1.RecordingSettingsList} recordingSettings -\n *          recordingSettings resource\n * @property {Twilio.Video.V1.RoomList} rooms - rooms resource\n *\n * @param {Twilio.Video} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._compositions = undefined;\n  this._compositionHooks = undefined;\n  this._compositionSettings = undefined;\n  this._recordings = undefined;\n  this._recordingSettings = undefined;\n  this._rooms = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'compositions', {\n    get: function() {\n      this._compositions = this._compositions || new CompositionList(this);\n      return this._compositions;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'compositionHooks', {\n    get: function() {\n      this._compositionHooks = this._compositionHooks || new CompositionHookList(this);\n      return this._compositionHooks;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'compositionSettings', {\n    get: function() {\n      this._compositionSettings = this._compositionSettings || new CompositionSettingsList(this);\n      return this._compositionSettings;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'recordings', {\n    get: function() {\n      this._recordings = this._recordings || new RecordingList(this);\n      return this._recordings;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'recordingSettings', {\n    get: function() {\n      this._recordingSettings = this._recordingSettings || new RecordingSettingsList(this);\n      return this._recordingSettings;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'rooms', {\n    get: function() {\n      this._rooms = this._rooms || new RoomList(this);\n      return this._rooms;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./video/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize video domain\n *\n * @constructor Twilio.Video\n *\n * @property {Twilio.Video.V1} v1 - v1 version\n * @property {Twilio.Video.V1.CompositionList} compositions - compositions resource\n * @property {Twilio.Video.V1.CompositionHookList} compositionHooks -\n *          compositionHooks resource\n * @property {Twilio.Video.V1.CompositionSettingsList} compositionSettings -\n *          compositionSettings resource\n * @property {Twilio.Video.V1.RecordingList} recordings - recordings resource\n * @property {Twilio.Video.V1.RecordingSettingsList} recordingSettings -\n *          recordingSettings resource\n * @property {Twilio.Video.V1.RoomList} rooms - rooms resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Video(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://video.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Video.prototype, Domain.prototype);\nVideo.prototype.constructor = Video;\n\nObject.defineProperty(Video.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Video.prototype,\n  'compositions', {\n    get: function() {\n      return this.v1.compositions;\n    }\n});\n\nObject.defineProperty(Video.prototype,\n  'compositionHooks', {\n    get: function() {\n      return this.v1.compositionHooks;\n    }\n});\n\nObject.defineProperty(Video.prototype,\n  'compositionSettings', {\n    get: function() {\n      return this.v1.compositionSettings;\n    }\n});\n\nObject.defineProperty(Video.prototype,\n  'recordings', {\n    get: function() {\n      return this.v1.recordings;\n    }\n});\n\nObject.defineProperty(Video.prototype,\n  'recordingSettings', {\n    get: function() {\n      return this.v1.recordingSettings;\n    }\n});\n\nObject.defineProperty(Video.prototype,\n  'rooms', {\n    get: function() {\n      return this.v1.rooms;\n    }\n});\n\nmodule.exports = Video;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\n\nvar ArchivedCallList;\nvar ArchivedCallPage;\nvar ArchivedCallInstance;\nvar ArchivedCallContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ArchivedCallList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Voice.V1.ArchivedCallList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nArchivedCallList = function ArchivedCallList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function archivedCalls\n   * @memberof Twilio.Voice.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.ArchivedCallContext}\n   */\n  /* jshint ignore:end */\n  function ArchivedCallListInstance(sid) {\n    return ArchivedCallListInstance.get(sid);\n  }\n\n  ArchivedCallListInstance._version = version;\n  // Path Solution\n  ArchivedCallListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a archived_call\n   *\n   * @function get\n   * @memberof Twilio.Voice.V1.ArchivedCallList#\n   *\n   * @param {string} date - The date of the Call in UTC.\n   * @param {string} sid - The unique string that identifies this resource\n   *\n   * @returns {Twilio.Voice.V1.ArchivedCallContext}\n   */\n  /* jshint ignore:end */\n  ArchivedCallListInstance.get = function get(date, sid) {\n    return new ArchivedCallContext(this._version, date, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.ArchivedCallList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ArchivedCallListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ArchivedCallListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ArchivedCallListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ArchivedCallPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Voice.V1.ArchivedCallPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ArchivedCallSolution} solution - Path solution\n *\n * @returns ArchivedCallPage\n */\n/* jshint ignore:end */\nArchivedCallPage = function ArchivedCallPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ArchivedCallPage.prototype, Page.prototype);\nArchivedCallPage.prototype.constructor = ArchivedCallPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ArchivedCallInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.ArchivedCallPage#\n *\n * @param {ArchivedCallPayload} payload - Payload response from the API\n *\n * @returns ArchivedCallInstance\n */\n/* jshint ignore:end */\nArchivedCallPage.prototype.getInstance = function getInstance(payload) {\n  return new ArchivedCallInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ArchivedCallPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nArchivedCallPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nArchivedCallPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ArchivedCallContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Voice.V1.ArchivedCallInstance\n *\n * @property {Date} date - date\n * @property {string} sid - sid\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {ArchivedCallPayload} payload - The instance payload\n * @param {date} date - The date of the Call in UTC.\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nArchivedCallInstance = function ArchivedCallInstance(version, payload, date,\n                                                      sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.date = deserialize.iso8601Date(payload.date); // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {date: date || this.date, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ArchivedCallInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ArchivedCallContext(this._version, this._solution.date, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a ArchivedCallInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.ArchivedCallInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ArchivedCallInstance\n */\n/* jshint ignore:end */\nArchivedCallInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ArchivedCallInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nArchivedCallInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nArchivedCallInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ArchivedCallContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Voice.V1.ArchivedCallContext\n *\n * @param {V1} version - Version of the resource\n * @param {date} date - The date of the Call in UTC.\n * @param {sid} sid - The unique string that identifies this resource\n */\n/* jshint ignore:end */\nArchivedCallContext = function ArchivedCallContext(version, date, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {date: date, sid: sid, };\n  this._uri = `/Archives/${date}/Calls/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ArchivedCallInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.ArchivedCallContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ArchivedCallInstance\n */\n/* jshint ignore:end */\nArchivedCallContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ArchivedCallContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nArchivedCallContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nArchivedCallContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ArchivedCallList: ArchivedCallList,\n  ArchivedCallPage: ArchivedCallPage,\n  ArchivedCallInstance: ArchivedCallInstance,\n  ArchivedCallContext: ArchivedCallContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ByocTrunkList;\nvar ByocTrunkPage;\nvar ByocTrunkInstance;\nvar ByocTrunkContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ByocTrunkList\n *\n * @constructor Twilio.Voice.V1.ByocTrunkList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nByocTrunkList = function ByocTrunkList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function byocTrunks\n   * @memberof Twilio.Voice.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.ByocTrunkContext}\n   */\n  /* jshint ignore:end */\n  function ByocTrunkListInstance(sid) {\n    return ByocTrunkListInstance.get(sid);\n  }\n\n  ByocTrunkListInstance._version = version;\n  // Path Solution\n  ByocTrunkListInstance._solution = {};\n  ByocTrunkListInstance._uri = `/ByocTrunks`;\n  /* jshint ignore:start */\n  /**\n   * create a ByocTrunkInstance\n   *\n   * @function create\n   * @memberof Twilio.Voice.V1.ByocTrunkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {string} [opts.voiceUrl] - The URL we should call when receiving a call\n   * @param {string} [opts.voiceMethod] - The HTTP method to use with voice_url\n   * @param {string} [opts.voiceFallbackUrl] -\n   *          The URL we should call when an error occurs in executing TwiML\n   * @param {string} [opts.voiceFallbackMethod] -\n   *          The HTTP method to use with voice_fallback_url\n   * @param {string} [opts.statusCallbackUrl] -\n   *          The URL that we should call to pass status updates\n   * @param {string} [opts.statusCallbackMethod] -\n   *          The HTTP method we should use to call `status_callback_url`\n   * @param {boolean} [opts.cnamLookupEnabled] -\n   *          Whether Caller ID Name (CNAM) lookup is enabled for the trunk\n   * @param {string} [opts.connectionPolicySid] -\n   *          Origination Connection Policy (to your Carrier)\n   * @param {string} [opts.fromDomainSid] -\n   *          The SID of the SIP Domain that should be used in the `From` header of originating calls\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ByocTrunkInstance\n   */\n  /* jshint ignore:end */\n  ByocTrunkListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'VoiceUrl': _.get(opts, 'voiceUrl'),\n      'VoiceMethod': _.get(opts, 'voiceMethod'),\n      'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n      'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n      'StatusCallbackUrl': _.get(opts, 'statusCallbackUrl'),\n      'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n      'CnamLookupEnabled': serialize.bool(_.get(opts, 'cnamLookupEnabled')),\n      'ConnectionPolicySid': _.get(opts, 'connectionPolicySid'),\n      'FromDomainSid': _.get(opts, 'fromDomainSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ByocTrunkInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ByocTrunkInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Voice.V1.ByocTrunkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ByocTrunkListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ByocTrunkInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Voice.V1.ByocTrunkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ByocTrunkListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ByocTrunkInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Voice.V1.ByocTrunkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ByocTrunkListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ByocTrunkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ByocTrunkInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Voice.V1.ByocTrunkList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ByocTrunkListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ByocTrunkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a byoc_trunk\n   *\n   * @function get\n   * @memberof Twilio.Voice.V1.ByocTrunkList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Voice.V1.ByocTrunkContext}\n   */\n  /* jshint ignore:end */\n  ByocTrunkListInstance.get = function get(sid) {\n    return new ByocTrunkContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.ByocTrunkList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ByocTrunkListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ByocTrunkListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ByocTrunkListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ByocTrunkPage\n *\n * @constructor Twilio.Voice.V1.ByocTrunkPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ByocTrunkSolution} solution - Path solution\n *\n * @returns ByocTrunkPage\n */\n/* jshint ignore:end */\nByocTrunkPage = function ByocTrunkPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ByocTrunkPage.prototype, Page.prototype);\nByocTrunkPage.prototype.constructor = ByocTrunkPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ByocTrunkInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.ByocTrunkPage#\n *\n * @param {ByocTrunkPayload} payload - Payload response from the API\n *\n * @returns ByocTrunkInstance\n */\n/* jshint ignore:end */\nByocTrunkPage.prototype.getInstance = function getInstance(payload) {\n  return new ByocTrunkInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ByocTrunkPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nByocTrunkPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nByocTrunkPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ByocTrunkContext\n *\n * @constructor Twilio.Voice.V1.ByocTrunkInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} voiceUrl - The URL we call when receiving a call\n * @property {string} voiceMethod - The HTTP method to use with voice_url\n * @property {string} voiceFallbackUrl -\n *          The URL we call when an error occurs while executing TwiML\n * @property {string} voiceFallbackMethod -\n *          The HTTP method used with voice_fallback_url\n * @property {string} statusCallbackUrl - The URL that we call with status updates\n * @property {string} statusCallbackMethod -\n *          The HTTP method we use to call status_callback_url\n * @property {boolean} cnamLookupEnabled -\n *          Whether Caller ID Name (CNAM) lookup is enabled for the trunk\n * @property {string} connectionPolicySid -\n *          Origination Connection Policy (to your Carrier)\n * @property {string} fromDomainSid -\n *          The SID of the SIP Domain that should be used in the `From` header of originating calls\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {ByocTrunkPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nByocTrunkInstance = function ByocTrunkInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.statusCallbackUrl = payload.status_callback_url; // jshint ignore:line\n  this.statusCallbackMethod = payload.status_callback_method; // jshint ignore:line\n  this.cnamLookupEnabled = payload.cnam_lookup_enabled; // jshint ignore:line\n  this.connectionPolicySid = payload.connection_policy_sid; // jshint ignore:line\n  this.fromDomainSid = payload.from_domain_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ByocTrunkInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ByocTrunkContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ByocTrunkInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.ByocTrunkInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ByocTrunkInstance\n */\n/* jshint ignore:end */\nByocTrunkInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ByocTrunkInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.ByocTrunkInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.voiceUrl] - The URL we should call when receiving a call\n * @param {string} [opts.voiceMethod] -\n *          The HTTP method we should use with voice_url\n * @param {string} [opts.voiceFallbackUrl] -\n *          The URL we should call when an error occurs in executing TwiML\n * @param {string} [opts.voiceFallbackMethod] -\n *          The HTTP method used with voice_fallback_url\n * @param {string} [opts.statusCallbackUrl] -\n *          The URL that we should call to pass status updates\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback_url\n * @param {boolean} [opts.cnamLookupEnabled] -\n *          Whether Caller ID Name (CNAM) lookup is enabled for the trunk\n * @param {string} [opts.connectionPolicySid] -\n *          Origination Connection Policy (to your Carrier)\n * @param {string} [opts.fromDomainSid] -\n *          The SID of the SIP Domain that should be used in the `From` header of originating calls\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ByocTrunkInstance\n */\n/* jshint ignore:end */\nByocTrunkInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ByocTrunkInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.ByocTrunkInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ByocTrunkInstance\n */\n/* jshint ignore:end */\nByocTrunkInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ByocTrunkInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nByocTrunkInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nByocTrunkInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ByocTrunkContext\n *\n * @constructor Twilio.Voice.V1.ByocTrunkContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nByocTrunkContext = function ByocTrunkContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/ByocTrunks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ByocTrunkInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.ByocTrunkContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ByocTrunkInstance\n */\n/* jshint ignore:end */\nByocTrunkContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ByocTrunkInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ByocTrunkInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.ByocTrunkContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.voiceUrl] - The URL we should call when receiving a call\n * @param {string} [opts.voiceMethod] -\n *          The HTTP method we should use with voice_url\n * @param {string} [opts.voiceFallbackUrl] -\n *          The URL we should call when an error occurs in executing TwiML\n * @param {string} [opts.voiceFallbackMethod] -\n *          The HTTP method used with voice_fallback_url\n * @param {string} [opts.statusCallbackUrl] -\n *          The URL that we should call to pass status updates\n * @param {string} [opts.statusCallbackMethod] -\n *          The HTTP method we should use to call status_callback_url\n * @param {boolean} [opts.cnamLookupEnabled] -\n *          Whether Caller ID Name (CNAM) lookup is enabled for the trunk\n * @param {string} [opts.connectionPolicySid] -\n *          Origination Connection Policy (to your Carrier)\n * @param {string} [opts.fromDomainSid] -\n *          The SID of the SIP Domain that should be used in the `From` header of originating calls\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ByocTrunkInstance\n */\n/* jshint ignore:end */\nByocTrunkContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'VoiceUrl': _.get(opts, 'voiceUrl'),\n    'VoiceMethod': _.get(opts, 'voiceMethod'),\n    'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n    'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n    'StatusCallbackUrl': _.get(opts, 'statusCallbackUrl'),\n    'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'),\n    'CnamLookupEnabled': serialize.bool(_.get(opts, 'cnamLookupEnabled')),\n    'ConnectionPolicySid': _.get(opts, 'connectionPolicySid'),\n    'FromDomainSid': _.get(opts, 'fromDomainSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ByocTrunkInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ByocTrunkInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.ByocTrunkContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ByocTrunkInstance\n */\n/* jshint ignore:end */\nByocTrunkContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ByocTrunkContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nByocTrunkContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nByocTrunkContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ByocTrunkList: ByocTrunkList,\n  ByocTrunkPage: ByocTrunkPage,\n  ByocTrunkInstance: ByocTrunkInstance,\n  ByocTrunkContext: ByocTrunkContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ConnectionPolicyTargetList;\nvar ConnectionPolicyTargetPage;\nvar ConnectionPolicyTargetInstance;\nvar ConnectionPolicyTargetContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectionPolicyTargetList\n *\n * @constructor Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n * @param {string} connectionPolicySid -\n *          The SID of the Connection Policy that owns the Target\n */\n/* jshint ignore:end */\nConnectionPolicyTargetList = function ConnectionPolicyTargetList(version,\n    connectionPolicySid) {\n  /* jshint ignore:start */\n  /**\n   * @function targets\n   * @memberof Twilio.Voice.V1.ConnectionPolicyContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetContext}\n   */\n  /* jshint ignore:end */\n  function ConnectionPolicyTargetListInstance(sid) {\n    return ConnectionPolicyTargetListInstance.get(sid);\n  }\n\n  ConnectionPolicyTargetListInstance._version = version;\n  // Path Solution\n  ConnectionPolicyTargetListInstance._solution = {connectionPolicySid: connectionPolicySid};\n  ConnectionPolicyTargetListInstance._uri = `/ConnectionPolicies/${connectionPolicySid}/Targets`;\n  /* jshint ignore:start */\n  /**\n   * create a ConnectionPolicyTargetInstance\n   *\n   * @function create\n   * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.target -\n   *          The SIP address you want Twilio to route your calls to\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {number} [opts.priority] - The relative importance of the target\n   * @param {number} [opts.weight] -\n   *          The value that determines the relative load the Target should receive compared to others with the same priority\n   * @param {boolean} [opts.enabled] - Whether the Target is enabled\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ConnectionPolicyTargetInstance\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyTargetListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['target'])) {\n      throw new Error('Required parameter \"opts[\\'target\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Target': _.get(opts, 'target'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'Priority': _.get(opts, 'priority'),\n      'Weight': _.get(opts, 'weight'),\n      'Enabled': serialize.bool(_.get(opts, 'enabled'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConnectionPolicyTargetInstance(\n        this._version,\n        payload,\n        this._solution.connectionPolicySid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ConnectionPolicyTargetInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyTargetListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ConnectionPolicyTargetInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyTargetListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ConnectionPolicyTargetInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyTargetListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConnectionPolicyTargetPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ConnectionPolicyTargetInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyTargetListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConnectionPolicyTargetPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a connection_policy_target\n   *\n   * @function get\n   * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetContext}\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyTargetListInstance.get = function get(sid) {\n    return new ConnectionPolicyTargetContext(this._version, this._solution.connectionPolicySid, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyTargetListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConnectionPolicyTargetListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConnectionPolicyTargetListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectionPolicyTargetPage\n *\n * @constructor Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConnectionPolicyTargetSolution} solution - Path solution\n *\n * @returns ConnectionPolicyTargetPage\n */\n/* jshint ignore:end */\nConnectionPolicyTargetPage = function ConnectionPolicyTargetPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConnectionPolicyTargetPage.prototype, Page.prototype);\nConnectionPolicyTargetPage.prototype.constructor = ConnectionPolicyTargetPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConnectionPolicyTargetInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetPage#\n *\n * @param {ConnectionPolicyTargetPayload} payload - Payload response from the API\n *\n * @returns ConnectionPolicyTargetInstance\n */\n/* jshint ignore:end */\nConnectionPolicyTargetPage.prototype.getInstance = function getInstance(payload)\n    {\n  return new ConnectionPolicyTargetInstance(\n    this._version,\n    payload,\n    this._solution.connectionPolicySid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConnectionPolicyTargetPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConnectionPolicyTargetPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectionPolicyTargetContext\n *\n * @constructor Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} connectionPolicySid -\n *          The SID of the Connection Policy that owns the Target\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} target -\n *          The SIP address you want Twilio to route your calls to\n * @property {number} priority - The relative importance of the target\n * @property {number} weight -\n *          The value that determines the relative load the Target should receive compared to others with the same priority\n * @property {boolean} enabled - Whether the target is enabled\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {ConnectionPolicyTargetPayload} payload - The instance payload\n * @param {sid} connectionPolicySid -\n *          The SID of the Connection Policy that owns the Target\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nConnectionPolicyTargetInstance = function\n    ConnectionPolicyTargetInstance(version, payload, connectionPolicySid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.connectionPolicySid = payload.connection_policy_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.target = payload.target; // jshint ignore:line\n  this.priority = deserialize.integer(payload.priority); // jshint ignore:line\n  this.weight = deserialize.integer(payload.weight); // jshint ignore:line\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {connectionPolicySid: connectionPolicySid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(ConnectionPolicyTargetInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConnectionPolicyTargetContext(\n          this._version,\n          this._solution.connectionPolicySid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ConnectionPolicyTargetInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyTargetInstance\n */\n/* jshint ignore:end */\nConnectionPolicyTargetInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ConnectionPolicyTargetInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.target] -\n *          The SIP address you want Twilio to route your calls to\n * @param {number} [opts.priority] - The relative importance of the target\n * @param {number} [opts.weight] -\n *          The value that determines the relative load the Target should receive compared to others with the same priority\n * @param {boolean} [opts.enabled] - Whether the Target is enabled\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyTargetInstance\n */\n/* jshint ignore:end */\nConnectionPolicyTargetInstance.prototype.update = function update(opts,\n    callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConnectionPolicyTargetInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyTargetInstance\n */\n/* jshint ignore:end */\nConnectionPolicyTargetInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConnectionPolicyTargetInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConnectionPolicyTargetInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectionPolicyTargetContext\n *\n * @constructor Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} connectionPolicySid -\n *          The SID of the Connection Policy that owns the Target\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nConnectionPolicyTargetContext = function ConnectionPolicyTargetContext(version,\n    connectionPolicySid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {connectionPolicySid: connectionPolicySid, sid: sid, };\n  this._uri = `/ConnectionPolicies/${connectionPolicySid}/Targets/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConnectionPolicyTargetInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyTargetInstance\n */\n/* jshint ignore:end */\nConnectionPolicyTargetContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConnectionPolicyTargetInstance(\n      this._version,\n      payload,\n      this._solution.connectionPolicySid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ConnectionPolicyTargetInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {string} [opts.target] -\n *          The SIP address you want Twilio to route your calls to\n * @param {number} [opts.priority] - The relative importance of the target\n * @param {number} [opts.weight] -\n *          The value that determines the relative load the Target should receive compared to others with the same priority\n * @param {boolean} [opts.enabled] - Whether the Target is enabled\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyTargetInstance\n */\n/* jshint ignore:end */\nConnectionPolicyTargetContext.prototype.update = function update(opts, callback)\n    {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'Target': _.get(opts, 'target'),\n    'Priority': _.get(opts, 'priority'),\n    'Weight': _.get(opts, 'weight'),\n    'Enabled': serialize.bool(_.get(opts, 'enabled'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConnectionPolicyTargetInstance(\n      this._version,\n      payload,\n      this._solution.connectionPolicySid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConnectionPolicyTargetInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyTargetInstance\n */\n/* jshint ignore:end */\nConnectionPolicyTargetContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConnectionPolicyTargetContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConnectionPolicyTargetContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConnectionPolicyTargetList: ConnectionPolicyTargetList,\n  ConnectionPolicyTargetPage: ConnectionPolicyTargetPage,\n  ConnectionPolicyTargetInstance: ConnectionPolicyTargetInstance,\n  ConnectionPolicyTargetContext: ConnectionPolicyTargetContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar ConnectionPolicyTargetList = require(\n    './connectionPolicy/connectionPolicyTarget').ConnectionPolicyTargetList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ConnectionPolicyList;\nvar ConnectionPolicyPage;\nvar ConnectionPolicyInstance;\nvar ConnectionPolicyContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectionPolicyList\n *\n * @constructor Twilio.Voice.V1.ConnectionPolicyList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nConnectionPolicyList = function ConnectionPolicyList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function connectionPolicies\n   * @memberof Twilio.Voice.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.ConnectionPolicyContext}\n   */\n  /* jshint ignore:end */\n  function ConnectionPolicyListInstance(sid) {\n    return ConnectionPolicyListInstance.get(sid);\n  }\n\n  ConnectionPolicyListInstance._version = version;\n  // Path Solution\n  ConnectionPolicyListInstance._solution = {};\n  ConnectionPolicyListInstance._uri = `/ConnectionPolicies`;\n  /* jshint ignore:start */\n  /**\n   * create a ConnectionPolicyInstance\n   *\n   * @function create\n   * @memberof Twilio.Voice.V1.ConnectionPolicyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ConnectionPolicyInstance\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConnectionPolicyInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams ConnectionPolicyInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Voice.V1.ConnectionPolicyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ConnectionPolicyInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Voice.V1.ConnectionPolicyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ConnectionPolicyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Voice.V1.ConnectionPolicyList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConnectionPolicyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ConnectionPolicyInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Voice.V1.ConnectionPolicyList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ConnectionPolicyPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a connection_policy\n   *\n   * @function get\n   * @memberof Twilio.Voice.V1.ConnectionPolicyList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Voice.V1.ConnectionPolicyContext}\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyListInstance.get = function get(sid) {\n    return new ConnectionPolicyContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.ConnectionPolicyList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ConnectionPolicyListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ConnectionPolicyListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ConnectionPolicyListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectionPolicyPage\n *\n * @constructor Twilio.Voice.V1.ConnectionPolicyPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ConnectionPolicySolution} solution - Path solution\n *\n * @returns ConnectionPolicyPage\n */\n/* jshint ignore:end */\nConnectionPolicyPage = function ConnectionPolicyPage(version, response,\n                                                      solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ConnectionPolicyPage.prototype, Page.prototype);\nConnectionPolicyPage.prototype.constructor = ConnectionPolicyPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ConnectionPolicyInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.ConnectionPolicyPage#\n *\n * @param {ConnectionPolicyPayload} payload - Payload response from the API\n *\n * @returns ConnectionPolicyInstance\n */\n/* jshint ignore:end */\nConnectionPolicyPage.prototype.getInstance = function getInstance(payload) {\n  return new ConnectionPolicyInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ConnectionPolicyPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConnectionPolicyPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConnectionPolicyPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectionPolicyContext\n *\n * @constructor Twilio.Voice.V1.ConnectionPolicyInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related resources\n *\n * @param {V1} version - Version of the resource\n * @param {ConnectionPolicyPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nConnectionPolicyInstance = function ConnectionPolicyInstance(version, payload,\n    sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(ConnectionPolicyInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ConnectionPolicyContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ConnectionPolicyInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.ConnectionPolicyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyInstance\n */\n/* jshint ignore:end */\nConnectionPolicyInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ConnectionPolicyInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.ConnectionPolicyInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyInstance\n */\n/* jshint ignore:end */\nConnectionPolicyInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConnectionPolicyInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.ConnectionPolicyInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyInstance\n */\n/* jshint ignore:end */\nConnectionPolicyInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the targets\n *\n * @function targets\n * @memberof Twilio.Voice.V1.ConnectionPolicyInstance#\n *\n * @returns {Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList}\n */\n/* jshint ignore:end */\nConnectionPolicyInstance.prototype.targets = function targets() {\n  return this._proxy.targets;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ConnectionPolicyInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConnectionPolicyInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nConnectionPolicyInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ConnectionPolicyContext\n *\n * @constructor Twilio.Voice.V1.ConnectionPolicyContext\n *\n * @property {Twilio.Voice.V1.ConnectionPolicyContext.ConnectionPolicyTargetList} targets -\n *          targets resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nConnectionPolicyContext = function ConnectionPolicyContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/ConnectionPolicies/${sid}`;\n\n  // Dependents\n  this._targets = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ConnectionPolicyInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyInstance\n */\n/* jshint ignore:end */\nConnectionPolicyContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConnectionPolicyInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ConnectionPolicyInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyInstance\n */\n/* jshint ignore:end */\nConnectionPolicyContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ConnectionPolicyInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a ConnectionPolicyInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ConnectionPolicyInstance\n */\n/* jshint ignore:end */\nConnectionPolicyContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ConnectionPolicyContext.prototype,\n  'targets', {\n    get: function() {\n      if (!this._targets) {\n        this._targets = new ConnectionPolicyTargetList(this._version, this._solution.sid);\n      }\n      return this._targets;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.ConnectionPolicyContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nConnectionPolicyContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nConnectionPolicyContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ConnectionPolicyList: ConnectionPolicyList,\n  ConnectionPolicyPage: ConnectionPolicyPage,\n  ConnectionPolicyInstance: ConnectionPolicyInstance,\n  ConnectionPolicyContext: ConnectionPolicyContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BulkCountryUpdateList;\nvar BulkCountryUpdatePage;\nvar BulkCountryUpdateInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the BulkCountryUpdateList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.BulkCountryUpdateList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nBulkCountryUpdateList = function BulkCountryUpdateList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function bulkCountryUpdates\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.DialingPermissionsContext.BulkCountryUpdateContext}\n   */\n  /* jshint ignore:end */\n  function BulkCountryUpdateListInstance(sid) {\n    return BulkCountryUpdateListInstance.get(sid);\n  }\n\n  BulkCountryUpdateListInstance._version = version;\n  // Path Solution\n  BulkCountryUpdateListInstance._solution = {};\n  BulkCountryUpdateListInstance._uri = `/DialingPermissions/BulkCountryUpdates`;\n  /* jshint ignore:start */\n  /**\n   * create a BulkCountryUpdateInstance\n   *\n   * @function create\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.BulkCountryUpdateList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.updateRequest - URL encoded JSON array of update objects\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed BulkCountryUpdateInstance\n   */\n  /* jshint ignore:end */\n  BulkCountryUpdateListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['updateRequest'])) {\n      throw new Error('Required parameter \"opts[\\'updateRequest\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'UpdateRequest': _.get(opts, 'updateRequest')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BulkCountryUpdateInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.BulkCountryUpdateList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BulkCountryUpdateListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BulkCountryUpdateListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BulkCountryUpdateListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BulkCountryUpdatePage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.BulkCountryUpdatePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BulkCountryUpdateSolution} solution - Path solution\n *\n * @returns BulkCountryUpdatePage\n */\n/* jshint ignore:end */\nBulkCountryUpdatePage = function BulkCountryUpdatePage(version, response,\n                                                        solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BulkCountryUpdatePage.prototype, Page.prototype);\nBulkCountryUpdatePage.prototype.constructor = BulkCountryUpdatePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BulkCountryUpdateInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.BulkCountryUpdatePage#\n *\n * @param {BulkCountryUpdatePayload} payload - Payload response from the API\n *\n * @returns BulkCountryUpdateInstance\n */\n/* jshint ignore:end */\nBulkCountryUpdatePage.prototype.getInstance = function getInstance(payload) {\n  return new BulkCountryUpdateInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.BulkCountryUpdatePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBulkCountryUpdatePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBulkCountryUpdatePage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BulkCountryUpdateContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.BulkCountryUpdateInstance\n *\n * @property {number} updateCount - The number of countries updated\n * @property {string} updateRequest - A URL encoded JSON array of update objects\n *\n * @param {V1} version - Version of the resource\n * @param {BulkCountryUpdatePayload} payload - The instance payload\n */\n/* jshint ignore:end */\nBulkCountryUpdateInstance = function BulkCountryUpdateInstance(version, payload)\n    {\n  this._version = version;\n\n  // Marshaled Properties\n  this.updateCount = deserialize.integer(payload.update_count); // jshint ignore:line\n  this.updateRequest = payload.update_request; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.BulkCountryUpdateInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBulkCountryUpdateInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBulkCountryUpdateInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BulkCountryUpdateList: BulkCountryUpdateList,\n  BulkCountryUpdatePage: BulkCountryUpdatePage,\n  BulkCountryUpdateInstance: BulkCountryUpdateInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../../base/values');  /* jshint ignore:line */\n\nvar HighriskSpecialPrefixList;\nvar HighriskSpecialPrefixPage;\nvar HighriskSpecialPrefixInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the HighriskSpecialPrefixList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n * @param {string} isoCode - The ISO country code\n */\n/* jshint ignore:end */\nHighriskSpecialPrefixList = function HighriskSpecialPrefixList(version, isoCode)\n    {\n  /* jshint ignore:start */\n  /**\n   * @function highriskSpecialPrefixes\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixContext}\n   */\n  /* jshint ignore:end */\n  function HighriskSpecialPrefixListInstance(sid) {\n    return HighriskSpecialPrefixListInstance.get(sid);\n  }\n\n  HighriskSpecialPrefixListInstance._version = version;\n  // Path Solution\n  HighriskSpecialPrefixListInstance._solution = {isoCode: isoCode};\n  HighriskSpecialPrefixListInstance._uri = `/DialingPermissions/Countries/${isoCode}/HighRiskSpecialPrefixes`;\n  /* jshint ignore:start */\n  /**\n   * Streams HighriskSpecialPrefixInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  HighriskSpecialPrefixListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists HighriskSpecialPrefixInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  HighriskSpecialPrefixListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of HighriskSpecialPrefixInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  HighriskSpecialPrefixListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new HighriskSpecialPrefixPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of HighriskSpecialPrefixInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  HighriskSpecialPrefixListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new HighriskSpecialPrefixPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  HighriskSpecialPrefixListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  HighriskSpecialPrefixListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return HighriskSpecialPrefixListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the HighriskSpecialPrefixPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {HighriskSpecialPrefixSolution} solution - Path solution\n *\n * @returns HighriskSpecialPrefixPage\n */\n/* jshint ignore:end */\nHighriskSpecialPrefixPage = function HighriskSpecialPrefixPage(version,\n    response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(HighriskSpecialPrefixPage.prototype, Page.prototype);\nHighriskSpecialPrefixPage.prototype.constructor = HighriskSpecialPrefixPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of HighriskSpecialPrefixInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixPage#\n *\n * @param {HighriskSpecialPrefixPayload} payload - Payload response from the API\n *\n * @returns HighriskSpecialPrefixInstance\n */\n/* jshint ignore:end */\nHighriskSpecialPrefixPage.prototype.getInstance = function getInstance(payload)\n    {\n  return new HighriskSpecialPrefixInstance(this._version, payload, this._solution.isoCode);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nHighriskSpecialPrefixPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nHighriskSpecialPrefixPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the HighriskSpecialPrefixContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixInstance\n *\n * @property {string} prefix -\n *          A prefix that includes the E.164 assigned country code\n *\n * @param {V1} version - Version of the resource\n * @param {HighriskSpecialPrefixPayload} payload - The instance payload\n * @param {iso_country_code} isoCode - The ISO country code\n */\n/* jshint ignore:end */\nHighriskSpecialPrefixInstance = function HighriskSpecialPrefixInstance(version,\n    payload, isoCode) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.prefix = payload.prefix; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {isoCode: isoCode, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nHighriskSpecialPrefixInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nHighriskSpecialPrefixInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  HighriskSpecialPrefixList: HighriskSpecialPrefixList,\n  HighriskSpecialPrefixPage: HighriskSpecialPrefixPage,\n  HighriskSpecialPrefixInstance: HighriskSpecialPrefixInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar HighriskSpecialPrefixList = require(\n    './country/highriskSpecialPrefix').HighriskSpecialPrefixList;\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar CountryList;\nvar CountryPage;\nvar CountryInstance;\nvar CountryContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.CountryList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCountryList = function CountryList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function countries\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.DialingPermissionsContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  function CountryListInstance(sid) {\n    return CountryListInstance.get(sid);\n  }\n\n  CountryListInstance._version = version;\n  // Path Solution\n  CountryListInstance._solution = {};\n  CountryListInstance._uri = `/DialingPermissions/Countries`;\n  /* jshint ignore:start */\n  /**\n   * Streams CountryInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.isoCode] -\n   *          Filter to retrieve the country permissions by specifying the ISO country code\n   * @param {string} [opts.continent] -\n   *          Filter to retrieve the country permissions by specifying the continent\n   * @param {string} [opts.countryCode] - Country code filter\n   * @param {boolean} [opts.lowRiskNumbersEnabled] -\n   *          Filter to retrieve the country permissions with dialing to low-risk numbers enabled\n   * @param {boolean} [opts.highRiskSpecialNumbersEnabled] -\n   *          Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled\n   * @param {boolean} [opts.highRiskTollfraudNumbersEnabled] -\n   *          Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CountryListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CountryInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.isoCode] -\n   *          Filter to retrieve the country permissions by specifying the ISO country code\n   * @param {string} [opts.continent] -\n   *          Filter to retrieve the country permissions by specifying the continent\n   * @param {string} [opts.countryCode] - Country code filter\n   * @param {boolean} [opts.lowRiskNumbersEnabled] -\n   *          Filter to retrieve the country permissions with dialing to low-risk numbers enabled\n   * @param {boolean} [opts.highRiskSpecialNumbersEnabled] -\n   *          Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled\n   * @param {boolean} [opts.highRiskTollfraudNumbersEnabled] -\n   *          Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.isoCode] -\n   *          Filter to retrieve the country permissions by specifying the ISO country code\n   * @param {string} [opts.continent] -\n   *          Filter to retrieve the country permissions by specifying the continent\n   * @param {string} [opts.countryCode] - Country code filter\n   * @param {boolean} [opts.lowRiskNumbersEnabled] -\n   *          Filter to retrieve the country permissions with dialing to low-risk numbers enabled\n   * @param {boolean} [opts.highRiskSpecialNumbersEnabled] -\n   *          Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled\n   * @param {boolean} [opts.highRiskTollfraudNumbersEnabled] -\n   *          Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'IsoCode': _.get(opts, 'isoCode'),\n      'Continent': _.get(opts, 'continent'),\n      'CountryCode': _.get(opts, 'countryCode'),\n      'LowRiskNumbersEnabled': serialize.bool(_.get(opts, 'lowRiskNumbersEnabled')),\n      'HighRiskSpecialNumbersEnabled': serialize.bool(_.get(opts, 'highRiskSpecialNumbersEnabled')),\n      'HighRiskTollfraudNumbersEnabled': serialize.bool(_.get(opts, 'highRiskTollfraudNumbersEnabled')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CountryInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CountryListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CountryPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a country\n   *\n   * @function get\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryList#\n   *\n   * @param {string} isoCode - The ISO country code\n   *\n   * @returns {Twilio.Voice.V1.DialingPermissionsContext.CountryContext}\n   */\n  /* jshint ignore:end */\n  CountryListInstance.get = function get(isoCode) {\n    return new CountryContext(this._version, isoCode);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CountryListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CountryListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CountryListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.CountryPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CountrySolution} solution - Path solution\n *\n * @returns CountryPage\n */\n/* jshint ignore:end */\nCountryPage = function CountryPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CountryPage.prototype, Page.prototype);\nCountryPage.prototype.constructor = CountryPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CountryInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryPage#\n *\n * @param {CountryPayload} payload - Payload response from the API\n *\n * @returns CountryInstance\n */\n/* jshint ignore:end */\nCountryPage.prototype.getInstance = function getInstance(payload) {\n  return new CountryInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.CountryInstance\n *\n * @property {string} isoCode - The ISO country code\n * @property {string} name - The name of the country\n * @property {string} continent -\n *          The name of the continent in which the country is located\n * @property {string} countryCodes - The E.164 assigned country codes(s)\n * @property {boolean} lowRiskNumbersEnabled -\n *          Whether dialing to low-risk numbers is enabled\n * @property {boolean} highRiskSpecialNumbersEnabled -\n *          Whether dialing to high-risk special services numbers is enabled\n * @property {boolean} highRiskTollfraudNumbersEnabled -\n *          Whether dialing to high-risk toll fraud numbers is enabled, else `false`\n * @property {string} url - The absolute URL of this resource\n * @property {string} links - A list of URLs related to this resource\n *\n * @param {V1} version - Version of the resource\n * @param {CountryPayload} payload - The instance payload\n * @param {iso_country_code} isoCode - The ISO country code\n */\n/* jshint ignore:end */\nCountryInstance = function CountryInstance(version, payload, isoCode) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.isoCode = payload.iso_code; // jshint ignore:line\n  this.name = payload.name; // jshint ignore:line\n  this.continent = payload.continent; // jshint ignore:line\n  this.countryCodes = payload.country_codes; // jshint ignore:line\n  this.lowRiskNumbersEnabled = payload.low_risk_numbers_enabled; // jshint ignore:line\n  this.highRiskSpecialNumbersEnabled = payload.high_risk_special_numbers_enabled; // jshint ignore:line\n  this.highRiskTollfraudNumbersEnabled = payload.high_risk_tollfraud_numbers_enabled; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {isoCode: isoCode || this.isoCode, };\n};\n\nObject.defineProperty(CountryInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CountryContext(this._version, this._solution.isoCode);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the highriskSpecialPrefixes\n *\n * @function highriskSpecialPrefixes\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryInstance#\n *\n * @returns {Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixList}\n */\n/* jshint ignore:end */\nCountryInstance.prototype.highriskSpecialPrefixes = function\n    highriskSpecialPrefixes() {\n  return this._proxy.highriskSpecialPrefixes;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCountryInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CountryContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.CountryContext\n *\n * @property {Twilio.Voice.V1.DialingPermissionsContext.CountryContext.HighriskSpecialPrefixList} highriskSpecialPrefixes -\n *          highriskSpecialPrefixes resource\n *\n * @param {V1} version - Version of the resource\n * @param {iso_country_code} isoCode - The ISO country code\n */\n/* jshint ignore:end */\nCountryContext = function CountryContext(version, isoCode) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {isoCode: isoCode, };\n  this._uri = `/DialingPermissions/Countries/${isoCode}`;\n\n  // Dependents\n  this._highriskSpecialPrefixes = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CountryInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CountryInstance\n */\n/* jshint ignore:end */\nCountryContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CountryInstance(this._version, payload, this._solution.isoCode));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(CountryContext.prototype,\n  'highriskSpecialPrefixes', {\n    get: function() {\n      if (!this._highriskSpecialPrefixes) {\n        this._highriskSpecialPrefixes = new HighriskSpecialPrefixList(\n          this._version,\n          this._solution.isoCode\n        );\n      }\n      return this._highriskSpecialPrefixes;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.CountryContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCountryContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCountryContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CountryList: CountryList,\n  CountryPage: CountryPage,\n  CountryInstance: CountryInstance,\n  CountryContext: CountryContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar SettingsList;\nvar SettingsPage;\nvar SettingsInstance;\nvar SettingsContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SettingsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.SettingsList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSettingsList = function SettingsList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function settings\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.DialingPermissionsContext.SettingsContext}\n   */\n  /* jshint ignore:end */\n  function SettingsListInstance(sid) {\n    return SettingsListInstance.get(sid);\n  }\n\n  SettingsListInstance._version = version;\n  // Path Solution\n  SettingsListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a settings\n   *\n   * @function get\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsList#\n   *\n   * @returns {Twilio.Voice.V1.DialingPermissionsContext.SettingsContext}\n   */\n  /* jshint ignore:end */\n  SettingsListInstance.get = function get() {\n    return new SettingsContext(this._version);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SettingsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SettingsListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SettingsListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SettingsPage\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.SettingsPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SettingsSolution} solution - Path solution\n *\n * @returns SettingsPage\n */\n/* jshint ignore:end */\nSettingsPage = function SettingsPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SettingsPage.prototype, Page.prototype);\nSettingsPage.prototype.constructor = SettingsPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SettingsInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsPage#\n *\n * @param {SettingsPayload} payload - Payload response from the API\n *\n * @returns SettingsInstance\n */\n/* jshint ignore:end */\nSettingsPage.prototype.getInstance = function getInstance(payload) {\n  return new SettingsInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSettingsPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSettingsPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SettingsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.SettingsInstance\n *\n * @property {boolean} dialingPermissionsInheritance -\n *          `true` if the sub-account will inherit voice dialing permissions from the Master Project; otherwise `false`\n * @property {string} url - The absolute URL of this resource\n *\n * @param {V1} version - Version of the resource\n * @param {SettingsPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nSettingsInstance = function SettingsInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.dialingPermissionsInheritance = payload.dialing_permissions_inheritance; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\nObject.defineProperty(SettingsInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SettingsContext(this._version);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SettingsInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SettingsInstance\n */\n/* jshint ignore:end */\nSettingsInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SettingsInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.dialingPermissionsInheritance] -\n *          `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SettingsInstance\n */\n/* jshint ignore:end */\nSettingsInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSettingsInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSettingsInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SettingsContext\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsContext.SettingsContext\n *\n * @param {V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSettingsContext = function SettingsContext(version) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {};\n  this._uri = `/Settings`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SettingsInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SettingsInstance\n */\n/* jshint ignore:end */\nSettingsContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SettingsInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SettingsInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.dialingPermissionsInheritance] -\n *          `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SettingsInstance\n */\n/* jshint ignore:end */\nSettingsContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'DialingPermissionsInheritance': serialize.bool(_.get(opts, 'dialingPermissionsInheritance'))\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SettingsInstance(this._version, payload));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.DialingPermissionsContext.SettingsContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSettingsContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSettingsContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SettingsList: SettingsList,\n  SettingsPage: SettingsPage,\n  SettingsInstance: SettingsInstance,\n  SettingsContext: SettingsContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BulkCountryUpdateList = require(\n    './dialingPermissions/bulkCountryUpdate').BulkCountryUpdateList;\nvar CountryList = require('./dialingPermissions/country').CountryList;\nvar SettingsList = require('./dialingPermissions/settings').SettingsList;\n\nvar DialingPermissionsList;\n\n/* jshint ignore:start */\n/**\n * Initialize the DialingPermissionsList\n *\n * PLEASE NOTE that this class contains preview products that are subject to\n * change. Use them with caution. If you currently do not have developer preview\n * access, please contact help@twilio.com.\n *\n * @constructor Twilio.Voice.V1.DialingPermissionsList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nDialingPermissionsList = function DialingPermissionsList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function dialingPermissions\n   * @memberof Twilio.Voice.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.DialingPermissionsContext}\n   */\n  /* jshint ignore:end */\n  function DialingPermissionsListInstance(sid) {\n    return DialingPermissionsListInstance.get(sid);\n  }\n\n  DialingPermissionsListInstance._version = version;\n  // Path Solution\n  DialingPermissionsListInstance._solution = {};\n\n  // Components\n  DialingPermissionsListInstance._countries = undefined;\n  DialingPermissionsListInstance._settings = undefined;\n  DialingPermissionsListInstance._bulkCountryUpdates = undefined;\n\n  Object.defineProperty(DialingPermissionsListInstance,\n    'countries', {\n      get: function countries() {\n        if (!this._countries) {\n          this._countries = new CountryList(this._version);\n        }\n\n        return this._countries;\n      }\n  });\n\n  Object.defineProperty(DialingPermissionsListInstance,\n    'settings', {\n      get: function settings() {\n        if (!this._settings) {\n          this._settings = new SettingsList(this._version);\n        }\n\n        return this._settings;\n      }\n  });\n\n  Object.defineProperty(DialingPermissionsListInstance,\n    'bulkCountryUpdates', {\n      get: function bulkCountryUpdates() {\n        if (!this._bulkCountryUpdates) {\n          this._bulkCountryUpdates = new BulkCountryUpdateList(this._version);\n        }\n\n        return this._bulkCountryUpdates;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.DialingPermissionsList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DialingPermissionsListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DialingPermissionsListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DialingPermissionsListInstance;\n};\n\nmodule.exports = {\n  DialingPermissionsList: DialingPermissionsList\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar IpRecordList;\nvar IpRecordPage;\nvar IpRecordInstance;\nvar IpRecordContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the IpRecordList\n *\n * @constructor Twilio.Voice.V1.IpRecordList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nIpRecordList = function IpRecordList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function ipRecords\n   * @memberof Twilio.Voice.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.IpRecordContext}\n   */\n  /* jshint ignore:end */\n  function IpRecordListInstance(sid) {\n    return IpRecordListInstance.get(sid);\n  }\n\n  IpRecordListInstance._version = version;\n  // Path Solution\n  IpRecordListInstance._solution = {};\n  IpRecordListInstance._uri = `/IpRecords`;\n  /* jshint ignore:start */\n  /**\n   * create a IpRecordInstance\n   *\n   * @function create\n   * @memberof Twilio.Voice.V1.IpRecordList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.ipAddress -\n   *          An IP address in dotted decimal notation, IPv4 only.\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {number} [opts.cidrPrefixLength] -\n   *          An integer representing the length of the {@link https://tools.ietf.org/html/rfc4632|CIDR} prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32.\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed IpRecordInstance\n   */\n  /* jshint ignore:end */\n  IpRecordListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['ipAddress'])) {\n      throw new Error('Required parameter \"opts[\\'ipAddress\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'IpAddress': _.get(opts, 'ipAddress'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'CidrPrefixLength': _.get(opts, 'cidrPrefixLength')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpRecordInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams IpRecordInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Voice.V1.IpRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  IpRecordListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists IpRecordInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Voice.V1.IpRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpRecordListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of IpRecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Voice.V1.IpRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpRecordListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpRecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of IpRecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Voice.V1.IpRecordList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpRecordListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpRecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a ip_record\n   *\n   * @function get\n   * @memberof Twilio.Voice.V1.IpRecordList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Voice.V1.IpRecordContext}\n   */\n  /* jshint ignore:end */\n  IpRecordListInstance.get = function get(sid) {\n    return new IpRecordContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.IpRecordList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  IpRecordListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  IpRecordListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return IpRecordListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpRecordPage\n *\n * @constructor Twilio.Voice.V1.IpRecordPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {IpRecordSolution} solution - Path solution\n *\n * @returns IpRecordPage\n */\n/* jshint ignore:end */\nIpRecordPage = function IpRecordPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(IpRecordPage.prototype, Page.prototype);\nIpRecordPage.prototype.constructor = IpRecordPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of IpRecordInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.IpRecordPage#\n *\n * @param {IpRecordPayload} payload - Payload response from the API\n *\n * @returns IpRecordInstance\n */\n/* jshint ignore:end */\nIpRecordPage.prototype.getInstance = function getInstance(payload) {\n  return new IpRecordInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.IpRecordPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpRecordPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpRecordPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpRecordContext\n *\n * @constructor Twilio.Voice.V1.IpRecordInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {string} ipAddress -\n *          An IP address in dotted decimal notation, IPv4 only.\n * @property {number} cidrPrefixLength -\n *          An integer representing the length of the {@link https://tools.ietf.org/html/rfc4632|CIDR} prefix to use with this IP address. By default the entire IP address is used, which for IPv4 is value 32.\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {IpRecordPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nIpRecordInstance = function IpRecordInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.ipAddress = payload.ip_address; // jshint ignore:line\n  this.cidrPrefixLength = deserialize.integer(payload.cidr_prefix_length); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(IpRecordInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new IpRecordContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a IpRecordInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.IpRecordInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpRecordInstance\n */\n/* jshint ignore:end */\nIpRecordInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a IpRecordInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.IpRecordInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpRecordInstance\n */\n/* jshint ignore:end */\nIpRecordInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpRecordInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.IpRecordInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpRecordInstance\n */\n/* jshint ignore:end */\nIpRecordInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.IpRecordInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpRecordInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpRecordInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpRecordContext\n *\n * @constructor Twilio.Voice.V1.IpRecordContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nIpRecordContext = function IpRecordContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/IpRecords/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a IpRecordInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.IpRecordContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpRecordInstance\n */\n/* jshint ignore:end */\nIpRecordContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IpRecordInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a IpRecordInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.IpRecordContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpRecordInstance\n */\n/* jshint ignore:end */\nIpRecordContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'FriendlyName': _.get(opts, 'friendlyName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IpRecordInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a IpRecordInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.IpRecordContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpRecordInstance\n */\n/* jshint ignore:end */\nIpRecordContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.IpRecordContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpRecordContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nIpRecordContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  IpRecordList: IpRecordList,\n  IpRecordPage: IpRecordPage,\n  IpRecordInstance: IpRecordInstance,\n  IpRecordContext: IpRecordContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SourceIpMappingList;\nvar SourceIpMappingPage;\nvar SourceIpMappingInstance;\nvar SourceIpMappingContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SourceIpMappingList\n *\n * @constructor Twilio.Voice.V1.SourceIpMappingList\n *\n * @param {Twilio.Voice.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSourceIpMappingList = function SourceIpMappingList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function sourceIpMappings\n   * @memberof Twilio.Voice.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Voice.V1.SourceIpMappingContext}\n   */\n  /* jshint ignore:end */\n  function SourceIpMappingListInstance(sid) {\n    return SourceIpMappingListInstance.get(sid);\n  }\n\n  SourceIpMappingListInstance._version = version;\n  // Path Solution\n  SourceIpMappingListInstance._solution = {};\n  SourceIpMappingListInstance._uri = `/SourceIpMappings`;\n  /* jshint ignore:start */\n  /**\n   * create a SourceIpMappingInstance\n   *\n   * @function create\n   * @memberof Twilio.Voice.V1.SourceIpMappingList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.ipRecordSid -\n   *          The unique string that identifies an IP Record\n   * @param {string} opts.sipDomainSid -\n   *          The unique string that identifies a SIP Domain\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SourceIpMappingInstance\n   */\n  /* jshint ignore:end */\n  SourceIpMappingListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['ipRecordSid'])) {\n      throw new Error('Required parameter \"opts[\\'ipRecordSid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['sipDomainSid'])) {\n      throw new Error('Required parameter \"opts[\\'sipDomainSid\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'IpRecordSid': _.get(opts, 'ipRecordSid'),\n      'SipDomainSid': _.get(opts, 'sipDomainSid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SourceIpMappingInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SourceIpMappingInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Voice.V1.SourceIpMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SourceIpMappingListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SourceIpMappingInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Voice.V1.SourceIpMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SourceIpMappingListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SourceIpMappingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Voice.V1.SourceIpMappingList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SourceIpMappingListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SourceIpMappingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SourceIpMappingInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Voice.V1.SourceIpMappingList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SourceIpMappingListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SourceIpMappingPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a source_ip_mapping\n   *\n   * @function get\n   * @memberof Twilio.Voice.V1.SourceIpMappingList#\n   *\n   * @param {string} sid - The unique string that identifies the resource\n   *\n   * @returns {Twilio.Voice.V1.SourceIpMappingContext}\n   */\n  /* jshint ignore:end */\n  SourceIpMappingListInstance.get = function get(sid) {\n    return new SourceIpMappingContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Voice.V1.SourceIpMappingList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SourceIpMappingListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SourceIpMappingListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SourceIpMappingListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SourceIpMappingPage\n *\n * @constructor Twilio.Voice.V1.SourceIpMappingPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SourceIpMappingSolution} solution - Path solution\n *\n * @returns SourceIpMappingPage\n */\n/* jshint ignore:end */\nSourceIpMappingPage = function SourceIpMappingPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SourceIpMappingPage.prototype, Page.prototype);\nSourceIpMappingPage.prototype.constructor = SourceIpMappingPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SourceIpMappingInstance\n *\n * @function getInstance\n * @memberof Twilio.Voice.V1.SourceIpMappingPage#\n *\n * @param {SourceIpMappingPayload} payload - Payload response from the API\n *\n * @returns SourceIpMappingInstance\n */\n/* jshint ignore:end */\nSourceIpMappingPage.prototype.getInstance = function getInstance(payload) {\n  return new SourceIpMappingInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.SourceIpMappingPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSourceIpMappingPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSourceIpMappingPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SourceIpMappingContext\n *\n * @constructor Twilio.Voice.V1.SourceIpMappingInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} ipRecordSid - The unique string that identifies an IP Record\n * @property {string} sipDomainSid - The unique string that identifies a SIP Domain\n * @property {Date} dateCreated -\n *          The RFC 2822 date and time in GMT that the resource was created\n * @property {Date} dateUpdated -\n *          The RFC 2822 date and time in GMT that the resource was last updated\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {SourceIpMappingPayload} payload - The instance payload\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSourceIpMappingInstance = function SourceIpMappingInstance(version, payload,\n                                                            sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.ipRecordSid = payload.ip_record_sid; // jshint ignore:line\n  this.sipDomainSid = payload.sip_domain_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SourceIpMappingInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SourceIpMappingContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SourceIpMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.SourceIpMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SourceIpMappingInstance\n */\n/* jshint ignore:end */\nSourceIpMappingInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SourceIpMappingInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.SourceIpMappingInstance#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.sipDomainSid -\n *          The unique string that identifies a SIP Domain\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SourceIpMappingInstance\n */\n/* jshint ignore:end */\nSourceIpMappingInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SourceIpMappingInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.SourceIpMappingInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SourceIpMappingInstance\n */\n/* jshint ignore:end */\nSourceIpMappingInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.SourceIpMappingInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSourceIpMappingInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSourceIpMappingInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SourceIpMappingContext\n *\n * @constructor Twilio.Voice.V1.SourceIpMappingContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The unique string that identifies the resource\n */\n/* jshint ignore:end */\nSourceIpMappingContext = function SourceIpMappingContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/SourceIpMappings/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SourceIpMappingInstance\n *\n * @function fetch\n * @memberof Twilio.Voice.V1.SourceIpMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SourceIpMappingInstance\n */\n/* jshint ignore:end */\nSourceIpMappingContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SourceIpMappingInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SourceIpMappingInstance\n *\n * @function update\n * @memberof Twilio.Voice.V1.SourceIpMappingContext#\n *\n * @param {object} opts - Options for request\n * @param {string} opts.sipDomainSid -\n *          The unique string that identifies a SIP Domain\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SourceIpMappingInstance\n */\n/* jshint ignore:end */\nSourceIpMappingContext.prototype.update = function update(opts, callback) {\n  if (_.isUndefined(opts)) {\n    throw new Error('Required parameter \"opts\" missing.');\n  }\n  if (_.isUndefined(opts['sipDomainSid'])) {\n    throw new Error('Required parameter \"opts[\\'sipDomainSid\\']\" missing.');\n  }\n\n  var deferred = Q.defer();\n  var data = values.of({'SipDomainSid': _.get(opts, 'sipDomainSid')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SourceIpMappingInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SourceIpMappingInstance\n *\n * @function remove\n * @memberof Twilio.Voice.V1.SourceIpMappingContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SourceIpMappingInstance\n */\n/* jshint ignore:end */\nSourceIpMappingContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Voice.V1.SourceIpMappingContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSourceIpMappingContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSourceIpMappingContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SourceIpMappingList: SourceIpMappingList,\n  SourceIpMappingPage: SourceIpMappingPage,\n  SourceIpMappingInstance: SourceIpMappingInstance,\n  SourceIpMappingContext: SourceIpMappingContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar ArchivedCallList = require('./v1/archivedCall').ArchivedCallList;\nvar ByocTrunkList = require('./v1/byocTrunk').ByocTrunkList;\nvar ConnectionPolicyList = require(\n    './v1/connectionPolicy').ConnectionPolicyList;\nvar DialingPermissionsList = require(\n    './v1/dialingPermissions').DialingPermissionsList;\nvar IpRecordList = require('./v1/ipRecord').IpRecordList;\nvar SourceIpMappingList = require('./v1/sourceIpMapping').SourceIpMappingList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Voice\n *\n * @constructor Twilio.Voice.V1\n *\n * @property {Twilio.Voice.V1.ArchivedCallList} archivedCalls -\n *          archivedCalls resource\n * @property {Twilio.Voice.V1.ByocTrunkList} byocTrunks - byocTrunks resource\n * @property {Twilio.Voice.V1.ConnectionPolicyList} connectionPolicies -\n *          connectionPolicies resource\n * @property {Twilio.Voice.V1.DialingPermissionsList} dialingPermissions -\n *          dialingPermissions resource\n * @property {Twilio.Voice.V1.IpRecordList} ipRecords - ipRecords resource\n * @property {Twilio.Voice.V1.SourceIpMappingList} sourceIpMappings -\n *          sourceIpMappings resource\n *\n * @param {Twilio.Voice} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._archivedCalls = undefined;\n  this._byocTrunks = undefined;\n  this._connectionPolicies = undefined;\n  this._dialingPermissions = undefined;\n  this._ipRecords = undefined;\n  this._sourceIpMappings = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'archivedCalls', {\n    get: function() {\n      this._archivedCalls = this._archivedCalls || new ArchivedCallList(this);\n      return this._archivedCalls;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'byocTrunks', {\n    get: function() {\n      this._byocTrunks = this._byocTrunks || new ByocTrunkList(this);\n      return this._byocTrunks;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'connectionPolicies', {\n    get: function() {\n      this._connectionPolicies = this._connectionPolicies || new ConnectionPolicyList(this);\n      return this._connectionPolicies;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'dialingPermissions', {\n    get: function() {\n      this._dialingPermissions = this._dialingPermissions || new DialingPermissionsList(this);\n      return this._dialingPermissions;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'ipRecords', {\n    get: function() {\n      this._ipRecords = this._ipRecords || new IpRecordList(this);\n      return this._ipRecords;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'sourceIpMappings', {\n    get: function() {\n      this._sourceIpMappings = this._sourceIpMappings || new SourceIpMappingList(this);\n      return this._sourceIpMappings;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./voice/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize voice domain\n *\n * @constructor Twilio.Voice\n *\n * @property {Twilio.Voice.V1} v1 - v1 version\n * @property {Twilio.Voice.V1.ArchivedCallList} archivedCalls -\n *          archivedCalls resource\n * @property {Twilio.Voice.V1.ByocTrunkList} byocTrunks - byocTrunks resource\n * @property {Twilio.Voice.V1.ConnectionPolicyList} connectionPolicies -\n *          connectionPolicies resource\n * @property {Twilio.Voice.V1.DialingPermissionsList} dialingPermissions -\n *          dialingPermissions resource\n * @property {Twilio.Voice.V1.IpRecordList} ipRecords - ipRecords resource\n * @property {Twilio.Voice.V1.SourceIpMappingList} sourceIpMappings -\n *          sourceIpMappings resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Voice(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://voice.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Voice.prototype, Domain.prototype);\nVoice.prototype.constructor = Voice;\n\nObject.defineProperty(Voice.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Voice.prototype,\n  'archivedCalls', {\n    get: function() {\n      return this.v1.archivedCalls;\n    }\n});\n\nObject.defineProperty(Voice.prototype,\n  'byocTrunks', {\n    get: function() {\n      return this.v1.byocTrunks;\n    }\n});\n\nObject.defineProperty(Voice.prototype,\n  'connectionPolicies', {\n    get: function() {\n      return this.v1.connectionPolicies;\n    }\n});\n\nObject.defineProperty(Voice.prototype,\n  'dialingPermissions', {\n    get: function() {\n      return this.v1.dialingPermissions;\n    }\n});\n\nObject.defineProperty(Voice.prototype,\n  'ipRecords', {\n    get: function() {\n      return this.v1.ipRecords;\n    }\n});\n\nObject.defineProperty(Voice.prototype,\n  'sourceIpMappings', {\n    get: function() {\n      return this.v1.sourceIpMappings;\n    }\n});\n\nmodule.exports = Voice;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar CommandList;\nvar CommandPage;\nvar CommandInstance;\nvar CommandContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the CommandList\n *\n * @constructor Twilio.Wireless.V1.CommandList\n *\n * @param {Twilio.Wireless.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nCommandList = function CommandList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function commands\n   * @memberof Twilio.Wireless.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Wireless.V1.CommandContext}\n   */\n  /* jshint ignore:end */\n  function CommandListInstance(sid) {\n    return CommandListInstance.get(sid);\n  }\n\n  CommandListInstance._version = version;\n  // Path Solution\n  CommandListInstance._solution = {};\n  CommandListInstance._uri = `/Commands`;\n  /* jshint ignore:start */\n  /**\n   * Streams CommandInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Wireless.V1.CommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] - The sid or unique_name of the Sim resources to read\n   * @param {command.status} [opts.status] - The status of the resources to read\n   * @param {command.direction} [opts.direction] -\n   *          Only return Commands with this direction value\n   * @param {command.transport} [opts.transport] -\n   *          Only return Commands with this transport value\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  CommandListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists CommandInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Wireless.V1.CommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] - The sid or unique_name of the Sim resources to read\n   * @param {command.status} [opts.status] - The status of the resources to read\n   * @param {command.direction} [opts.direction] -\n   *          Only return Commands with this direction value\n   * @param {command.transport} [opts.transport] -\n   *          Only return Commands with this transport value\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CommandListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of CommandInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Wireless.V1.CommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] - The sid or unique_name of the Sim resources to read\n   * @param {command.status} [opts.status] - The status of the resources to read\n   * @param {command.direction} [opts.direction] -\n   *          Only return Commands with this direction value\n   * @param {command.transport} [opts.transport] -\n   *          Only return Commands with this transport value\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CommandListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Sim': _.get(opts, 'sim'),\n      'Status': _.get(opts, 'status'),\n      'Direction': _.get(opts, 'direction'),\n      'Transport': _.get(opts, 'transport'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CommandPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of CommandInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Wireless.V1.CommandList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  CommandListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CommandPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a CommandInstance\n   *\n   * @function create\n   * @memberof Twilio.Wireless.V1.CommandList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.command -\n   *          The message body of the Command or a Base64 encoded byte string in binary mode\n   * @param {string} [opts.sim] -\n   *          The sid or unique_name of the SIM to send the Command to\n   * @param {string} [opts.callbackMethod] -\n   *          The HTTP method we use to call callback_url\n   * @param {string} [opts.callbackUrl] -\n   *          he URL we call when the Command has finished sending\n   * @param {command.command_mode} [opts.commandMode] -\n   *          The mode to use when sending the SMS message\n   * @param {string} [opts.includeSid] -\n   *          Whether to include the SID of the command in the message body\n   * @param {boolean} [opts.deliveryReceiptRequested] -\n   *          Whether to request delivery receipt from the recipient\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed CommandInstance\n   */\n  /* jshint ignore:end */\n  CommandListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['command'])) {\n      throw new Error('Required parameter \"opts[\\'command\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Command': _.get(opts, 'command'),\n      'Sim': _.get(opts, 'sim'),\n      'CallbackMethod': _.get(opts, 'callbackMethod'),\n      'CallbackUrl': _.get(opts, 'callbackUrl'),\n      'CommandMode': _.get(opts, 'commandMode'),\n      'IncludeSid': _.get(opts, 'includeSid'),\n      'DeliveryReceiptRequested': serialize.bool(_.get(opts, 'deliveryReceiptRequested'))\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new CommandInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a command\n   *\n   * @function get\n   * @memberof Twilio.Wireless.V1.CommandList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Wireless.V1.CommandContext}\n   */\n  /* jshint ignore:end */\n  CommandListInstance.get = function get(sid) {\n    return new CommandContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Wireless.V1.CommandList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  CommandListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  CommandListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return CommandListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CommandPage\n *\n * @constructor Twilio.Wireless.V1.CommandPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {CommandSolution} solution - Path solution\n *\n * @returns CommandPage\n */\n/* jshint ignore:end */\nCommandPage = function CommandPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(CommandPage.prototype, Page.prototype);\nCommandPage.prototype.constructor = CommandPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of CommandInstance\n *\n * @function getInstance\n * @memberof Twilio.Wireless.V1.CommandPage#\n *\n * @param {CommandPayload} payload - Payload response from the API\n *\n * @returns CommandInstance\n */\n/* jshint ignore:end */\nCommandPage.prototype.getInstance = function getInstance(payload) {\n  return new CommandInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.CommandPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCommandPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCommandPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CommandContext\n *\n * @constructor Twilio.Wireless.V1.CommandInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} simSid -\n *          The SID of the Sim resource that the Command was sent to or from\n * @property {string} command - The message being sent to or from the SIM\n * @property {command.command_mode} commandMode -\n *          The mode used to send the SMS message\n * @property {command.transport} transport - The type of transport used\n * @property {boolean} deliveryReceiptRequested -\n *          Whether to request a delivery receipt\n * @property {command.status} status - The status of the Command\n * @property {command.direction} direction - The direction of the Command\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated format\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {CommandPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nCommandInstance = function CommandInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.command = payload.command; // jshint ignore:line\n  this.commandMode = payload.command_mode; // jshint ignore:line\n  this.transport = payload.transport; // jshint ignore:line\n  this.deliveryReceiptRequested = payload.delivery_receipt_requested; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.direction = payload.direction; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(CommandInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new CommandContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a CommandInstance\n *\n * @function fetch\n * @memberof Twilio.Wireless.V1.CommandInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CommandInstance\n */\n/* jshint ignore:end */\nCommandInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a CommandInstance\n *\n * @function remove\n * @memberof Twilio.Wireless.V1.CommandInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CommandInstance\n */\n/* jshint ignore:end */\nCommandInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.CommandInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCommandInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nCommandInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the CommandContext\n *\n * @constructor Twilio.Wireless.V1.CommandContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nCommandContext = function CommandContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Commands/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a CommandInstance\n *\n * @function fetch\n * @memberof Twilio.Wireless.V1.CommandContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CommandInstance\n */\n/* jshint ignore:end */\nCommandContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new CommandInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a CommandInstance\n *\n * @function remove\n * @memberof Twilio.Wireless.V1.CommandContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed CommandInstance\n */\n/* jshint ignore:end */\nCommandContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.CommandContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nCommandContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nCommandContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  CommandList: CommandList,\n  CommandPage: CommandPage,\n  CommandInstance: CommandInstance,\n  CommandContext: CommandContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar RatePlanList;\nvar RatePlanPage;\nvar RatePlanInstance;\nvar RatePlanContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the RatePlanList\n *\n * @constructor Twilio.Wireless.V1.RatePlanList\n *\n * @param {Twilio.Wireless.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nRatePlanList = function RatePlanList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function ratePlans\n   * @memberof Twilio.Wireless.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Wireless.V1.RatePlanContext}\n   */\n  /* jshint ignore:end */\n  function RatePlanListInstance(sid) {\n    return RatePlanListInstance.get(sid);\n  }\n\n  RatePlanListInstance._version = version;\n  // Path Solution\n  RatePlanListInstance._solution = {};\n  RatePlanListInstance._uri = `/RatePlans`;\n  /* jshint ignore:start */\n  /**\n   * Streams RatePlanInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Wireless.V1.RatePlanList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists RatePlanInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Wireless.V1.RatePlanList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of RatePlanInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Wireless.V1.RatePlanList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RatePlanPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of RatePlanInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Wireless.V1.RatePlanList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RatePlanPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a RatePlanInstance\n   *\n   * @function create\n   * @memberof Twilio.Wireless.V1.RatePlanList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {string} [opts.friendlyName] - A string to describe the resource\n   * @param {boolean} [opts.dataEnabled] -\n   *          Whether SIMs can use GPRS/3G/4G/LTE data connectivity\n   * @param {number} [opts.dataLimit] -\n   *          The total data usage in Megabytes that the Network allows during one month on the home network\n   * @param {string} [opts.dataMetering] - The model used to meter data usage\n   * @param {boolean} [opts.messagingEnabled] -\n   *          Whether SIMs can make, send, and receive SMS using Commands\n   * @param {boolean} [opts.voiceEnabled] - Deprecated\n   * @param {boolean} [opts.nationalRoamingEnabled] -\n   *          Whether SIMs can roam on networks other than the home network in the United States\n   * @param {string|list} [opts.internationalRoaming] -\n   *          The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States\n   * @param {number} [opts.nationalRoamingDataLimit] -\n   *          The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States\n   * @param {number} [opts.internationalRoamingDataLimit] -\n   *          The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed RatePlanInstance\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'DataEnabled': serialize.bool(_.get(opts, 'dataEnabled')),\n      'DataLimit': _.get(opts, 'dataLimit'),\n      'DataMetering': _.get(opts, 'dataMetering'),\n      'MessagingEnabled': serialize.bool(_.get(opts, 'messagingEnabled')),\n      'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')),\n      'NationalRoamingEnabled': serialize.bool(_.get(opts, 'nationalRoamingEnabled')),\n      'InternationalRoaming': serialize.map(_.get(opts, 'internationalRoaming'), function(e) { return e; }),\n      'NationalRoamingDataLimit': _.get(opts, 'nationalRoamingDataLimit'),\n      'InternationalRoamingDataLimit': _.get(opts, 'internationalRoamingDataLimit')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new RatePlanInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a rate_plan\n   *\n   * @function get\n   * @memberof Twilio.Wireless.V1.RatePlanList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Wireless.V1.RatePlanContext}\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.get = function get(sid) {\n    return new RatePlanContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Wireless.V1.RatePlanList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  RatePlanListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  RatePlanListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return RatePlanListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RatePlanPage\n *\n * @constructor Twilio.Wireless.V1.RatePlanPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {RatePlanSolution} solution - Path solution\n *\n * @returns RatePlanPage\n */\n/* jshint ignore:end */\nRatePlanPage = function RatePlanPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(RatePlanPage.prototype, Page.prototype);\nRatePlanPage.prototype.constructor = RatePlanPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of RatePlanInstance\n *\n * @function getInstance\n * @memberof Twilio.Wireless.V1.RatePlanPage#\n *\n * @param {RatePlanPayload} payload - Payload response from the API\n *\n * @returns RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanPage.prototype.getInstance = function getInstance(payload) {\n  return new RatePlanInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.RatePlanPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRatePlanPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRatePlanPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RatePlanContext\n *\n * @constructor Twilio.Wireless.V1.RatePlanInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} friendlyName -\n *          The string that you assigned to describe the resource\n * @property {boolean} dataEnabled -\n *          Whether SIMs can use GPRS/3G/4G/LTE data connectivity\n * @property {string} dataMetering - The model used to meter data usage\n * @property {number} dataLimit -\n *          The total data usage in Megabytes that the Network allows during one month on the home network\n * @property {boolean} messagingEnabled -\n *          Whether SIMs can make, send, and receive SMS using Commands\n * @property {boolean} voiceEnabled -\n *          Deprecated. Whether SIMs can make and receive voice calls\n * @property {boolean} nationalRoamingEnabled -\n *          Whether SIMs can roam on networks other than the home network in the United States\n * @property {number} nationalRoamingDataLimit -\n *          The total data usage in Megabytes that the Network allows during one month on non-home networks in the United States\n * @property {string} internationalRoaming -\n *          The services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States\n * @property {number} internationalRoamingDataLimit -\n *          The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States\n * @property {Date} dateCreated -\n *          The date when the resource was created, given as GMT in ISO 8601 format\n * @property {Date} dateUpdated -\n *          The date when the resource was last updated, given as GMT in ISO 8601 format\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {RatePlanPayload} payload - The instance payload\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nRatePlanInstance = function RatePlanInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.dataEnabled = payload.data_enabled; // jshint ignore:line\n  this.dataMetering = payload.data_metering; // jshint ignore:line\n  this.dataLimit = deserialize.integer(payload.data_limit); // jshint ignore:line\n  this.messagingEnabled = payload.messaging_enabled; // jshint ignore:line\n  this.voiceEnabled = payload.voice_enabled; // jshint ignore:line\n  this.nationalRoamingEnabled = payload.national_roaming_enabled; // jshint ignore:line\n  this.nationalRoamingDataLimit = deserialize.integer(payload.national_roaming_data_limit); // jshint ignore:line\n  this.internationalRoaming = payload.international_roaming; // jshint ignore:line\n  this.internationalRoamingDataLimit = deserialize.integer(payload.international_roaming_data_limit); // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(RatePlanInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new RatePlanContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a RatePlanInstance\n *\n * @function fetch\n * @memberof Twilio.Wireless.V1.RatePlanInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a RatePlanInstance\n *\n * @function update\n * @memberof Twilio.Wireless.V1.RatePlanInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a RatePlanInstance\n *\n * @function remove\n * @memberof Twilio.Wireless.V1.RatePlanInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.RatePlanInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRatePlanInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nRatePlanInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the RatePlanContext\n *\n * @constructor Twilio.Wireless.V1.RatePlanContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nRatePlanContext = function RatePlanContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/RatePlans/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a RatePlanInstance\n *\n * @function fetch\n * @memberof Twilio.Wireless.V1.RatePlanContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RatePlanInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a RatePlanInstance\n *\n * @function update\n * @memberof Twilio.Wireless.V1.RatePlanContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.friendlyName] - A string to describe the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'FriendlyName': _.get(opts, 'friendlyName')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new RatePlanInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a RatePlanInstance\n *\n * @function remove\n * @memberof Twilio.Wireless.V1.RatePlanContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed RatePlanInstance\n */\n/* jshint ignore:end */\nRatePlanContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.RatePlanContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nRatePlanContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nRatePlanContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  RatePlanList: RatePlanList,\n  RatePlanPage: RatePlanPage,\n  RatePlanInstance: RatePlanInstance,\n  RatePlanContext: RatePlanContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DataSessionList;\nvar DataSessionPage;\nvar DataSessionInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the DataSessionList\n *\n * @constructor Twilio.Wireless.V1.SimContext.DataSessionList\n *\n * @param {Twilio.Wireless.V1} version - Version of the resource\n * @param {string} simSid -\n *          The SID of the Sim resource that the Data Session is for\n */\n/* jshint ignore:end */\nDataSessionList = function DataSessionList(version, simSid) {\n  /* jshint ignore:start */\n  /**\n   * @function dataSessions\n   * @memberof Twilio.Wireless.V1.SimContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Wireless.V1.SimContext.DataSessionContext}\n   */\n  /* jshint ignore:end */\n  function DataSessionListInstance(sid) {\n    return DataSessionListInstance.get(sid);\n  }\n\n  DataSessionListInstance._version = version;\n  // Path Solution\n  DataSessionListInstance._solution = {simSid: simSid};\n  DataSessionListInstance._uri = `/Sims/${simSid}/DataSessions`;\n  /* jshint ignore:start */\n  /**\n   * Streams DataSessionInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Wireless.V1.SimContext.DataSessionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DataSessionListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DataSessionInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Wireless.V1.SimContext.DataSessionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DataSessionListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DataSessionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Wireless.V1.SimContext.DataSessionList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DataSessionListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DataSessionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DataSessionInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Wireless.V1.SimContext.DataSessionList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DataSessionListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DataSessionPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Wireless.V1.SimContext.DataSessionList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DataSessionListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DataSessionListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DataSessionListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DataSessionPage\n *\n * @constructor Twilio.Wireless.V1.SimContext.DataSessionPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DataSessionSolution} solution - Path solution\n *\n * @returns DataSessionPage\n */\n/* jshint ignore:end */\nDataSessionPage = function DataSessionPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DataSessionPage.prototype, Page.prototype);\nDataSessionPage.prototype.constructor = DataSessionPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DataSessionInstance\n *\n * @function getInstance\n * @memberof Twilio.Wireless.V1.SimContext.DataSessionPage#\n *\n * @param {DataSessionPayload} payload - Payload response from the API\n *\n * @returns DataSessionInstance\n */\n/* jshint ignore:end */\nDataSessionPage.prototype.getInstance = function getInstance(payload) {\n  return new DataSessionInstance(this._version, payload, this._solution.simSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.SimContext.DataSessionPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDataSessionPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDataSessionPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DataSessionContext\n *\n * @constructor Twilio.Wireless.V1.SimContext.DataSessionInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} simSid -\n *          The SID of the Sim resource that the Data Session is for\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} radioLink -\n *          The generation of wireless technology that the device was using\n * @property {string} operatorMcc -\n *          The 'mobile country code' is the unique ID of the home country where the Data Session took place\n * @property {string} operatorMnc -\n *          The 'mobile network code' is the unique ID specific to the mobile operator network where the Data Session took place\n * @property {string} operatorCountry -\n *          The three letter country code representing where the device's Data Session took place\n * @property {string} operatorName -\n *          The friendly name of the mobile operator network that the SIM-connected device is attached to\n * @property {string} cellId -\n *          The unique ID of the cellular tower that the device was attached to at the moment when the Data Session was last updated\n * @property {object} cellLocationEstimate -\n *          An object with the estimated location where the device's Data Session took place\n * @property {number} packetsUploaded -\n *          The number of packets uploaded by the device between the start time and when the Data Session was last updated\n * @property {number} packetsDownloaded -\n *          The number of packets downloaded by the device between the start time and when the Data Session was last updated\n * @property {Date} lastUpdated -\n *          The date that the resource was last updated, given as GMT in ISO 8601 format\n * @property {Date} start -\n *          The date that the Data Session started, given as GMT in ISO 8601 format\n * @property {Date} end -\n *          The date that the record ended, given as GMT in ISO 8601 format\n * @property {string} imei - The unique ID of the device using the SIM to connect\n *\n * @param {V1} version - Version of the resource\n * @param {DataSessionPayload} payload - The instance payload\n * @param {sid_like} simSid -\n *          The SID of the Sim resource that the Data Session is for\n */\n/* jshint ignore:end */\nDataSessionInstance = function DataSessionInstance(version, payload, simSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.radioLink = payload.radio_link; // jshint ignore:line\n  this.operatorMcc = payload.operator_mcc; // jshint ignore:line\n  this.operatorMnc = payload.operator_mnc; // jshint ignore:line\n  this.operatorCountry = payload.operator_country; // jshint ignore:line\n  this.operatorName = payload.operator_name; // jshint ignore:line\n  this.cellId = payload.cell_id; // jshint ignore:line\n  this.cellLocationEstimate = payload.cell_location_estimate; // jshint ignore:line\n  this.packetsUploaded = deserialize.integer(payload.packets_uploaded); // jshint ignore:line\n  this.packetsDownloaded = deserialize.integer(payload.packets_downloaded); // jshint ignore:line\n  this.lastUpdated = deserialize.iso8601DateTime(payload.last_updated); // jshint ignore:line\n  this.start = deserialize.iso8601DateTime(payload.start); // jshint ignore:line\n  this.end = deserialize.iso8601DateTime(payload.end); // jshint ignore:line\n  this.imei = payload.imei; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {simSid: simSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.SimContext.DataSessionInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDataSessionInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDataSessionInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DataSessionList: DataSessionList,\n  DataSessionPage: DataSessionPage,\n  DataSessionInstance: DataSessionInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar UsageRecordList;\nvar UsageRecordPage;\nvar UsageRecordInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageRecordList\n *\n * @constructor Twilio.Wireless.V1.SimContext.UsageRecordList\n *\n * @param {Twilio.Wireless.V1} version - Version of the resource\n * @param {string} simSid -\n *          The SID of the Sim resource that this Usage Record is for\n */\n/* jshint ignore:end */\nUsageRecordList = function UsageRecordList(version, simSid) {\n  /* jshint ignore:start */\n  /**\n   * @function usageRecords\n   * @memberof Twilio.Wireless.V1.SimContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Wireless.V1.SimContext.UsageRecordContext}\n   */\n  /* jshint ignore:end */\n  function UsageRecordListInstance(sid) {\n    return UsageRecordListInstance.get(sid);\n  }\n\n  UsageRecordListInstance._version = version;\n  // Path Solution\n  UsageRecordListInstance._solution = {simSid: simSid};\n  UsageRecordListInstance._uri = `/Sims/${simSid}/UsageRecords`;\n  /* jshint ignore:start */\n  /**\n   * Streams UsageRecordInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Wireless.V1.SimContext.UsageRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.end] -\n   *          Only include usage that occurred on or before this date\n   * @param {Date} [opts.start] -\n   *          Only include usage that has occurred on or after this date\n   * @param {usage_record.granularity} [opts.granularity] -\n   *          The time-based grouping that results are aggregated by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UsageRecordInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Wireless.V1.SimContext.UsageRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.end] -\n   *          Only include usage that occurred on or before this date\n   * @param {Date} [opts.start] -\n   *          Only include usage that has occurred on or after this date\n   * @param {usage_record.granularity} [opts.granularity] -\n   *          The time-based grouping that results are aggregated by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UsageRecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Wireless.V1.SimContext.UsageRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.end] -\n   *          Only include usage that occurred on or before this date\n   * @param {Date} [opts.start] -\n   *          Only include usage that has occurred on or after this date\n   * @param {usage_record.granularity} [opts.granularity] -\n   *          The time-based grouping that results are aggregated by\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'End': serialize.iso8601DateTime(_.get(opts, 'end')),\n      'Start': serialize.iso8601DateTime(_.get(opts, 'start')),\n      'Granularity': _.get(opts, 'granularity'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsageRecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UsageRecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Wireless.V1.SimContext.UsageRecordList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsageRecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Wireless.V1.SimContext.UsageRecordList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UsageRecordListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UsageRecordListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageRecordPage\n *\n * @constructor Twilio.Wireless.V1.SimContext.UsageRecordPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UsageRecordSolution} solution - Path solution\n *\n * @returns UsageRecordPage\n */\n/* jshint ignore:end */\nUsageRecordPage = function UsageRecordPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UsageRecordPage.prototype, Page.prototype);\nUsageRecordPage.prototype.constructor = UsageRecordPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UsageRecordInstance\n *\n * @function getInstance\n * @memberof Twilio.Wireless.V1.SimContext.UsageRecordPage#\n *\n * @param {UsageRecordPayload} payload - Payload response from the API\n *\n * @returns UsageRecordInstance\n */\n/* jshint ignore:end */\nUsageRecordPage.prototype.getInstance = function getInstance(payload) {\n  return new UsageRecordInstance(this._version, payload, this._solution.simSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.SimContext.UsageRecordPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsageRecordPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsageRecordPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageRecordContext\n *\n * @constructor Twilio.Wireless.V1.SimContext.UsageRecordInstance\n *\n * @property {string} simSid -\n *          The SID of the Sim resource that this Usage Record is for\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} period - The time period for which the usage is reported\n * @property {object} commands -\n *          An object that describes the SIM's usage of Commands during the specified period\n * @property {object} data -\n *          An object that describes the SIM's data usage during the specified period\n *\n * @param {V1} version - Version of the resource\n * @param {UsageRecordPayload} payload - The instance payload\n * @param {sid_like} simSid -\n *          The SID of the Sim resource that this Usage Record is for\n */\n/* jshint ignore:end */\nUsageRecordInstance = function UsageRecordInstance(version, payload, simSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.period = payload.period; // jshint ignore:line\n  this.commands = payload.commands; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {simSid: simSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.SimContext.UsageRecordInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsageRecordInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsageRecordInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UsageRecordList: UsageRecordList,\n  UsageRecordPage: UsageRecordPage,\n  UsageRecordInstance: UsageRecordInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DataSessionList = require('./sim/dataSession').DataSessionList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar UsageRecordList = require('./sim/usageRecord').UsageRecordList;\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SimList;\nvar SimPage;\nvar SimInstance;\nvar SimContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SimList\n *\n * @constructor Twilio.Wireless.V1.SimList\n *\n * @param {Twilio.Wireless.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSimList = function SimList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function sims\n   * @memberof Twilio.Wireless.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Wireless.V1.SimContext}\n   */\n  /* jshint ignore:end */\n  function SimListInstance(sid) {\n    return SimListInstance.get(sid);\n  }\n\n  SimListInstance._version = version;\n  // Path Solution\n  SimListInstance._solution = {};\n  SimListInstance._uri = `/Sims`;\n  /* jshint ignore:start */\n  /**\n   * Streams SimInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Wireless.V1.SimList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sim.status} [opts.status] - Only return Sim resources with this status\n   * @param {string} [opts.iccid] - Only return Sim resources with this ICCID\n   * @param {string} [opts.ratePlan] -\n   *          Only return Sim resources assigned to this RatePlan resource\n   * @param {string} [opts.eId] - Deprecated\n   * @param {string} [opts.simRegistrationCode] -\n   *          Only return Sim resources with this registration code\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SimListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SimInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Wireless.V1.SimList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sim.status} [opts.status] - Only return Sim resources with this status\n   * @param {string} [opts.iccid] - Only return Sim resources with this ICCID\n   * @param {string} [opts.ratePlan] -\n   *          Only return Sim resources assigned to this RatePlan resource\n   * @param {string} [opts.eId] - Deprecated\n   * @param {string} [opts.simRegistrationCode] -\n   *          Only return Sim resources with this registration code\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SimListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SimInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Wireless.V1.SimList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sim.status} [opts.status] - Only return Sim resources with this status\n   * @param {string} [opts.iccid] - Only return Sim resources with this ICCID\n   * @param {string} [opts.ratePlan] -\n   *          Only return Sim resources assigned to this RatePlan resource\n   * @param {string} [opts.eId] - Deprecated\n   * @param {string} [opts.simRegistrationCode] -\n   *          Only return Sim resources with this registration code\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SimListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'Iccid': _.get(opts, 'iccid'),\n      'RatePlan': _.get(opts, 'ratePlan'),\n      'EId': _.get(opts, 'eId'),\n      'SimRegistrationCode': _.get(opts, 'simRegistrationCode'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SimPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SimInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Wireless.V1.SimList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SimListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SimPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sim\n   *\n   * @function get\n   * @memberof Twilio.Wireless.V1.SimList#\n   *\n   * @param {string} sid - The SID of the Sim resource to fetch\n   *\n   * @returns {Twilio.Wireless.V1.SimContext}\n   */\n  /* jshint ignore:end */\n  SimListInstance.get = function get(sid) {\n    return new SimContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Wireless.V1.SimList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SimListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SimListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SimListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SimPage\n *\n * @constructor Twilio.Wireless.V1.SimPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SimSolution} solution - Path solution\n *\n * @returns SimPage\n */\n/* jshint ignore:end */\nSimPage = function SimPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SimPage.prototype, Page.prototype);\nSimPage.prototype.constructor = SimPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SimInstance\n *\n * @function getInstance\n * @memberof Twilio.Wireless.V1.SimPage#\n *\n * @param {SimPayload} payload - Payload response from the API\n *\n * @returns SimInstance\n */\n/* jshint ignore:end */\nSimPage.prototype.getInstance = function getInstance(payload) {\n  return new SimInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.SimPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSimPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSimPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SimContext\n *\n * @constructor Twilio.Wireless.V1.SimInstance\n *\n * @property {string} sid - The unique string that identifies the Sim resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid -\n *          The SID of the Account to which the Sim resource belongs\n * @property {string} ratePlanSid -\n *          The SID of the RatePlan resource to which the Sim resource is assigned.\n * @property {string} friendlyName -\n *          The string that you assigned to describe the Sim resource\n * @property {string} iccid - The ICCID associated with the SIM\n * @property {string} eId - Deprecated\n * @property {sim.status} status - The status of the Sim resource\n * @property {sim.reset_status} resetStatus -\n *          The connectivity reset status of the SIM\n * @property {string} commandsCallbackUrl -\n *          The URL we call when the SIM originates a machine-to-machine Command\n * @property {string} commandsCallbackMethod -\n *          The HTTP method we use to call commands_callback_url\n * @property {string} smsFallbackMethod - Deprecated\n * @property {string} smsFallbackUrl - Deprecated\n * @property {string} smsMethod - Deprecated\n * @property {string} smsUrl - Deprecated\n * @property {string} voiceFallbackMethod -\n *          Deprecated. The HTTP method we use to call voice_fallback_url\n * @property {string} voiceFallbackUrl -\n *          Deprecated. The URL we call when an error occurs while retrieving or executing the TwiML requested from voice_url\n * @property {string} voiceMethod -\n *          Deprecated. The HTTP method we use to call voice_url\n * @property {string} voiceUrl -\n *          Deprecated. The URL we call when the SIM-connected device makes a voice call\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the Sim resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The URLs of related subresources\n * @property {string} ipAddress - Deprecated\n *\n * @param {V1} version - Version of the resource\n * @param {SimPayload} payload - The instance payload\n * @param {sid_like} sid - The SID of the Sim resource to fetch\n */\n/* jshint ignore:end */\nSimInstance = function SimInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.ratePlanSid = payload.rate_plan_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.iccid = payload.iccid; // jshint ignore:line\n  this.eId = payload.e_id; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.resetStatus = payload.reset_status; // jshint ignore:line\n  this.commandsCallbackUrl = payload.commands_callback_url; // jshint ignore:line\n  this.commandsCallbackMethod = payload.commands_callback_method; // jshint ignore:line\n  this.smsFallbackMethod = payload.sms_fallback_method; // jshint ignore:line\n  this.smsFallbackUrl = payload.sms_fallback_url; // jshint ignore:line\n  this.smsMethod = payload.sms_method; // jshint ignore:line\n  this.smsUrl = payload.sms_url; // jshint ignore:line\n  this.voiceFallbackMethod = payload.voice_fallback_method; // jshint ignore:line\n  this.voiceFallbackUrl = payload.voice_fallback_url; // jshint ignore:line\n  this.voiceMethod = payload.voice_method; // jshint ignore:line\n  this.voiceUrl = payload.voice_url; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n  this.ipAddress = payload.ip_address; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SimInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SimContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SimInstance\n *\n * @function fetch\n * @memberof Twilio.Wireless.V1.SimInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SimInstance\n *\n * @function update\n * @memberof Twilio.Wireless.V1.SimInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.callbackMethod] -\n *          The HTTP method we should use to call callback_url\n * @param {string} [opts.callbackUrl] -\n *          The URL we should call when the Sim resource has finished updating\n * @param {string} [opts.friendlyName] - A string to describe the Sim resource\n * @param {string} [opts.ratePlan] -\n *          The SID or unique name of the RatePlan resource to which the Sim resource should be assigned\n * @param {sim.status} [opts.status] - The new status of the Sim resource\n * @param {string} [opts.commandsCallbackMethod] -\n *          The HTTP method we should use to call commands_callback_url\n * @param {string} [opts.commandsCallbackUrl] -\n *          The URL we should call when the SIM sends a Command\n * @param {string} [opts.smsFallbackMethod] -\n *          The HTTP method we should use to call sms_fallback_url\n * @param {string} [opts.smsFallbackUrl] -\n *          The URL we should call when an error occurs while retrieving or executing the TwiML requested from sms_url\n * @param {string} [opts.smsMethod] - The HTTP method we should use to call sms_url\n * @param {string} [opts.smsUrl] -\n *          The URL we should call when the SIM-connected device sends an SMS message that is not a Command\n * @param {string} [opts.voiceFallbackMethod] - Deprecated\n * @param {string} [opts.voiceFallbackUrl] - Deprecated\n * @param {string} [opts.voiceMethod] - Deprecated\n * @param {string} [opts.voiceUrl] - Deprecated\n * @param {sim.reset_status} [opts.resetStatus] -\n *          Initiate a connectivity reset on a SIM\n * @param {string} [opts.accountSid] -\n *          The SID of the Account to which the Sim resource should belong\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a SimInstance\n *\n * @function remove\n * @memberof Twilio.Wireless.V1.SimInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the usageRecords\n *\n * @function usageRecords\n * @memberof Twilio.Wireless.V1.SimInstance#\n *\n * @returns {Twilio.Wireless.V1.SimContext.UsageRecordList}\n */\n/* jshint ignore:end */\nSimInstance.prototype.usageRecords = function usageRecords() {\n  return this._proxy.usageRecords;\n};\n\n/* jshint ignore:start */\n/**\n * Access the dataSessions\n *\n * @function dataSessions\n * @memberof Twilio.Wireless.V1.SimInstance#\n *\n * @returns {Twilio.Wireless.V1.SimContext.DataSessionList}\n */\n/* jshint ignore:end */\nSimInstance.prototype.dataSessions = function dataSessions() {\n  return this._proxy.dataSessions;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.SimInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSimInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSimInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SimContext\n *\n * @constructor Twilio.Wireless.V1.SimContext\n *\n * @property {Twilio.Wireless.V1.SimContext.UsageRecordList} usageRecords -\n *          usageRecords resource\n * @property {Twilio.Wireless.V1.SimContext.DataSessionList} dataSessions -\n *          dataSessions resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID of the Sim resource to fetch\n */\n/* jshint ignore:end */\nSimContext = function SimContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Sims/${sid}`;\n\n  // Dependents\n  this._usageRecords = undefined;\n  this._dataSessions = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SimInstance\n *\n * @function fetch\n * @memberof Twilio.Wireless.V1.SimContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SimInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SimInstance\n *\n * @function update\n * @memberof Twilio.Wireless.V1.SimContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.callbackMethod] -\n *          The HTTP method we should use to call callback_url\n * @param {string} [opts.callbackUrl] -\n *          The URL we should call when the Sim resource has finished updating\n * @param {string} [opts.friendlyName] - A string to describe the Sim resource\n * @param {string} [opts.ratePlan] -\n *          The SID or unique name of the RatePlan resource to which the Sim resource should be assigned\n * @param {sim.status} [opts.status] - The new status of the Sim resource\n * @param {string} [opts.commandsCallbackMethod] -\n *          The HTTP method we should use to call commands_callback_url\n * @param {string} [opts.commandsCallbackUrl] -\n *          The URL we should call when the SIM sends a Command\n * @param {string} [opts.smsFallbackMethod] -\n *          The HTTP method we should use to call sms_fallback_url\n * @param {string} [opts.smsFallbackUrl] -\n *          The URL we should call when an error occurs while retrieving or executing the TwiML requested from sms_url\n * @param {string} [opts.smsMethod] - The HTTP method we should use to call sms_url\n * @param {string} [opts.smsUrl] -\n *          The URL we should call when the SIM-connected device sends an SMS message that is not a Command\n * @param {string} [opts.voiceFallbackMethod] - Deprecated\n * @param {string} [opts.voiceFallbackUrl] - Deprecated\n * @param {string} [opts.voiceMethod] - Deprecated\n * @param {string} [opts.voiceUrl] - Deprecated\n * @param {sim.reset_status} [opts.resetStatus] -\n *          Initiate a connectivity reset on a SIM\n * @param {string} [opts.accountSid] -\n *          The SID of the Account to which the Sim resource should belong\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'CallbackMethod': _.get(opts, 'callbackMethod'),\n    'CallbackUrl': _.get(opts, 'callbackUrl'),\n    'FriendlyName': _.get(opts, 'friendlyName'),\n    'RatePlan': _.get(opts, 'ratePlan'),\n    'Status': _.get(opts, 'status'),\n    'CommandsCallbackMethod': _.get(opts, 'commandsCallbackMethod'),\n    'CommandsCallbackUrl': _.get(opts, 'commandsCallbackUrl'),\n    'SmsFallbackMethod': _.get(opts, 'smsFallbackMethod'),\n    'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'),\n    'SmsMethod': _.get(opts, 'smsMethod'),\n    'SmsUrl': _.get(opts, 'smsUrl'),\n    'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'),\n    'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'),\n    'VoiceMethod': _.get(opts, 'voiceMethod'),\n    'VoiceUrl': _.get(opts, 'voiceUrl'),\n    'ResetStatus': _.get(opts, 'resetStatus'),\n    'AccountSid': _.get(opts, 'accountSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SimInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a SimInstance\n *\n * @function remove\n * @memberof Twilio.Wireless.V1.SimContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SimContext.prototype,\n  'usageRecords', {\n    get: function() {\n      if (!this._usageRecords) {\n        this._usageRecords = new UsageRecordList(this._version, this._solution.sid);\n      }\n      return this._usageRecords;\n    }\n});\n\nObject.defineProperty(SimContext.prototype,\n  'dataSessions', {\n    get: function() {\n      if (!this._dataSessions) {\n        this._dataSessions = new DataSessionList(this._version, this._solution.sid);\n      }\n      return this._dataSessions;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.SimContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSimContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSimContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SimList: SimList,\n  SimPage: SimPage,\n  SimInstance: SimInstance,\n  SimContext: SimContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar UsageRecordList;\nvar UsageRecordPage;\nvar UsageRecordInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageRecordList\n *\n * @constructor Twilio.Wireless.V1.UsageRecordList\n *\n * @param {Twilio.Wireless.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nUsageRecordList = function UsageRecordList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function usageRecords\n   * @memberof Twilio.Wireless.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Wireless.V1.UsageRecordContext}\n   */\n  /* jshint ignore:end */\n  function UsageRecordListInstance(sid) {\n    return UsageRecordListInstance.get(sid);\n  }\n\n  UsageRecordListInstance._version = version;\n  // Path Solution\n  UsageRecordListInstance._solution = {};\n  UsageRecordListInstance._uri = `/UsageRecords`;\n  /* jshint ignore:start */\n  /**\n   * Streams UsageRecordInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Wireless.V1.UsageRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.end] -\n   *          Only include usage that has occurred on or before this date\n   * @param {Date} [opts.start] -\n   *          Only include usage that has occurred on or after this date\n   * @param {usage_record.granularity} [opts.granularity] -\n   *          The time-based grouping that results are aggregated by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UsageRecordInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Wireless.V1.UsageRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.end] -\n   *          Only include usage that has occurred on or before this date\n   * @param {Date} [opts.start] -\n   *          Only include usage that has occurred on or after this date\n   * @param {usage_record.granularity} [opts.granularity] -\n   *          The time-based grouping that results are aggregated by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UsageRecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Wireless.V1.UsageRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {Date} [opts.end] -\n   *          Only include usage that has occurred on or before this date\n   * @param {Date} [opts.start] -\n   *          Only include usage that has occurred on or after this date\n   * @param {usage_record.granularity} [opts.granularity] -\n   *          The time-based grouping that results are aggregated by\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'End': serialize.iso8601DateTime(_.get(opts, 'end')),\n      'Start': serialize.iso8601DateTime(_.get(opts, 'start')),\n      'Granularity': _.get(opts, 'granularity'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsageRecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UsageRecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Wireless.V1.UsageRecordList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsageRecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Wireless.V1.UsageRecordList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UsageRecordListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UsageRecordListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageRecordPage\n *\n * @constructor Twilio.Wireless.V1.UsageRecordPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UsageRecordSolution} solution - Path solution\n *\n * @returns UsageRecordPage\n */\n/* jshint ignore:end */\nUsageRecordPage = function UsageRecordPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UsageRecordPage.prototype, Page.prototype);\nUsageRecordPage.prototype.constructor = UsageRecordPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UsageRecordInstance\n *\n * @function getInstance\n * @memberof Twilio.Wireless.V1.UsageRecordPage#\n *\n * @param {UsageRecordPayload} payload - Payload response from the API\n *\n * @returns UsageRecordInstance\n */\n/* jshint ignore:end */\nUsageRecordPage.prototype.getInstance = function getInstance(payload) {\n  return new UsageRecordInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.UsageRecordPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsageRecordPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsageRecordPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageRecordContext\n *\n * @constructor Twilio.Wireless.V1.UsageRecordInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {object} period - The time period for which usage is reported\n * @property {object} commands -\n *          An object that describes the aggregated Commands usage for all SIMs during the specified period\n * @property {object} data -\n *          An object that describes the aggregated Data usage for all SIMs over the period\n *\n * @param {V1} version - Version of the resource\n * @param {UsageRecordPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nUsageRecordInstance = function UsageRecordInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.period = payload.period; // jshint ignore:line\n  this.commands = payload.commands; // jshint ignore:line\n  this.data = payload.data; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Wireless.V1.UsageRecordInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsageRecordInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsageRecordInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UsageRecordList: UsageRecordList,\n  UsageRecordPage: UsageRecordPage,\n  UsageRecordInstance: UsageRecordInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar CommandList = require('./v1/command').CommandList;\nvar RatePlanList = require('./v1/ratePlan').RatePlanList;\nvar SimList = require('./v1/sim').SimList;\nvar UsageRecordList = require('./v1/usageRecord').UsageRecordList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Wireless\n *\n * @constructor Twilio.Wireless.V1\n *\n * @property {Twilio.Wireless.V1.UsageRecordList} usageRecords -\n *          usageRecords resource\n * @property {Twilio.Wireless.V1.CommandList} commands - commands resource\n * @property {Twilio.Wireless.V1.RatePlanList} ratePlans - ratePlans resource\n * @property {Twilio.Wireless.V1.SimList} sims - sims resource\n *\n * @param {Twilio.Wireless} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._usageRecords = undefined;\n  this._commands = undefined;\n  this._ratePlans = undefined;\n  this._sims = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'usageRecords', {\n    get: function() {\n      this._usageRecords = this._usageRecords || new UsageRecordList(this);\n      return this._usageRecords;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'commands', {\n    get: function() {\n      this._commands = this._commands || new CommandList(this);\n      return this._commands;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'ratePlans', {\n    get: function() {\n      this._ratePlans = this._ratePlans || new RatePlanList(this);\n      return this._ratePlans;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'sims', {\n    get: function() {\n      this._sims = this._sims || new SimList(this);\n      return this._sims;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./wireless/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize wireless domain\n *\n * @constructor Twilio.Wireless\n *\n * @property {Twilio.Wireless.V1} v1 - v1 version\n * @property {Twilio.Wireless.V1.UsageRecordList} usageRecords -\n *          usageRecords resource\n * @property {Twilio.Wireless.V1.CommandList} commands - commands resource\n * @property {Twilio.Wireless.V1.RatePlanList} ratePlans - ratePlans resource\n * @property {Twilio.Wireless.V1.SimList} sims - sims resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Wireless(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://wireless.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Wireless.prototype, Domain.prototype);\nWireless.prototype.constructor = Wireless;\n\nObject.defineProperty(Wireless.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Wireless.prototype,\n  'usageRecords', {\n    get: function() {\n      return this.v1.usageRecords;\n    }\n});\n\nObject.defineProperty(Wireless.prototype,\n  'commands', {\n    get: function() {\n      return this.v1.commands;\n    }\n});\n\nObject.defineProperty(Wireless.prototype,\n  'ratePlans', {\n    get: function() {\n      return this.v1.ratePlans;\n    }\n});\n\nObject.defineProperty(Wireless.prototype,\n  'sims', {\n    get: function() {\n      return this.v1.sims;\n    }\n});\n\nmodule.exports = Wireless;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar EsimProfileList;\nvar EsimProfilePage;\nvar EsimProfileInstance;\nvar EsimProfileContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the EsimProfileList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.EsimProfileList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nEsimProfileList = function EsimProfileList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function esimProfiles\n   * @memberof Twilio.Supersim.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.EsimProfileContext}\n   */\n  /* jshint ignore:end */\n  function EsimProfileListInstance(sid) {\n    return EsimProfileListInstance.get(sid);\n  }\n\n  EsimProfileListInstance._version = version;\n  // Path Solution\n  EsimProfileListInstance._solution = {};\n  EsimProfileListInstance._uri = `/ESimProfiles`;\n  /* jshint ignore:start */\n  /**\n   * create a EsimProfileInstance\n   *\n   * @function create\n   * @memberof Twilio.Supersim.V1.EsimProfileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.callbackUrl] -\n   *          The URL we should call after we have sent when the status of the eSIM Profile changes\n   * @param {string} [opts.callbackMethod] -\n   *          The HTTP method we should use to call callback_url\n   * @param {string} [opts.eid] -\n   *          Identifier of the eUICC that will claim the eSIM Profile\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed EsimProfileInstance\n   */\n  /* jshint ignore:end */\n  EsimProfileListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'CallbackUrl': _.get(opts, 'callbackUrl'),\n      'CallbackMethod': _.get(opts, 'callbackMethod'),\n      'Eid': _.get(opts, 'eid')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EsimProfileInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams EsimProfileInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.EsimProfileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.eid] -\n   *          List the eSIM Profiles that have been associated with an EId\n   * @param {string} [opts.simSid] -\n   *          Find the eSIM Profile resource related to a Sim resource by providing the SIM SID\n   * @param {esim_profile.status} [opts.status] -\n   *          List the eSIM Profiles that are in a given status\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  EsimProfileListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists EsimProfileInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.EsimProfileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.eid] -\n   *          List the eSIM Profiles that have been associated with an EId\n   * @param {string} [opts.simSid] -\n   *          Find the eSIM Profile resource related to a Sim resource by providing the SIM SID\n   * @param {esim_profile.status} [opts.status] -\n   *          List the eSIM Profiles that are in a given status\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EsimProfileListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of EsimProfileInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.EsimProfileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.eid] -\n   *          List the eSIM Profiles that have been associated with an EId\n   * @param {string} [opts.simSid] -\n   *          Find the eSIM Profile resource related to a Sim resource by providing the SIM SID\n   * @param {esim_profile.status} [opts.status] -\n   *          List the eSIM Profiles that are in a given status\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EsimProfileListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Eid': _.get(opts, 'eid'),\n      'SimSid': _.get(opts, 'simSid'),\n      'Status': _.get(opts, 'status'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EsimProfilePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of EsimProfileInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.EsimProfileList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  EsimProfileListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new EsimProfilePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a esim_profile\n   *\n   * @function get\n   * @memberof Twilio.Supersim.V1.EsimProfileList#\n   *\n   * @param {string} sid - The SID of the eSIM Profile resource to fetch\n   *\n   * @returns {Twilio.Supersim.V1.EsimProfileContext}\n   */\n  /* jshint ignore:end */\n  EsimProfileListInstance.get = function get(sid) {\n    return new EsimProfileContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.EsimProfileList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  EsimProfileListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  EsimProfileListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return EsimProfileListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EsimProfilePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.EsimProfilePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {EsimProfileSolution} solution - Path solution\n *\n * @returns EsimProfilePage\n */\n/* jshint ignore:end */\nEsimProfilePage = function EsimProfilePage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(EsimProfilePage.prototype, Page.prototype);\nEsimProfilePage.prototype.constructor = EsimProfilePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of EsimProfileInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.EsimProfilePage#\n *\n * @param {EsimProfilePayload} payload - Payload response from the API\n *\n * @returns EsimProfileInstance\n */\n/* jshint ignore:end */\nEsimProfilePage.prototype.getInstance = function getInstance(payload) {\n  return new EsimProfileInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.EsimProfilePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEsimProfilePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEsimProfilePage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EsimProfileContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.EsimProfileInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid -\n *          The SID of the Account to which the eSIM Profile resource belongs\n * @property {string} iccid - The ICCID associated with the Sim resource\n * @property {string} simSid -\n *          The SID of the Sim resource that this eSIM Profile controls\n * @property {esim_profile.status} status - The status of the eSIM Profile\n * @property {string} eid - Identifier of the eUICC that can claim the eSIM Profile\n * @property {string} smdpPlusAddress -\n *          Address of the SM-DP+ server from which the Profile will be downloaded\n * @property {string} errorCode -\n *          Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in `failed` state\n * @property {string} errorMessage -\n *          Error message describing the failure if the download of the SIM Profile failed and the eSIM Profile is in `failed` state\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the eSIM Profile resource\n *\n * @param {V1} version - Version of the resource\n * @param {EsimProfilePayload} payload - The instance payload\n * @param {sid_like} sid - The SID of the eSIM Profile resource to fetch\n */\n/* jshint ignore:end */\nEsimProfileInstance = function EsimProfileInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.iccid = payload.iccid; // jshint ignore:line\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.eid = payload.eid; // jshint ignore:line\n  this.smdpPlusAddress = payload.smdp_plus_address; // jshint ignore:line\n  this.errorCode = payload.error_code; // jshint ignore:line\n  this.errorMessage = payload.error_message; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(EsimProfileInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new EsimProfileContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a EsimProfileInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.EsimProfileInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EsimProfileInstance\n */\n/* jshint ignore:end */\nEsimProfileInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.EsimProfileInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEsimProfileInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nEsimProfileInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the EsimProfileContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.EsimProfileContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID of the eSIM Profile resource to fetch\n */\n/* jshint ignore:end */\nEsimProfileContext = function EsimProfileContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/ESimProfiles/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a EsimProfileInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.EsimProfileContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed EsimProfileInstance\n */\n/* jshint ignore:end */\nEsimProfileContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new EsimProfileInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.EsimProfileContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nEsimProfileContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nEsimProfileContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  EsimProfileList: EsimProfileList,\n  EsimProfilePage: EsimProfilePage,\n  EsimProfileInstance: EsimProfileInstance,\n  EsimProfileContext: EsimProfileContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar FleetList;\nvar FleetPage;\nvar FleetInstance;\nvar FleetContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the FleetList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.FleetList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nFleetList = function FleetList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function fleets\n   * @memberof Twilio.Supersim.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.FleetContext}\n   */\n  /* jshint ignore:end */\n  function FleetListInstance(sid) {\n    return FleetListInstance.get(sid);\n  }\n\n  FleetListInstance._version = version;\n  // Path Solution\n  FleetListInstance._solution = {};\n  FleetListInstance._uri = `/Fleets`;\n  /* jshint ignore:start */\n  /**\n   * create a FleetInstance\n   *\n   * @function create\n   * @memberof Twilio.Supersim.V1.FleetList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.networkAccessProfile -\n   *          The SID or unique name of the Network Access Profile of the Fleet\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {boolean} [opts.dataEnabled] -\n   *          Defines whether SIMs in the Fleet are capable of using data connectivity\n   * @param {number} [opts.dataLimit] -\n   *          The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume\n   * @param {string} [opts.ipCommandsUrl] -\n   *          The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device\n   * @param {string} [opts.ipCommandsMethod] -\n   *          A string representing the HTTP method to use when making a request to `ip_commands_url`\n   * @param {boolean} [opts.smsCommandsEnabled] -\n   *          Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands\n   * @param {string} [opts.smsCommandsUrl] -\n   *          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 SMS Commands number\n   * @param {string} [opts.smsCommandsMethod] -\n   *          A string representing the HTTP method to use when making a request to `sms_commands_url`\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed FleetInstance\n   */\n  /* jshint ignore:end */\n  FleetListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['networkAccessProfile'])) {\n      throw new Error('Required parameter \"opts[\\'networkAccessProfile\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'NetworkAccessProfile': _.get(opts, 'networkAccessProfile'),\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'DataEnabled': serialize.bool(_.get(opts, 'dataEnabled')),\n      'DataLimit': _.get(opts, 'dataLimit'),\n      'IpCommandsUrl': _.get(opts, 'ipCommandsUrl'),\n      'IpCommandsMethod': _.get(opts, 'ipCommandsMethod'),\n      'SmsCommandsEnabled': serialize.bool(_.get(opts, 'smsCommandsEnabled')),\n      'SmsCommandsUrl': _.get(opts, 'smsCommandsUrl'),\n      'SmsCommandsMethod': _.get(opts, 'smsCommandsMethod')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FleetInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams FleetInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.FleetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.networkAccessProfile] -\n   *          The SID or unique name of the Network Access Profile of the Fleet\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  FleetListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists FleetInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.FleetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.networkAccessProfile] -\n   *          The SID or unique name of the Network Access Profile of the Fleet\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FleetListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of FleetInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.FleetList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.networkAccessProfile] -\n   *          The SID or unique name of the Network Access Profile of the Fleet\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FleetListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'NetworkAccessProfile': _.get(opts, 'networkAccessProfile'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FleetPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of FleetInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.FleetList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  FleetListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new FleetPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a fleet\n   *\n   * @function get\n   * @memberof Twilio.Supersim.V1.FleetList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Supersim.V1.FleetContext}\n   */\n  /* jshint ignore:end */\n  FleetListInstance.get = function get(sid) {\n    return new FleetContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.FleetList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  FleetListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  FleetListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return FleetListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FleetPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.FleetPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {FleetSolution} solution - Path solution\n *\n * @returns FleetPage\n */\n/* jshint ignore:end */\nFleetPage = function FleetPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(FleetPage.prototype, Page.prototype);\nFleetPage.prototype.constructor = FleetPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of FleetInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.FleetPage#\n *\n * @param {FleetPayload} payload - Payload response from the API\n *\n * @returns FleetInstance\n */\n/* jshint ignore:end */\nFleetPage.prototype.getInstance = function getInstance(payload) {\n  return new FleetInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.FleetPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFleetPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFleetPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FleetContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.FleetInstance\n *\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Fleet resource\n * @property {boolean} dataEnabled -\n *          Defines whether SIMs in the Fleet are capable of using data connectivity\n * @property {number} dataLimit -\n *          The total data usage (download and upload combined) in Megabytes that each Sim resource assigned to the Fleet resource can consume\n * @property {fleet.data_metering} dataMetering -\n *          The model by which a SIM is metered and billed\n * @property {boolean} smsCommandsEnabled -\n *          Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands\n * @property {string} smsCommandsUrl -\n *          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 SMS Commands number\n * @property {string} smsCommandsMethod -\n *          A string representing the HTTP method to use when making a request to `sms_commands_url`\n * @property {string} networkAccessProfileSid -\n *          The SID of the Network Access Profile of the Fleet\n * @property {string} ipCommandsUrl -\n *          The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device\n * @property {string} ipCommandsMethod -\n *          A string representing the HTTP method to use when making a request to `ip_commands_url`\n *\n * @param {V1} version - Version of the resource\n * @param {FleetPayload} payload - The instance payload\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFleetInstance = function FleetInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.dataEnabled = payload.data_enabled; // jshint ignore:line\n  this.dataLimit = deserialize.integer(payload.data_limit); // jshint ignore:line\n  this.dataMetering = payload.data_metering; // jshint ignore:line\n  this.smsCommandsEnabled = payload.sms_commands_enabled; // jshint ignore:line\n  this.smsCommandsUrl = payload.sms_commands_url; // jshint ignore:line\n  this.smsCommandsMethod = payload.sms_commands_method; // jshint ignore:line\n  this.networkAccessProfileSid = payload.network_access_profile_sid; // jshint ignore:line\n  this.ipCommandsUrl = payload.ip_commands_url; // jshint ignore:line\n  this.ipCommandsMethod = payload.ip_commands_method; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(FleetInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new FleetContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a FleetInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.FleetInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a FleetInstance\n *\n * @function update\n * @memberof Twilio.Supersim.V1.FleetInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.networkAccessProfile] -\n *          The SID or unique name of the Network Access Profile of the Fleet\n * @param {string} [opts.ipCommandsUrl] -\n *          The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device\n * @param {string} [opts.ipCommandsMethod] -\n *          A string representing the HTTP method to use when making a request to `ip_commands_url`\n * @param {string} [opts.smsCommandsUrl] -\n *          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 SMS Commands number\n * @param {string} [opts.smsCommandsMethod] -\n *          A string representing the HTTP method to use when making a request to `sms_commands_url`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.FleetInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFleetInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nFleetInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the FleetContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.FleetContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nFleetContext = function FleetContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Fleets/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a FleetInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.FleetContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FleetInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a FleetInstance\n *\n * @function update\n * @memberof Twilio.Supersim.V1.FleetContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {string} [opts.networkAccessProfile] -\n *          The SID or unique name of the Network Access Profile of the Fleet\n * @param {string} [opts.ipCommandsUrl] -\n *          The URL that will receive a webhook when a Super SIM in the Fleet is used to send an IP Command from your device\n * @param {string} [opts.ipCommandsMethod] -\n *          A string representing the HTTP method to use when making a request to `ip_commands_url`\n * @param {string} [opts.smsCommandsUrl] -\n *          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 SMS Commands number\n * @param {string} [opts.smsCommandsMethod] -\n *          A string representing the HTTP method to use when making a request to `sms_commands_url`\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed FleetInstance\n */\n/* jshint ignore:end */\nFleetContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'NetworkAccessProfile': _.get(opts, 'networkAccessProfile'),\n    'IpCommandsUrl': _.get(opts, 'ipCommandsUrl'),\n    'IpCommandsMethod': _.get(opts, 'ipCommandsMethod'),\n    'SmsCommandsUrl': _.get(opts, 'smsCommandsUrl'),\n    'SmsCommandsMethod': _.get(opts, 'smsCommandsMethod')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new FleetInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.FleetContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nFleetContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nFleetContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  FleetList: FleetList,\n  FleetPage: FleetPage,\n  FleetInstance: FleetInstance,\n  FleetContext: FleetContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar IpCommandList;\nvar IpCommandPage;\nvar IpCommandInstance;\nvar IpCommandContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the IpCommandList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.IpCommandList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nIpCommandList = function IpCommandList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function ipCommands\n   * @memberof Twilio.Supersim.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.IpCommandContext}\n   */\n  /* jshint ignore:end */\n  function IpCommandListInstance(sid) {\n    return IpCommandListInstance.get(sid);\n  }\n\n  IpCommandListInstance._version = version;\n  // Path Solution\n  IpCommandListInstance._solution = {};\n  IpCommandListInstance._uri = `/IpCommands`;\n  /* jshint ignore:start */\n  /**\n   * create a IpCommandInstance\n   *\n   * @function create\n   * @memberof Twilio.Supersim.V1.IpCommandList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.sim -\n   *          The sid or unique_name of the Super SIM to send the IP Command to\n   * @param {string} opts.payload - The payload to be delivered to the device\n   * @param {number} opts.devicePort -\n   *          The device port to which the IP Command will be sent\n   * @param {ip_command.payload_type} [opts.payloadType] -\n   *          Indicates how the payload is encoded\n   * @param {string} [opts.callbackUrl] -\n   *          The URL we should call after we have sent the IP Command\n   * @param {string} [opts.callbackMethod] -\n   *          The HTTP method we should use to call callback_url\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed IpCommandInstance\n   */\n  /* jshint ignore:end */\n  IpCommandListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['sim'])) {\n      throw new Error('Required parameter \"opts[\\'sim\\']\" missing.');\n    }\n    if (_.isUndefined(opts['payload'])) {\n      throw new Error('Required parameter \"opts[\\'payload\\']\" missing.');\n    }\n    if (_.isUndefined(opts['devicePort'])) {\n      throw new Error('Required parameter \"opts[\\'devicePort\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Sim': _.get(opts, 'sim'),\n      'Payload': _.get(opts, 'payload'),\n      'DevicePort': _.get(opts, 'devicePort'),\n      'PayloadType': _.get(opts, 'payloadType'),\n      'CallbackUrl': _.get(opts, 'callbackUrl'),\n      'CallbackMethod': _.get(opts, 'callbackMethod')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpCommandInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams IpCommandInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.IpCommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] -\n   *          The SID or unique name of the Sim resource that IP Command was sent to or from.\n   * @param {string} [opts.simIccid] -\n   *          The ICCID of the Sim resource that IP Command was sent to or from.\n   * @param {ip_command.status} [opts.status] - The status of the IP Command\n   * @param {ip_command.direction} [opts.direction] - The direction of the IP Command\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  IpCommandListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists IpCommandInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.IpCommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] -\n   *          The SID or unique name of the Sim resource that IP Command was sent to or from.\n   * @param {string} [opts.simIccid] -\n   *          The ICCID of the Sim resource that IP Command was sent to or from.\n   * @param {ip_command.status} [opts.status] - The status of the IP Command\n   * @param {ip_command.direction} [opts.direction] - The direction of the IP Command\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpCommandListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of IpCommandInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.IpCommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] -\n   *          The SID or unique name of the Sim resource that IP Command was sent to or from.\n   * @param {string} [opts.simIccid] -\n   *          The ICCID of the Sim resource that IP Command was sent to or from.\n   * @param {ip_command.status} [opts.status] - The status of the IP Command\n   * @param {ip_command.direction} [opts.direction] - The direction of the IP Command\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpCommandListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Sim': _.get(opts, 'sim'),\n      'SimIccid': _.get(opts, 'simIccid'),\n      'Status': _.get(opts, 'status'),\n      'Direction': _.get(opts, 'direction'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpCommandPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of IpCommandInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.IpCommandList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  IpCommandListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new IpCommandPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a ip_command\n   *\n   * @function get\n   * @memberof Twilio.Supersim.V1.IpCommandList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Supersim.V1.IpCommandContext}\n   */\n  /* jshint ignore:end */\n  IpCommandListInstance.get = function get(sid) {\n    return new IpCommandContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.IpCommandList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  IpCommandListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  IpCommandListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return IpCommandListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpCommandPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.IpCommandPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {IpCommandSolution} solution - Path solution\n *\n * @returns IpCommandPage\n */\n/* jshint ignore:end */\nIpCommandPage = function IpCommandPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(IpCommandPage.prototype, Page.prototype);\nIpCommandPage.prototype.constructor = IpCommandPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of IpCommandInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.IpCommandPage#\n *\n * @param {IpCommandPayload} payload - Payload response from the API\n *\n * @returns IpCommandInstance\n */\n/* jshint ignore:end */\nIpCommandPage.prototype.getInstance = function getInstance(payload) {\n  return new IpCommandInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.IpCommandPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpCommandPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpCommandPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpCommandContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.IpCommandInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} simSid -\n *          The SID of the Super SIM that this IP Command was sent to or from\n * @property {string} simIccid -\n *          The ICCID of the Super SIM that this IP Command was sent to or from\n * @property {ip_command.status} status - The status of the IP Command\n * @property {ip_command.direction} direction - The direction of the IP Command\n * @property {string} deviceIp -\n *          The IP address of the device that the IP Command was sent to or received from\n * @property {number} devicePort -\n *          The port that the IP Command either originated from or was sent to\n * @property {ip_command.payload_type} payloadType -\n *          The payload type of the IP Command\n * @property {string} payload -\n *          The payload of the IP Command sent to or from the Super SIM\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the IP Command resource\n *\n * @param {V1} version - Version of the resource\n * @param {IpCommandPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nIpCommandInstance = function IpCommandInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.simIccid = payload.sim_iccid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.direction = payload.direction; // jshint ignore:line\n  this.deviceIp = payload.device_ip; // jshint ignore:line\n  this.devicePort = deserialize.integer(payload.device_port); // jshint ignore:line\n  this.payloadType = payload.payload_type; // jshint ignore:line\n  this.payload = payload.payload; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(IpCommandInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new IpCommandContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a IpCommandInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.IpCommandInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpCommandInstance\n */\n/* jshint ignore:end */\nIpCommandInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.IpCommandInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpCommandInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nIpCommandInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the IpCommandContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.IpCommandContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nIpCommandContext = function IpCommandContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/IpCommands/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a IpCommandInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.IpCommandContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed IpCommandInstance\n */\n/* jshint ignore:end */\nIpCommandContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new IpCommandInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.IpCommandContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nIpCommandContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nIpCommandContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  IpCommandList: IpCommandList,\n  IpCommandPage: IpCommandPage,\n  IpCommandInstance: IpCommandInstance,\n  IpCommandContext: IpCommandContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar NetworkAccessProfileNetworkList;\nvar NetworkAccessProfileNetworkPage;\nvar NetworkAccessProfileNetworkInstance;\nvar NetworkAccessProfileNetworkContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkAccessProfileNetworkList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n * @param {string} networkAccessProfileSid -\n *          The unique string that identifies the Network Access Profile resource\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkList = function\n    NetworkAccessProfileNetworkList(version, networkAccessProfileSid) {\n  /* jshint ignore:start */\n  /**\n   * @function networks\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkContext}\n   */\n  /* jshint ignore:end */\n  function NetworkAccessProfileNetworkListInstance(sid) {\n    return NetworkAccessProfileNetworkListInstance.get(sid);\n  }\n\n  NetworkAccessProfileNetworkListInstance._version = version;\n  // Path Solution\n  NetworkAccessProfileNetworkListInstance._solution = {\n    networkAccessProfileSid: networkAccessProfileSid\n  };\n  NetworkAccessProfileNetworkListInstance._uri = `/NetworkAccessProfiles/${networkAccessProfileSid}/Networks`;\n  /* jshint ignore:start */\n  /**\n   * Streams NetworkAccessProfileNetworkInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileNetworkListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists NetworkAccessProfileNetworkInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileNetworkListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of NetworkAccessProfileNetworkInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileNetworkListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NetworkAccessProfileNetworkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of NetworkAccessProfileNetworkInstance records\n   * from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileNetworkListInstance.getPage = function getPage(targetUrl,\n      callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NetworkAccessProfileNetworkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a NetworkAccessProfileNetworkInstance\n   *\n   * @function create\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.network - The SID that identifies the Network resource\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed NetworkAccessProfileNetworkInstance\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileNetworkListInstance.create = function create(opts, callback)\n      {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['network'])) {\n      throw new Error('Required parameter \"opts[\\'network\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({'Network': _.get(opts, 'network')});\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NetworkAccessProfileNetworkInstance(\n        this._version,\n        payload,\n        this._solution.networkAccessProfileSid,\n        this._solution.sid\n      ));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a network_access_profile_network\n   *\n   * @function get\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList#\n   *\n   * @param {string} sid - The SID of the resource to fetch\n   *\n   * @returns {Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkContext}\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileNetworkListInstance.get = function get(sid) {\n    return new NetworkAccessProfileNetworkContext(\n      this._version,\n      this._solution.networkAccessProfileSid,\n      sid\n    );\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileNetworkListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NetworkAccessProfileNetworkListInstance[util.inspect.custom] = function\n      inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NetworkAccessProfileNetworkListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkAccessProfileNetworkPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NetworkAccessProfileNetworkSolution} solution - Path solution\n *\n * @returns NetworkAccessProfileNetworkPage\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkPage = function\n    NetworkAccessProfileNetworkPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NetworkAccessProfileNetworkPage.prototype, Page.prototype);\nNetworkAccessProfileNetworkPage.prototype.constructor = NetworkAccessProfileNetworkPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NetworkAccessProfileNetworkInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkPage#\n *\n * @param {NetworkAccessProfileNetworkPayload} payload -\n *          Payload response from the API\n *\n * @returns NetworkAccessProfileNetworkInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkPage.prototype.getInstance = function\n    getInstance(payload) {\n  return new NetworkAccessProfileNetworkInstance(\n    this._version,\n    payload,\n    this._solution.networkAccessProfileSid\n  );\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNetworkAccessProfileNetworkPage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkAccessProfileNetworkContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} networkAccessProfileSid -\n *          The unique string that identifies the Network Access Profile resource\n * @property {string} friendlyName - A human readable identifier of this resource\n * @property {string} isoCountry - The ISO country code of the Network resource\n * @property {object} identifiers - The MCC/MNCs included in the resource\n * @property {string} url - The absolute URL of the resource\n *\n * @param {V1} version - Version of the resource\n * @param {NetworkAccessProfileNetworkPayload} payload - The instance payload\n * @param {sid} networkAccessProfileSid -\n *          The unique string that identifies the Network Access Profile resource\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkInstance = function\n    NetworkAccessProfileNetworkInstance(version, payload,\n    networkAccessProfileSid, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.networkAccessProfileSid = payload.network_access_profile_sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.identifiers = payload.identifiers; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {networkAccessProfileSid: networkAccessProfileSid, sid: sid || this.sid, };\n};\n\nObject.defineProperty(NetworkAccessProfileNetworkInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new NetworkAccessProfileNetworkContext(\n          this._version,\n          this._solution.networkAccessProfileSid,\n          this._solution.sid\n        );\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * remove a NetworkAccessProfileNetworkInstance\n *\n * @function remove\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkAccessProfileNetworkInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkInstance.prototype.remove = function remove(callback)\n    {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NetworkAccessProfileNetworkInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkAccessProfileNetworkInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNetworkAccessProfileNetworkInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkAccessProfileNetworkContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} networkAccessProfileSid -\n *          The unique string that identifies the Network Access Profile resource\n * @param {sid} sid - The SID of the resource to fetch\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkContext = function\n    NetworkAccessProfileNetworkContext(version, networkAccessProfileSid, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {networkAccessProfileSid: networkAccessProfileSid, sid: sid, };\n  this._uri = `/NetworkAccessProfiles/${networkAccessProfileSid}/Networks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * remove a NetworkAccessProfileNetworkInstance\n *\n * @function remove\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkAccessProfileNetworkInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkContext.prototype.remove = function remove(callback)\n    {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NetworkAccessProfileNetworkInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkAccessProfileNetworkInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NetworkAccessProfileNetworkInstance(\n      this._version,\n      payload,\n      this._solution.networkAccessProfileSid,\n      this._solution.sid\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNetworkAccessProfileNetworkContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nNetworkAccessProfileNetworkContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NetworkAccessProfileNetworkList: NetworkAccessProfileNetworkList,\n  NetworkAccessProfileNetworkPage: NetworkAccessProfileNetworkPage,\n  NetworkAccessProfileNetworkInstance: NetworkAccessProfileNetworkInstance,\n  NetworkAccessProfileNetworkContext: NetworkAccessProfileNetworkContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar NetworkAccessProfileNetworkList = require(\n    './networkAccessProfile/networkAccessProfileNetwork').NetworkAccessProfileNetworkList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar NetworkAccessProfileList;\nvar NetworkAccessProfilePage;\nvar NetworkAccessProfileInstance;\nvar NetworkAccessProfileContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkAccessProfileList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkAccessProfileList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nNetworkAccessProfileList = function NetworkAccessProfileList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function networkAccessProfiles\n   * @memberof Twilio.Supersim.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.NetworkAccessProfileContext}\n   */\n  /* jshint ignore:end */\n  function NetworkAccessProfileListInstance(sid) {\n    return NetworkAccessProfileListInstance.get(sid);\n  }\n\n  NetworkAccessProfileListInstance._version = version;\n  // Path Solution\n  NetworkAccessProfileListInstance._solution = {};\n  NetworkAccessProfileListInstance._uri = `/NetworkAccessProfiles`;\n  /* jshint ignore:start */\n  /**\n   * create a NetworkAccessProfileInstance\n   *\n   * @function create\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.uniqueName] -\n   *          An application-defined string that uniquely identifies the resource\n   * @param {string|list} [opts.networks] -\n   *          List of Network SIDs that this Network Access Profile will allow connections to\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed NetworkAccessProfileInstance\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileListInstance.create = function create(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'UniqueName': _.get(opts, 'uniqueName'),\n      'Networks': serialize.map(_.get(opts, 'networks'), function(e) { return e; })\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NetworkAccessProfileInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams NetworkAccessProfileInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists NetworkAccessProfileInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of NetworkAccessProfileInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NetworkAccessProfilePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of NetworkAccessProfileInstance records from the\n   * API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileListInstance.getPage = function getPage(targetUrl, callback)\n                                                               {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NetworkAccessProfilePage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a network_access_profile\n   *\n   * @function get\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Supersim.V1.NetworkAccessProfileContext}\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileListInstance.get = function get(sid) {\n    return new NetworkAccessProfileContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.NetworkAccessProfileList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NetworkAccessProfileListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NetworkAccessProfileListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NetworkAccessProfileListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkAccessProfilePage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkAccessProfilePage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NetworkAccessProfileSolution} solution - Path solution\n *\n * @returns NetworkAccessProfilePage\n */\n/* jshint ignore:end */\nNetworkAccessProfilePage = function NetworkAccessProfilePage(version, response,\n    solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NetworkAccessProfilePage.prototype, Page.prototype);\nNetworkAccessProfilePage.prototype.constructor = NetworkAccessProfilePage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NetworkAccessProfileInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.NetworkAccessProfilePage#\n *\n * @param {NetworkAccessProfilePayload} payload - Payload response from the API\n *\n * @returns NetworkAccessProfileInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfilePage.prototype.getInstance = function getInstance(payload) {\n  return new NetworkAccessProfileInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.NetworkAccessProfilePage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNetworkAccessProfilePage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNetworkAccessProfilePage.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkAccessProfileContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkAccessProfileInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid -\n *          The SID of the Account that the Network Access Profile belongs to\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the resource\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {NetworkAccessProfilePayload} payload - The instance payload\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nNetworkAccessProfileInstance = function NetworkAccessProfileInstance(version,\n    payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(NetworkAccessProfileInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new NetworkAccessProfileContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a NetworkAccessProfileInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkAccessProfileInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfileInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a NetworkAccessProfileInstance\n *\n * @function update\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] - The new unique name of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkAccessProfileInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfileInstance.prototype.update = function update(opts, callback)\n    {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the networks\n *\n * @function networks\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileInstance#\n *\n * @returns {Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList}\n */\n/* jshint ignore:end */\nNetworkAccessProfileInstance.prototype.networks = function networks() {\n  return this._proxy.networks;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNetworkAccessProfileInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNetworkAccessProfileInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkAccessProfileContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkAccessProfileContext\n *\n * @property {Twilio.Supersim.V1.NetworkAccessProfileContext.NetworkAccessProfileNetworkList} networks -\n *          networks resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nNetworkAccessProfileContext = function NetworkAccessProfileContext(version, sid)\n    {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/NetworkAccessProfiles/${sid}`;\n\n  // Dependents\n  this._networks = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NetworkAccessProfileInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkAccessProfileInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfileContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NetworkAccessProfileInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a NetworkAccessProfileInstance\n *\n * @function update\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] - The new unique name of the resource\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkAccessProfileInstance\n */\n/* jshint ignore:end */\nNetworkAccessProfileContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({'UniqueName': _.get(opts, 'uniqueName')});\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NetworkAccessProfileInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(NetworkAccessProfileContext.prototype,\n  'networks', {\n    get: function() {\n      if (!this._networks) {\n        this._networks = new NetworkAccessProfileNetworkList(this._version, this._solution.sid);\n      }\n      return this._networks;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.NetworkAccessProfileContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNetworkAccessProfileContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nNetworkAccessProfileContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NetworkAccessProfileList: NetworkAccessProfileList,\n  NetworkAccessProfilePage: NetworkAccessProfilePage,\n  NetworkAccessProfileInstance: NetworkAccessProfileInstance,\n  NetworkAccessProfileContext: NetworkAccessProfileContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar NetworkList;\nvar NetworkPage;\nvar NetworkInstance;\nvar NetworkContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nNetworkList = function NetworkList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function networks\n   * @memberof Twilio.Supersim.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.NetworkContext}\n   */\n  /* jshint ignore:end */\n  function NetworkListInstance(sid) {\n    return NetworkListInstance.get(sid);\n  }\n\n  NetworkListInstance._version = version;\n  // Path Solution\n  NetworkListInstance._solution = {};\n  NetworkListInstance._uri = `/Networks`;\n  /* jshint ignore:start */\n  /**\n   * Streams NetworkInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.NetworkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.isoCountry] -\n   *          The ISO country code of the Network resources to read\n   * @param {string} [opts.mcc] - The MCC of Network resource identifiers to be read\n   * @param {string} [opts.mnc] - The MNC of Network resource identifiers to be read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  NetworkListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists NetworkInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.NetworkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.isoCountry] -\n   *          The ISO country code of the Network resources to read\n   * @param {string} [opts.mcc] - The MCC of Network resource identifiers to be read\n   * @param {string} [opts.mnc] - The MNC of Network resource identifiers to be read\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NetworkListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of NetworkInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.NetworkList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.isoCountry] -\n   *          The ISO country code of the Network resources to read\n   * @param {string} [opts.mcc] - The MCC of Network resource identifiers to be read\n   * @param {string} [opts.mnc] - The MNC of Network resource identifiers to be read\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NetworkListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'IsoCountry': _.get(opts, 'isoCountry'),\n      'Mcc': _.get(opts, 'mcc'),\n      'Mnc': _.get(opts, 'mnc'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NetworkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of NetworkInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.NetworkList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  NetworkListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new NetworkPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a network\n   *\n   * @function get\n   * @memberof Twilio.Supersim.V1.NetworkList#\n   *\n   * @param {string} sid - The SID of the Network resource to fetch\n   *\n   * @returns {Twilio.Supersim.V1.NetworkContext}\n   */\n  /* jshint ignore:end */\n  NetworkListInstance.get = function get(sid) {\n    return new NetworkContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.NetworkList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  NetworkListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  NetworkListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return NetworkListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {NetworkSolution} solution - Path solution\n *\n * @returns NetworkPage\n */\n/* jshint ignore:end */\nNetworkPage = function NetworkPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(NetworkPage.prototype, Page.prototype);\nNetworkPage.prototype.constructor = NetworkPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of NetworkInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.NetworkPage#\n *\n * @param {NetworkPayload} payload - Payload response from the API\n *\n * @returns NetworkInstance\n */\n/* jshint ignore:end */\nNetworkPage.prototype.getInstance = function getInstance(payload) {\n  return new NetworkInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.NetworkPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNetworkPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNetworkPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} friendlyName - A human readable identifier of this resource\n * @property {string} url - The absolute URL of the Network resource\n * @property {string} isoCountry - The ISO country code of the Network resource\n * @property {object} identifiers - The MCC/MNCs included in the Network resource\n *\n * @param {V1} version - Version of the resource\n * @param {NetworkPayload} payload - The instance payload\n * @param {sid} sid - The SID of the Network resource to fetch\n */\n/* jshint ignore:end */\nNetworkInstance = function NetworkInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.identifiers = payload.identifiers; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(NetworkInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new NetworkContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a NetworkInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.NetworkInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkInstance\n */\n/* jshint ignore:end */\nNetworkInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.NetworkInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNetworkInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nNetworkInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the NetworkContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.NetworkContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID of the Network resource to fetch\n */\n/* jshint ignore:end */\nNetworkContext = function NetworkContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Networks/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a NetworkInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.NetworkContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed NetworkInstance\n */\n/* jshint ignore:end */\nNetworkContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new NetworkInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.NetworkContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nNetworkContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nNetworkContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  NetworkList: NetworkList,\n  NetworkPage: NetworkPage,\n  NetworkInstance: NetworkInstance,\n  NetworkContext: NetworkContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar BillingPeriodList;\nvar BillingPeriodPage;\nvar BillingPeriodInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the BillingPeriodList\n *\n * @constructor Twilio.Supersim.V1.SimContext.BillingPeriodList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n * @param {string} simSid - The SID of the Super SIM the Billing Period belongs to\n */\n/* jshint ignore:end */\nBillingPeriodList = function BillingPeriodList(version, simSid) {\n  /* jshint ignore:start */\n  /**\n   * @function billingPeriods\n   * @memberof Twilio.Supersim.V1.SimContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.SimContext.BillingPeriodContext}\n   */\n  /* jshint ignore:end */\n  function BillingPeriodListInstance(sid) {\n    return BillingPeriodListInstance.get(sid);\n  }\n\n  BillingPeriodListInstance._version = version;\n  // Path Solution\n  BillingPeriodListInstance._solution = {simSid: simSid};\n  BillingPeriodListInstance._uri = `/Sims/${simSid}/BillingPeriods`;\n  /* jshint ignore:start */\n  /**\n   * Streams BillingPeriodInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.SimContext.BillingPeriodList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  BillingPeriodListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists BillingPeriodInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.SimContext.BillingPeriodList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BillingPeriodListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of BillingPeriodInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.SimContext.BillingPeriodList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BillingPeriodListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BillingPeriodPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of BillingPeriodInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.SimContext.BillingPeriodList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  BillingPeriodListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new BillingPeriodPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.SimContext.BillingPeriodList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  BillingPeriodListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  BillingPeriodListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return BillingPeriodListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BillingPeriodPage\n *\n * @constructor Twilio.Supersim.V1.SimContext.BillingPeriodPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {BillingPeriodSolution} solution - Path solution\n *\n * @returns BillingPeriodPage\n */\n/* jshint ignore:end */\nBillingPeriodPage = function BillingPeriodPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(BillingPeriodPage.prototype, Page.prototype);\nBillingPeriodPage.prototype.constructor = BillingPeriodPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of BillingPeriodInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.SimContext.BillingPeriodPage#\n *\n * @param {BillingPeriodPayload} payload - Payload response from the API\n *\n * @returns BillingPeriodInstance\n */\n/* jshint ignore:end */\nBillingPeriodPage.prototype.getInstance = function getInstance(payload) {\n  return new BillingPeriodInstance(this._version, payload, this._solution.simSid);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.SimContext.BillingPeriodPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBillingPeriodPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBillingPeriodPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the BillingPeriodContext\n *\n * @constructor Twilio.Supersim.V1.SimContext.BillingPeriodInstance\n *\n * @property {string} sid - The SID of the Billing Period\n * @property {string} accountSid - The SID of the Account the Super SIM belongs to\n * @property {string} simSid -\n *          The SID of the Super SIM the Billing Period belongs to\n * @property {Date} startTime - The start time of the Billing Period\n * @property {Date} endTime - The end time of the Billing Period\n * @property {billing_period.bp_type} periodType - The type of the Billing Period\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n *\n * @param {V1} version - Version of the resource\n * @param {BillingPeriodPayload} payload - The instance payload\n * @param {sid} simSid - The SID of the Super SIM the Billing Period belongs to\n */\n/* jshint ignore:end */\nBillingPeriodInstance = function BillingPeriodInstance(version, payload, simSid)\n                                                        {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.startTime = deserialize.iso8601DateTime(payload.start_time); // jshint ignore:line\n  this.endTime = deserialize.iso8601DateTime(payload.end_time); // jshint ignore:line\n  this.periodType = payload.period_type; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {simSid: simSid, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.SimContext.BillingPeriodInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nBillingPeriodInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nBillingPeriodInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  BillingPeriodList: BillingPeriodList,\n  BillingPeriodPage: BillingPeriodPage,\n  BillingPeriodInstance: BillingPeriodInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar BillingPeriodList = require('./sim/billingPeriod').BillingPeriodList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SimList;\nvar SimPage;\nvar SimInstance;\nvar SimContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SimList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.SimList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSimList = function SimList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function sims\n   * @memberof Twilio.Supersim.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.SimContext}\n   */\n  /* jshint ignore:end */\n  function SimListInstance(sid) {\n    return SimListInstance.get(sid);\n  }\n\n  SimListInstance._version = version;\n  // Path Solution\n  SimListInstance._solution = {};\n  SimListInstance._uri = `/Sims`;\n  /* jshint ignore:start */\n  /**\n   * create a SimInstance\n   *\n   * @function create\n   * @memberof Twilio.Supersim.V1.SimList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.iccid -\n   *          The {@link https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID|ICCID} of the Super SIM to be added to your Account\n   * @param {string} opts.registrationCode -\n   *          The 10-digit code required to claim the Super SIM for your Account\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SimInstance\n   */\n  /* jshint ignore:end */\n  SimListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['iccid'])) {\n      throw new Error('Required parameter \"opts[\\'iccid\\']\" missing.');\n    }\n    if (_.isUndefined(opts['registrationCode'])) {\n      throw new Error('Required parameter \"opts[\\'registrationCode\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Iccid': _.get(opts, 'iccid'),\n      'RegistrationCode': _.get(opts, 'registrationCode')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SimInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SimInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.SimList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sim.status} [opts.status] - The status of the Sim resources to read\n   * @param {string} [opts.fleet] -\n   *          The SID or unique name of the Fleet to which a list of Sims are assigned\n   * @param {string} [opts.iccid] -\n   *          The ICCID associated with a Super SIM to filter the list by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SimListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SimInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.SimList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sim.status} [opts.status] - The status of the Sim resources to read\n   * @param {string} [opts.fleet] -\n   *          The SID or unique name of the Fleet to which a list of Sims are assigned\n   * @param {string} [opts.iccid] -\n   *          The ICCID associated with a Super SIM to filter the list by\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SimListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SimInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.SimList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {sim.status} [opts.status] - The status of the Sim resources to read\n   * @param {string} [opts.fleet] -\n   *          The SID or unique name of the Fleet to which a list of Sims are assigned\n   * @param {string} [opts.iccid] -\n   *          The ICCID associated with a Super SIM to filter the list by\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SimListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Status': _.get(opts, 'status'),\n      'Fleet': _.get(opts, 'fleet'),\n      'Iccid': _.get(opts, 'iccid'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SimPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SimInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.SimList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SimListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SimPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sim\n   *\n   * @function get\n   * @memberof Twilio.Supersim.V1.SimList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Supersim.V1.SimContext}\n   */\n  /* jshint ignore:end */\n  SimListInstance.get = function get(sid) {\n    return new SimContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.SimList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SimListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SimListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SimListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SimPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.SimPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SimSolution} solution - Path solution\n *\n * @returns SimPage\n */\n/* jshint ignore:end */\nSimPage = function SimPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SimPage.prototype, Page.prototype);\nSimPage.prototype.constructor = SimPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SimInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.SimPage#\n *\n * @param {SimPayload} payload - Payload response from the API\n *\n * @returns SimInstance\n */\n/* jshint ignore:end */\nSimPage.prototype.getInstance = function getInstance(payload) {\n  return new SimInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.SimPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSimPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSimPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SimContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.SimInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} uniqueName -\n *          An application-defined string that uniquely identifies the resource\n * @property {string} accountSid -\n *          The SID of the Account that the Super SIM belongs to\n * @property {string} iccid - The ICCID associated with the SIM\n * @property {sim.status} status - The status of the Super SIM\n * @property {string} fleetSid - The unique ID of the Fleet configured for this SIM\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the Sim Resource\n * @property {string} links - The links\n *\n * @param {V1} version - Version of the resource\n * @param {SimPayload} payload - The instance payload\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nSimInstance = function SimInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.uniqueName = payload.unique_name; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.iccid = payload.iccid; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.fleetSid = payload.fleet_sid; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SimInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SimContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SimInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.SimInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a SimInstance\n *\n * @function update\n * @memberof Twilio.Supersim.V1.SimInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {sim.status_update} [opts.status] - The new status of the Super SIM\n * @param {string} [opts.fleet] -\n *          The SID or unique name of the Fleet to which the SIM resource should be assigned\n * @param {string} [opts.callbackUrl] -\n *          The URL we should call after the update has finished\n * @param {string} [opts.callbackMethod] -\n *          The HTTP method we should use to call callback_url\n * @param {string} [opts.accountSid] -\n *          The SID of the Account to which the Sim resource should belong\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the billingPeriods\n *\n * @function billingPeriods\n * @memberof Twilio.Supersim.V1.SimInstance#\n *\n * @returns {Twilio.Supersim.V1.SimContext.BillingPeriodList}\n */\n/* jshint ignore:end */\nSimInstance.prototype.billingPeriods = function billingPeriods() {\n  return this._proxy.billingPeriods;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.SimInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSimInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSimInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SimContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.SimContext\n *\n * @property {Twilio.Supersim.V1.SimContext.BillingPeriodList} billingPeriods -\n *          billingPeriods resource\n *\n * @param {V1} version - Version of the resource\n * @param {sid_like} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nSimContext = function SimContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/Sims/${sid}`;\n\n  // Dependents\n  this._billingPeriods = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SimInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.SimContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SimInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a SimInstance\n *\n * @function update\n * @memberof Twilio.Supersim.V1.SimContext#\n *\n * @param {object} [opts] - Options for request\n * @param {string} [opts.uniqueName] -\n *          An application-defined string that uniquely identifies the resource\n * @param {sim.status_update} [opts.status] - The new status of the Super SIM\n * @param {string} [opts.fleet] -\n *          The SID or unique name of the Fleet to which the SIM resource should be assigned\n * @param {string} [opts.callbackUrl] -\n *          The URL we should call after the update has finished\n * @param {string} [opts.callbackMethod] -\n *          The HTTP method we should use to call callback_url\n * @param {string} [opts.accountSid] -\n *          The SID of the Account to which the Sim resource should belong\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SimInstance\n */\n/* jshint ignore:end */\nSimContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'UniqueName': _.get(opts, 'uniqueName'),\n    'Status': _.get(opts, 'status'),\n    'Fleet': _.get(opts, 'fleet'),\n    'CallbackUrl': _.get(opts, 'callbackUrl'),\n    'CallbackMethod': _.get(opts, 'callbackMethod'),\n    'AccountSid': _.get(opts, 'accountSid')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SimInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(SimContext.prototype,\n  'billingPeriods', {\n    get: function() {\n      if (!this._billingPeriods) {\n        this._billingPeriods = new BillingPeriodList(this._version, this._solution.sid);\n      }\n      return this._billingPeriods;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.SimContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSimContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSimContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SimList: SimList,\n  SimPage: SimPage,\n  SimInstance: SimInstance,\n  SimContext: SimContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar SmsCommandList;\nvar SmsCommandPage;\nvar SmsCommandInstance;\nvar SmsCommandContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the SmsCommandList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.SmsCommandList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nSmsCommandList = function SmsCommandList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function smsCommands\n   * @memberof Twilio.Supersim.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.SmsCommandContext}\n   */\n  /* jshint ignore:end */\n  function SmsCommandListInstance(sid) {\n    return SmsCommandListInstance.get(sid);\n  }\n\n  SmsCommandListInstance._version = version;\n  // Path Solution\n  SmsCommandListInstance._solution = {};\n  SmsCommandListInstance._uri = `/SmsCommands`;\n  /* jshint ignore:start */\n  /**\n   * create a SmsCommandInstance\n   *\n   * @function create\n   * @memberof Twilio.Supersim.V1.SmsCommandList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.sim -\n   *          The sid or unique_name of the SIM to send the SMS Command to\n   * @param {string} opts.payload - The message body of the SMS Command\n   * @param {string} [opts.callbackMethod] -\n   *          The HTTP method we should use to call callback_url\n   * @param {string} [opts.callbackUrl] -\n   *          The URL we should call after we have sent the command\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed SmsCommandInstance\n   */\n  /* jshint ignore:end */\n  SmsCommandListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['sim'])) {\n      throw new Error('Required parameter \"opts[\\'sim\\']\" missing.');\n    }\n    if (_.isUndefined(opts['payload'])) {\n      throw new Error('Required parameter \"opts[\\'payload\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Sim': _.get(opts, 'sim'),\n      'Payload': _.get(opts, 'payload'),\n      'CallbackMethod': _.get(opts, 'callbackMethod'),\n      'CallbackUrl': _.get(opts, 'callbackUrl')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SmsCommandInstance(this._version, payload, this._solution.sid));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Streams SmsCommandInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.SmsCommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] -\n   *          The SID or unique name of the Sim resource that SMS Command was sent to or from.\n   * @param {sms_command.status} [opts.status] - The status of the SMS Command\n   * @param {sms_command.direction} [opts.direction] -\n   *          The direction of the SMS Command\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  SmsCommandListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists SmsCommandInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.SmsCommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] -\n   *          The SID or unique name of the Sim resource that SMS Command was sent to or from.\n   * @param {sms_command.status} [opts.status] - The status of the SMS Command\n   * @param {sms_command.direction} [opts.direction] -\n   *          The direction of the SMS Command\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SmsCommandListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of SmsCommandInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.SmsCommandList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] -\n   *          The SID or unique name of the Sim resource that SMS Command was sent to or from.\n   * @param {sms_command.status} [opts.status] - The status of the SMS Command\n   * @param {sms_command.direction} [opts.direction] -\n   *          The direction of the SMS Command\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SmsCommandListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Sim': _.get(opts, 'sim'),\n      'Status': _.get(opts, 'status'),\n      'Direction': _.get(opts, 'direction'),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SmsCommandPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of SmsCommandInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.SmsCommandList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  SmsCommandListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new SmsCommandPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a sms_command\n   *\n   * @function get\n   * @memberof Twilio.Supersim.V1.SmsCommandList#\n   *\n   * @param {string} sid - The SID that identifies the resource to fetch\n   *\n   * @returns {Twilio.Supersim.V1.SmsCommandContext}\n   */\n  /* jshint ignore:end */\n  SmsCommandListInstance.get = function get(sid) {\n    return new SmsCommandContext(this._version, sid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.SmsCommandList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  SmsCommandListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  SmsCommandListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return SmsCommandListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SmsCommandPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.SmsCommandPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {SmsCommandSolution} solution - Path solution\n *\n * @returns SmsCommandPage\n */\n/* jshint ignore:end */\nSmsCommandPage = function SmsCommandPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(SmsCommandPage.prototype, Page.prototype);\nSmsCommandPage.prototype.constructor = SmsCommandPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of SmsCommandInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.SmsCommandPage#\n *\n * @param {SmsCommandPayload} payload - Payload response from the API\n *\n * @returns SmsCommandInstance\n */\n/* jshint ignore:end */\nSmsCommandPage.prototype.getInstance = function getInstance(payload) {\n  return new SmsCommandInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.SmsCommandPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSmsCommandPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSmsCommandPage.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SmsCommandContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.SmsCommandInstance\n *\n * @property {string} sid - The unique string that identifies the resource\n * @property {string} accountSid - The SID of the Account that created the resource\n * @property {string} simSid -\n *          The SID of the SIM that this SMS Command was sent to or from\n * @property {string} payload -\n *          The message body of the SMS Command sent to or from the SIM\n * @property {sms_command.status} status - The status of the SMS Command\n * @property {sms_command.direction} direction - The direction of the SMS Command\n * @property {Date} dateCreated -\n *          The ISO 8601 date and time in GMT when the resource was created\n * @property {Date} dateUpdated -\n *          The ISO 8601 date and time in GMT when the resource was last updated\n * @property {string} url - The absolute URL of the SMS Command resource\n *\n * @param {V1} version - Version of the resource\n * @param {SmsCommandPayload} payload - The instance payload\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nSmsCommandInstance = function SmsCommandInstance(version, payload, sid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.sid = payload.sid; // jshint ignore:line\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.payload = payload.payload; // jshint ignore:line\n  this.status = payload.status; // jshint ignore:line\n  this.direction = payload.direction; // jshint ignore:line\n  this.dateCreated = deserialize.iso8601DateTime(payload.date_created); // jshint ignore:line\n  this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated); // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {sid: sid || this.sid, };\n};\n\nObject.defineProperty(SmsCommandInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new SmsCommandContext(this._version, this._solution.sid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a SmsCommandInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.SmsCommandInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SmsCommandInstance\n */\n/* jshint ignore:end */\nSmsCommandInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.SmsCommandInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSmsCommandInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nSmsCommandInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the SmsCommandContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.SmsCommandContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} sid - The SID that identifies the resource to fetch\n */\n/* jshint ignore:end */\nSmsCommandContext = function SmsCommandContext(version, sid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {sid: sid, };\n  this._uri = `/SmsCommands/${sid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a SmsCommandInstance\n *\n * @function fetch\n * @memberof Twilio.Supersim.V1.SmsCommandContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed SmsCommandInstance\n */\n/* jshint ignore:end */\nSmsCommandContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new SmsCommandInstance(this._version, payload, this._solution.sid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.SmsCommandContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nSmsCommandContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nSmsCommandContext.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  SmsCommandList: SmsCommandList,\n  SmsCommandPage: SmsCommandPage,\n  SmsCommandInstance: SmsCommandInstance,\n  SmsCommandContext: SmsCommandContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../base/deserialize');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar UsageRecordList;\nvar UsageRecordPage;\nvar UsageRecordInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageRecordList\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.UsageRecordList\n *\n * @param {Twilio.Supersim.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nUsageRecordList = function UsageRecordList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function usageRecords\n   * @memberof Twilio.Supersim.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Supersim.V1.UsageRecordContext}\n   */\n  /* jshint ignore:end */\n  function UsageRecordListInstance(sid) {\n    return UsageRecordListInstance.get(sid);\n  }\n\n  UsageRecordListInstance._version = version;\n  // Path Solution\n  UsageRecordListInstance._solution = {};\n  UsageRecordListInstance._uri = `/UsageRecords`;\n  /* jshint ignore:start */\n  /**\n   * Streams UsageRecordInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Supersim.V1.UsageRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] -\n   *          SID or unique name of a Sim resource. Only show UsageRecords representing usage incurred by this Super SIM.\n   * @param {string} [opts.fleet] -\n   *          SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred.\n   * @param {string} [opts.network] -\n   *          SID of a Network resource. Only show UsageRecords representing usage on this network.\n   * @param {string} [opts.isoCountry] -\n   *          Alpha-2 ISO Country Code. Only show UsageRecords representing usage in this country.\n   * @param {usage_record.group} [opts.group] -\n   *          Dimension over which to aggregate usage records.\n   * @param {usage_record.granularity} [opts.granularity] -\n   *          Time-based grouping that UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default is `all`.\n   * @param {Date} [opts.startTime] -\n   *          Only include usage that occurred at or after this time.\n   * @param {Date} [opts.endTime] -\n   *          Only include usage that occurred before this time (exclusive).\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists UsageRecordInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Supersim.V1.UsageRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] -\n   *          SID or unique name of a Sim resource. Only show UsageRecords representing usage incurred by this Super SIM.\n   * @param {string} [opts.fleet] -\n   *          SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred.\n   * @param {string} [opts.network] -\n   *          SID of a Network resource. Only show UsageRecords representing usage on this network.\n   * @param {string} [opts.isoCountry] -\n   *          Alpha-2 ISO Country Code. Only show UsageRecords representing usage in this country.\n   * @param {usage_record.group} [opts.group] -\n   *          Dimension over which to aggregate usage records.\n   * @param {usage_record.granularity} [opts.granularity] -\n   *          Time-based grouping that UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default is `all`.\n   * @param {Date} [opts.startTime] -\n   *          Only include usage that occurred at or after this time.\n   * @param {Date} [opts.endTime] -\n   *          Only include usage that occurred before this time (exclusive).\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of UsageRecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Supersim.V1.UsageRecordList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.sim] -\n   *          SID or unique name of a Sim resource. Only show UsageRecords representing usage incurred by this Super SIM.\n   * @param {string} [opts.fleet] -\n   *          SID or unique name of a Fleet resource. Only show UsageRecords representing usage for Super SIMs belonging to this Fleet resource at the time the usage occurred.\n   * @param {string} [opts.network] -\n   *          SID of a Network resource. Only show UsageRecords representing usage on this network.\n   * @param {string} [opts.isoCountry] -\n   *          Alpha-2 ISO Country Code. Only show UsageRecords representing usage in this country.\n   * @param {usage_record.group} [opts.group] -\n   *          Dimension over which to aggregate usage records.\n   * @param {usage_record.granularity} [opts.granularity] -\n   *          Time-based grouping that UsageRecords should be aggregated by. Can be: `hour`, `day`, or `all`. Default is `all`.\n   * @param {Date} [opts.startTime] -\n   *          Only include usage that occurred at or after this time.\n   * @param {Date} [opts.endTime] -\n   *          Only include usage that occurred before this time (exclusive).\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'Sim': _.get(opts, 'sim'),\n      'Fleet': _.get(opts, 'fleet'),\n      'Network': _.get(opts, 'network'),\n      'IsoCountry': _.get(opts, 'isoCountry'),\n      'Group': _.get(opts, 'group'),\n      'Granularity': _.get(opts, 'granularity'),\n      'StartTime': serialize.iso8601DateTime(_.get(opts, 'startTime')),\n      'EndTime': serialize.iso8601DateTime(_.get(opts, 'endTime')),\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsageRecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of UsageRecordInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Supersim.V1.UsageRecordList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new UsageRecordPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Supersim.V1.UsageRecordList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  UsageRecordListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  UsageRecordListInstance[util.inspect.custom] = function inspect(depth, options)\n      {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return UsageRecordListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageRecordPage\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.UsageRecordPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {UsageRecordSolution} solution - Path solution\n *\n * @returns UsageRecordPage\n */\n/* jshint ignore:end */\nUsageRecordPage = function UsageRecordPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(UsageRecordPage.prototype, Page.prototype);\nUsageRecordPage.prototype.constructor = UsageRecordPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of UsageRecordInstance\n *\n * @function getInstance\n * @memberof Twilio.Supersim.V1.UsageRecordPage#\n *\n * @param {UsageRecordPayload} payload - Payload response from the API\n *\n * @returns UsageRecordInstance\n */\n/* jshint ignore:end */\nUsageRecordPage.prototype.getInstance = function getInstance(payload) {\n  return new UsageRecordInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.UsageRecordPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsageRecordPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsageRecordPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the UsageRecordContext\n *\n * PLEASE NOTE that this class contains beta products that are subject to change.\n * Use them with caution.\n *\n * @constructor Twilio.Supersim.V1.UsageRecordInstance\n *\n * @property {string} accountSid - The SID of the Account that incurred the usage.\n * @property {string} simSid -\n *          SID of a Sim resource to which the UsageRecord belongs.\n * @property {string} networkSid -\n *          SID of the Network resource on which the usage occurred.\n * @property {string} fleetSid -\n *          SID of the Fleet resource on which the usage occurred.\n * @property {string} isoCountry -\n *          Alpha-2 ISO Country Code of the country the usage occurred in.\n * @property {object} period - The time period for which the usage is reported.\n * @property {number} dataUpload -\n *          Total data uploaded in bytes, aggregated by the query parameters.\n * @property {number} dataDownload -\n *          Total data downloaded in bytes, aggregated by the query parameters.\n * @property {number} dataTotal - Total of data_upload and data_download.\n * @property {number} dataTotalBilled -\n *          Total amount in the `billed_unit` that was charged for the data uploaded or downloaded.\n * @property {string} billedUnit -\n *          The currency in which the billed amounts are measured, specified in the 3 letter ISO 4127 format (e.g. `USD`, `EUR`, `JPY`).\n *\n * @param {V1} version - Version of the resource\n * @param {UsageRecordPayload} payload - The instance payload\n */\n/* jshint ignore:end */\nUsageRecordInstance = function UsageRecordInstance(version, payload) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.accountSid = payload.account_sid; // jshint ignore:line\n  this.simSid = payload.sim_sid; // jshint ignore:line\n  this.networkSid = payload.network_sid; // jshint ignore:line\n  this.fleetSid = payload.fleet_sid; // jshint ignore:line\n  this.isoCountry = payload.iso_country; // jshint ignore:line\n  this.period = payload.period; // jshint ignore:line\n  this.dataUpload = deserialize.integer(payload.data_upload); // jshint ignore:line\n  this.dataDownload = deserialize.integer(payload.data_download); // jshint ignore:line\n  this.dataTotal = deserialize.integer(payload.data_total); // jshint ignore:line\n  this.dataTotalBilled = deserialize.decimal(payload.data_total_billed); // jshint ignore:line\n  this.billedUnit = payload.billed_unit; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {};\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Supersim.V1.UsageRecordInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nUsageRecordInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nUsageRecordInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  UsageRecordList: UsageRecordList,\n  UsageRecordPage: UsageRecordPage,\n  UsageRecordInstance: UsageRecordInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar EsimProfileList = require('./v1/esimProfile').EsimProfileList;\nvar FleetList = require('./v1/fleet').FleetList;\nvar IpCommandList = require('./v1/ipCommand').IpCommandList;\nvar NetworkAccessProfileList = require(\n    './v1/networkAccessProfile').NetworkAccessProfileList;\nvar NetworkList = require('./v1/network').NetworkList;\nvar SimList = require('./v1/sim').SimList;\nvar SmsCommandList = require('./v1/smsCommand').SmsCommandList;\nvar UsageRecordList = require('./v1/usageRecord').UsageRecordList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Supersim\n *\n * @constructor Twilio.Supersim.V1\n *\n * @property {Twilio.Supersim.V1.EsimProfileList} esimProfiles -\n *          esimProfiles resource\n * @property {Twilio.Supersim.V1.FleetList} fleets - fleets resource\n * @property {Twilio.Supersim.V1.IpCommandList} ipCommands - ipCommands resource\n * @property {Twilio.Supersim.V1.NetworkList} networks - networks resource\n * @property {Twilio.Supersim.V1.NetworkAccessProfileList} networkAccessProfiles -\n *          networkAccessProfiles resource\n * @property {Twilio.Supersim.V1.SimList} sims - sims resource\n * @property {Twilio.Supersim.V1.SmsCommandList} smsCommands - smsCommands resource\n * @property {Twilio.Supersim.V1.UsageRecordList} usageRecords -\n *          usageRecords resource\n *\n * @param {Twilio.Supersim} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._esimProfiles = undefined;\n  this._fleets = undefined;\n  this._ipCommands = undefined;\n  this._networks = undefined;\n  this._networkAccessProfiles = undefined;\n  this._sims = undefined;\n  this._smsCommands = undefined;\n  this._usageRecords = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'esimProfiles', {\n    get: function() {\n      this._esimProfiles = this._esimProfiles || new EsimProfileList(this);\n      return this._esimProfiles;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'fleets', {\n    get: function() {\n      this._fleets = this._fleets || new FleetList(this);\n      return this._fleets;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'ipCommands', {\n    get: function() {\n      this._ipCommands = this._ipCommands || new IpCommandList(this);\n      return this._ipCommands;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'networks', {\n    get: function() {\n      this._networks = this._networks || new NetworkList(this);\n      return this._networks;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'networkAccessProfiles', {\n    get: function() {\n      this._networkAccessProfiles = this._networkAccessProfiles || new NetworkAccessProfileList(this);\n      return this._networkAccessProfiles;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'sims', {\n    get: function() {\n      this._sims = this._sims || new SimList(this);\n      return this._sims;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'smsCommands', {\n    get: function() {\n      this._smsCommands = this._smsCommands || new SmsCommandList(this);\n      return this._smsCommands;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'usageRecords', {\n    get: function() {\n      this._usageRecords = this._usageRecords || new UsageRecordList(this);\n      return this._usageRecords;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./supersim/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize supersim domain\n *\n * @constructor Twilio.Supersim\n *\n * @property {Twilio.Supersim.V1} v1 - v1 version\n * @property {Twilio.Supersim.V1.EsimProfileList} esimProfiles -\n *          esimProfiles resource\n * @property {Twilio.Supersim.V1.FleetList} fleets - fleets resource\n * @property {Twilio.Supersim.V1.IpCommandList} ipCommands - ipCommands resource\n * @property {Twilio.Supersim.V1.NetworkList} networks - networks resource\n * @property {Twilio.Supersim.V1.NetworkAccessProfileList} networkAccessProfiles -\n *          networkAccessProfiles resource\n * @property {Twilio.Supersim.V1.SimList} sims - sims resource\n * @property {Twilio.Supersim.V1.SmsCommandList} smsCommands - smsCommands resource\n * @property {Twilio.Supersim.V1.UsageRecordList} usageRecords -\n *          usageRecords resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Supersim(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://supersim.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Supersim.prototype, Domain.prototype);\nSupersim.prototype.constructor = Supersim;\n\nObject.defineProperty(Supersim.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Supersim.prototype,\n  'esimProfiles', {\n    get: function() {\n      return this.v1.esimProfiles;\n    }\n});\n\nObject.defineProperty(Supersim.prototype,\n  'fleets', {\n    get: function() {\n      return this.v1.fleets;\n    }\n});\n\nObject.defineProperty(Supersim.prototype,\n  'ipCommands', {\n    get: function() {\n      return this.v1.ipCommands;\n    }\n});\n\nObject.defineProperty(Supersim.prototype,\n  'networks', {\n    get: function() {\n      return this.v1.networks;\n    }\n});\n\nObject.defineProperty(Supersim.prototype,\n  'networkAccessProfiles', {\n    get: function() {\n      return this.v1.networkAccessProfiles;\n    }\n});\n\nObject.defineProperty(Supersim.prototype,\n  'sims', {\n    get: function() {\n      return this.v1.sims;\n    }\n});\n\nObject.defineProperty(Supersim.prototype,\n  'smsCommands', {\n    get: function() {\n      return this.v1.smsCommands;\n    }\n});\n\nObject.defineProperty(Supersim.prototype,\n  'usageRecords', {\n    get: function() {\n      return this.v1.usageRecords;\n    }\n});\n\nmodule.exports = Supersim;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar serialize = require('../../../base/serialize');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ExportConfigurationList;\nvar ExportConfigurationPage;\nvar ExportConfigurationInstance;\nvar ExportConfigurationContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportConfigurationList\n *\n * @constructor Twilio.Bulkexports.V1.ExportConfigurationList\n *\n * @param {Twilio.Bulkexports.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nExportConfigurationList = function ExportConfigurationList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function exportConfiguration\n   * @memberof Twilio.Bulkexports.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Bulkexports.V1.ExportConfigurationContext}\n   */\n  /* jshint ignore:end */\n  function ExportConfigurationListInstance(sid) {\n    return ExportConfigurationListInstance.get(sid);\n  }\n\n  ExportConfigurationListInstance._version = version;\n  // Path Solution\n  ExportConfigurationListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a export_configuration\n   *\n   * @function get\n   * @memberof Twilio.Bulkexports.V1.ExportConfigurationList#\n   *\n   * @param {string} resourceType -\n   *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n   *\n   * @returns {Twilio.Bulkexports.V1.ExportConfigurationContext}\n   */\n  /* jshint ignore:end */\n  ExportConfigurationListInstance.get = function get(resourceType) {\n    return new ExportConfigurationContext(this._version, resourceType);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Bulkexports.V1.ExportConfigurationList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExportConfigurationListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExportConfigurationListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExportConfigurationListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportConfigurationPage\n *\n * @constructor Twilio.Bulkexports.V1.ExportConfigurationPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExportConfigurationSolution} solution - Path solution\n *\n * @returns ExportConfigurationPage\n */\n/* jshint ignore:end */\nExportConfigurationPage = function ExportConfigurationPage(version, response,\n                                                            solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExportConfigurationPage.prototype, Page.prototype);\nExportConfigurationPage.prototype.constructor = ExportConfigurationPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExportConfigurationInstance\n *\n * @function getInstance\n * @memberof Twilio.Bulkexports.V1.ExportConfigurationPage#\n *\n * @param {ExportConfigurationPayload} payload - Payload response from the API\n *\n * @returns ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationPage.prototype.getInstance = function getInstance(payload) {\n  return new ExportConfigurationInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportConfigurationPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportConfigurationPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportConfigurationPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportConfigurationContext\n *\n * @constructor Twilio.Bulkexports.V1.ExportConfigurationInstance\n *\n * @property {boolean} enabled - Whether files are automatically generated\n * @property {string} webhookUrl - URL targeted at export\n * @property {string} webhookMethod - Whether to GET or POST to the webhook url\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @property {string} url - The URL of this resource.\n *\n * @param {V1} version - Version of the resource\n * @param {ExportConfigurationPayload} payload - The instance payload\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportConfigurationInstance = function ExportConfigurationInstance(version,\n    payload, resourceType) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.enabled = payload.enabled; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {resourceType: resourceType || this.resourceType, };\n};\n\nObject.defineProperty(ExportConfigurationInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExportConfigurationContext(this._version, this._solution.resourceType);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExportConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Bulkexports.V1.ExportConfigurationInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * update a ExportConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Bulkexports.V1.ExportConfigurationInstance#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.enabled] - Whether files are automatically generated\n * @param {string} [opts.webhookUrl] - URL targeted at export\n * @param {string} [opts.webhookMethod] - Whether to GET or POST to the webhook url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationInstance.prototype.update = function update(opts, callback) {\n  return this._proxy.update(opts, callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportConfigurationInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportConfigurationInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportConfigurationInstance.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportConfigurationContext\n *\n * @constructor Twilio.Bulkexports.V1.ExportConfigurationContext\n *\n * @param {V1} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportConfigurationContext = function ExportConfigurationContext(version,\n    resourceType) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {resourceType: resourceType, };\n  this._uri = `/Exports/${resourceType}/Configuration`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExportConfigurationInstance\n *\n * @function fetch\n * @memberof Twilio.Bulkexports.V1.ExportConfigurationContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExportConfigurationInstance(\n      this._version,\n      payload,\n      this._solution.resourceType\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * update a ExportConfigurationInstance\n *\n * @function update\n * @memberof Twilio.Bulkexports.V1.ExportConfigurationContext#\n *\n * @param {object} [opts] - Options for request\n * @param {boolean} [opts.enabled] - Whether files are automatically generated\n * @param {string} [opts.webhookUrl] - URL targeted at export\n * @param {string} [opts.webhookMethod] - Whether to GET or POST to the webhook url\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportConfigurationInstance\n */\n/* jshint ignore:end */\nExportConfigurationContext.prototype.update = function update(opts, callback) {\n  if (_.isFunction(opts)) {\n    callback = opts;\n    opts = {};\n  }\n  opts = opts || {};\n\n  var deferred = Q.defer();\n  var data = values.of({\n    'Enabled': serialize.bool(_.get(opts, 'enabled')),\n    'WebhookUrl': _.get(opts, 'webhookUrl'),\n    'WebhookMethod': _.get(opts, 'webhookMethod')\n  });\n\n  var promise = this._version.update({uri: this._uri, method: 'POST', data: data});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExportConfigurationInstance(\n      this._version,\n      payload,\n      this._solution.resourceType\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportConfigurationContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportConfigurationContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExportConfigurationContext.prototype[util.inspect.custom] = function\n    inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExportConfigurationList: ExportConfigurationList,\n  ExportConfigurationPage: ExportConfigurationPage,\n  ExportConfigurationInstance: ExportConfigurationInstance,\n  ExportConfigurationContext: ExportConfigurationContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar deserialize = require(\n    '../../../../base/deserialize');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar DayList;\nvar DayPage;\nvar DayInstance;\nvar DayContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the DayList\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.DayList\n *\n * @param {Twilio.Bulkexports.V1} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nDayList = function DayList(version, resourceType) {\n  /* jshint ignore:start */\n  /**\n   * @function days\n   * @memberof Twilio.Bulkexports.V1.ExportContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Bulkexports.V1.ExportContext.DayContext}\n   */\n  /* jshint ignore:end */\n  function DayListInstance(sid) {\n    return DayListInstance.get(sid);\n  }\n\n  DayListInstance._version = version;\n  // Path Solution\n  DayListInstance._solution = {resourceType: resourceType};\n  DayListInstance._uri = `/Exports/${resourceType}/Days`;\n  /* jshint ignore:start */\n  /**\n   * Streams DayInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Bulkexports.V1.ExportContext.DayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  DayListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists DayInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Bulkexports.V1.ExportContext.DayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DayListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of DayInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Bulkexports.V1.ExportContext.DayList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DayListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DayPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of DayInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Bulkexports.V1.ExportContext.DayList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  DayListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new DayPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a day\n   *\n   * @function get\n   * @memberof Twilio.Bulkexports.V1.ExportContext.DayList#\n   *\n   * @param {string} day - The date of the data in the file\n   *\n   * @returns {Twilio.Bulkexports.V1.ExportContext.DayContext}\n   */\n  /* jshint ignore:end */\n  DayListInstance.get = function get(day) {\n    return new DayContext(this._version, this._solution.resourceType, day);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Bulkexports.V1.ExportContext.DayList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  DayListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  DayListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return DayListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DayPage\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.DayPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {DaySolution} solution - Path solution\n *\n * @returns DayPage\n */\n/* jshint ignore:end */\nDayPage = function DayPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(DayPage.prototype, Page.prototype);\nDayPage.prototype.constructor = DayPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of DayInstance\n *\n * @function getInstance\n * @memberof Twilio.Bulkexports.V1.ExportContext.DayPage#\n *\n * @param {DayPayload} payload - Payload response from the API\n *\n * @returns DayInstance\n */\n/* jshint ignore:end */\nDayPage.prototype.getInstance = function getInstance(payload) {\n  return new DayInstance(this._version, payload, this._solution.resourceType);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportContext.DayPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDayPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDayPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DayContext\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.DayInstance\n *\n * @property {string} redirectTo - The redirect_to\n * @property {string} day - The date of the data in the file\n * @property {number} size - Size of the file in bytes\n * @property {string} createDate - The date when resource is created\n * @property {string} friendlyName -\n *          The friendly name specified when creating the job\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n *\n * @param {V1} version - Version of the resource\n * @param {DayPayload} payload - The instance payload\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @param {string} day - The date of the data in the file\n */\n/* jshint ignore:end */\nDayInstance = function DayInstance(version, payload, resourceType, day) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.redirectTo = payload.redirect_to; // jshint ignore:line\n  this.day = payload.day; // jshint ignore:line\n  this.size = deserialize.integer(payload.size); // jshint ignore:line\n  this.createDate = payload.create_date; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.resourceType = payload.resource_type; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {resourceType: resourceType, day: day || this.day, };\n};\n\nObject.defineProperty(DayInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new DayContext(this._version, this._solution.resourceType, this._solution.day);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a DayInstance\n *\n * @function fetch\n * @memberof Twilio.Bulkexports.V1.ExportContext.DayInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DayInstance\n */\n/* jshint ignore:end */\nDayInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportContext.DayInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDayInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nDayInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the DayContext\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.DayContext\n *\n * @param {V1} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @param {string} day - The date of the data in the file\n */\n/* jshint ignore:end */\nDayContext = function DayContext(version, resourceType, day) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {resourceType: resourceType, day: day, };\n  this._uri = `/Exports/${resourceType}/Days/${day}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a DayInstance\n *\n * @function fetch\n * @memberof Twilio.Bulkexports.V1.ExportContext.DayContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed DayInstance\n */\n/* jshint ignore:end */\nDayContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new DayInstance(\n      this._version,\n      payload,\n      this._solution.resourceType,\n      this._solution.day\n    ));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportContext.DayContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nDayContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nDayContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  DayList: DayList,\n  DayPage: DayPage,\n  DayInstance: DayInstance,\n  DayContext: DayContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar ExportCustomJobList;\nvar ExportCustomJobPage;\nvar ExportCustomJobInstance;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportCustomJobList\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.ExportCustomJobList\n *\n * @param {Twilio.Bulkexports.V1} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportCustomJobList = function ExportCustomJobList(version, resourceType) {\n  /* jshint ignore:start */\n  /**\n   * @function exportCustomJobs\n   * @memberof Twilio.Bulkexports.V1.ExportContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Bulkexports.V1.ExportContext.ExportCustomJobContext}\n   */\n  /* jshint ignore:end */\n  function ExportCustomJobListInstance(sid) {\n    return ExportCustomJobListInstance.get(sid);\n  }\n\n  ExportCustomJobListInstance._version = version;\n  // Path Solution\n  ExportCustomJobListInstance._solution = {resourceType: resourceType};\n  ExportCustomJobListInstance._uri = `/Exports/${resourceType}/Jobs`;\n  /* jshint ignore:start */\n  /**\n   * Streams ExportCustomJobInstance records from the API.\n   *\n   * This operation lazily loads records as efficiently as possible until the limit\n   * is reached.\n   *\n   * The results are passed into the callback function, so this operation is memory\n   * efficient.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function each\n   * @memberof Twilio.Bulkexports.V1.ExportContext.ExportCustomJobList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         each() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no pageSize is defined but a limit is defined,\n   *         each() will attempt to read the limit with the most efficient\n   *         page size, i.e. min(limit, 1000)\n   * @param {Function} [opts.callback] -\n   *         Function to process each record. If this and a positional\n   *         callback are passed, this one will be used\n   * @param {Function} [opts.done] -\n   *          Function to be called upon completion of streaming\n   * @param {Function} [callback] - Function to process each record\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.each = function each(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    if (opts.callback) {\n      callback = opts.callback;\n    }\n    if (_.isUndefined(callback)) {\n      throw new Error('Callback function must be provided');\n    }\n\n    var done = false;\n    var currentPage = 1;\n    var currentResource = 0;\n    var limits = this._version.readLimits({\n      limit: opts.limit,\n      pageSize: opts.pageSize\n    });\n\n    function onComplete(error) {\n      done = true;\n      if (_.isFunction(opts.done)) {\n        opts.done(error);\n      }\n    }\n\n    function fetchNextPage(fn) {\n      var promise = fn();\n      if (_.isUndefined(promise)) {\n        onComplete();\n        return;\n      }\n\n      promise.then(function(page) {\n        _.each(page.instances, function(instance) {\n          if (done || (!_.isUndefined(opts.limit) && currentResource >= opts.limit)) {\n            done = true;\n            return false;\n          }\n\n          currentResource++;\n          callback(instance, onComplete);\n        });\n\n        if (!done) {\n          currentPage++;\n          fetchNextPage(_.bind(page.nextPage, page));\n        } else {\n          onComplete();\n        }\n      });\n\n      promise.catch(onComplete);\n    }\n\n    fetchNextPage(_.bind(this.page, this, _.merge(opts, limits)));\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Lists ExportCustomJobInstance records from the API as a list.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function list\n   * @memberof Twilio.Bulkexports.V1.ExportContext.ExportCustomJobList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {number} [opts.limit] -\n   *         Upper limit for the number of records to return.\n   *         list() guarantees never to return more than limit.\n   *         Default is no limit\n   * @param {number} [opts.pageSize] -\n   *         Number of records to fetch per request,\n   *         when not set will use the default value of 50 records.\n   *         If no page_size is defined but a limit is defined,\n   *         list() will attempt to read the limit with the most\n   *         efficient page size, i.e. min(limit, 1000)\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.list = function list(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n    var deferred = Q.defer();\n    var allResources = [];\n    opts.callback = function(resource, done) {\n      allResources.push(resource);\n\n      if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) {\n        done();\n      }\n    };\n\n    opts.done = function(error) {\n      if (_.isUndefined(error)) {\n        deferred.resolve(allResources);\n      } else {\n        deferred.reject(error);\n      }\n    };\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    this.each(opts);\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single page of ExportCustomJobInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function page\n   * @memberof Twilio.Bulkexports.V1.ExportContext.ExportCustomJobList#\n   *\n   * @param {object} [opts] - Options for request\n   * @param {string} [opts.pageToken] - PageToken provided by the API\n   * @param {number} [opts.pageNumber] -\n   *          Page Number, this value is simply for client state\n   * @param {number} [opts.pageSize] - Number of records to return, defaults to 50\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.page = function page(opts, callback) {\n    if (_.isFunction(opts)) {\n      callback = opts;\n      opts = {};\n    }\n    opts = opts || {};\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'PageToken': opts.pageToken,\n      'Page': opts.pageNumber,\n      'PageSize': opts.pageSize\n    });\n\n    var promise = this._version.page({uri: this._uri, method: 'GET', params: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExportCustomJobPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Retrieve a single target page of ExportCustomJobInstance records from the API.\n   *\n   * The request is executed immediately.\n   *\n   * If a function is passed as the first argument, it will be used as the callback\n   * function.\n   *\n   * @function getPage\n   * @memberof Twilio.Bulkexports.V1.ExportContext.ExportCustomJobList#\n   *\n   * @param {string} [targetUrl] - API-generated URL for the requested results page\n   * @param {function} [callback] - Callback to handle list of records\n   *\n   * @returns {Promise} Resolves to a list of records\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.getPage = function getPage(targetUrl, callback) {\n    var deferred = Q.defer();\n\n    var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExportCustomJobPage(this._version, payload, this._solution));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * create a ExportCustomJobInstance\n   *\n   * @function create\n   * @memberof Twilio.Bulkexports.V1.ExportContext.ExportCustomJobList#\n   *\n   * @param {object} opts - Options for request\n   * @param {string} opts.startDay -\n   *          The start day for the custom export specified as a string in the format of yyyy-mm-dd\n   * @param {string} opts.endDay -\n   *          The end day for the custom export specified as a string in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier than the current UTC day.\n   * @param {string} opts.friendlyName -\n   *          The friendly name specified when creating the job\n   * @param {string} [opts.webhookUrl] -\n   *          The optional webhook url called on completion of the job. If this is supplied, `WebhookMethod` must also be supplied.\n   * @param {string} [opts.webhookMethod] -\n   *          This is the method used to call the webhook on completion of the job. If this is supplied, `WebhookUrl` must also be supplied.\n   * @param {string} [opts.email] -\n   *          The optional email to send the completion notification to\n   * @param {function} [callback] - Callback to handle processed record\n   *\n   * @returns {Promise} Resolves to processed ExportCustomJobInstance\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.create = function create(opts, callback) {\n    if (_.isUndefined(opts)) {\n      throw new Error('Required parameter \"opts\" missing.');\n    }\n    if (_.isUndefined(opts['startDay'])) {\n      throw new Error('Required parameter \"opts[\\'startDay\\']\" missing.');\n    }\n    if (_.isUndefined(opts['endDay'])) {\n      throw new Error('Required parameter \"opts[\\'endDay\\']\" missing.');\n    }\n    if (_.isUndefined(opts['friendlyName'])) {\n      throw new Error('Required parameter \"opts[\\'friendlyName\\']\" missing.');\n    }\n\n    var deferred = Q.defer();\n    var data = values.of({\n      'StartDay': _.get(opts, 'startDay'),\n      'EndDay': _.get(opts, 'endDay'),\n      'FriendlyName': _.get(opts, 'friendlyName'),\n      'WebhookUrl': _.get(opts, 'webhookUrl'),\n      'WebhookMethod': _.get(opts, 'webhookMethod'),\n      'Email': _.get(opts, 'email')\n    });\n\n    var promise = this._version.create({uri: this._uri, method: 'POST', data: data});\n\n    promise = promise.then(function(payload) {\n      deferred.resolve(new ExportCustomJobInstance(this._version, payload));\n    }.bind(this));\n\n    promise.catch(function(error) {\n      deferred.reject(error);\n    });\n\n    if (_.isFunction(callback)) {\n      deferred.promise.nodeify(callback);\n    }\n\n    return deferred.promise;\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Bulkexports.V1.ExportContext.ExportCustomJobList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExportCustomJobListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExportCustomJobListInstance[util.inspect.custom] = function inspect(depth,\n      options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExportCustomJobListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportCustomJobPage\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.ExportCustomJobPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExportCustomJobSolution} solution - Path solution\n *\n * @returns ExportCustomJobPage\n */\n/* jshint ignore:end */\nExportCustomJobPage = function ExportCustomJobPage(version, response, solution)\n                                                    {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExportCustomJobPage.prototype, Page.prototype);\nExportCustomJobPage.prototype.constructor = ExportCustomJobPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExportCustomJobInstance\n *\n * @function getInstance\n * @memberof Twilio.Bulkexports.V1.ExportContext.ExportCustomJobPage#\n *\n * @param {ExportCustomJobPayload} payload - Payload response from the API\n *\n * @returns ExportCustomJobInstance\n */\n/* jshint ignore:end */\nExportCustomJobPage.prototype.getInstance = function getInstance(payload) {\n  return new ExportCustomJobInstance(this._version, payload, this._solution.resourceType);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportContext.ExportCustomJobPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportCustomJobPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportCustomJobPage.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportCustomJobContext\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.ExportCustomJobInstance\n *\n * @property {string} friendlyName -\n *          The friendly name specified when creating the job\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @property {string} startDay -\n *          The start day for the custom export specified as a string in the format of yyyy-MM-dd\n * @property {string} endDay -\n *          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.\n * @property {string} webhookUrl - The optional webhook url called on completion\n * @property {string} webhookMethod - This is the method used to call the webhook\n * @property {string} email -\n *          The optional email to send the completion notification to\n * @property {string} jobSid -\n *          The unique job_sid returned when the custom export was created. This can be used to look up the status of the job.\n * @property {object} details -\n *          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\n * @property {string} jobQueuePosition -\n *          This is the job position from the 1st in line. Your queue position will never increase. As jobs ahead of yours in the queue are processed, the queue position number will decrease\n * @property {string} estimatedCompletionTime -\n *          this is the time estimated until your job is complete. This is calculated each time you request the job list. The time is calculated based on the current rate of job completion (which may vary) and your job queue position\n *\n * @param {V1} version - Version of the resource\n * @param {ExportCustomJobPayload} payload - The instance payload\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportCustomJobInstance = function ExportCustomJobInstance(version, payload,\n                                                            resourceType) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.startDay = payload.start_day; // jshint ignore:line\n  this.endDay = payload.end_day; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.jobSid = payload.job_sid; // jshint ignore:line\n  this.details = payload.details; // jshint ignore:line\n  this.jobQueuePosition = payload.job_queue_position; // jshint ignore:line\n  this.estimatedCompletionTime = payload.estimated_completion_time; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {resourceType: resourceType, };\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportContext.ExportCustomJobInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportCustomJobInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportCustomJobInstance.prototype[util.inspect.custom] = function inspect(depth,\n    options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExportCustomJobList: ExportCustomJobList,\n  ExportCustomJobPage: ExportCustomJobPage,\n  ExportCustomJobInstance: ExportCustomJobInstance\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar Page = require('../../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../../base/values');  /* jshint ignore:line */\n\nvar JobList;\nvar JobPage;\nvar JobInstance;\nvar JobContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the JobList\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.JobList\n *\n * @param {Twilio.Bulkexports.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nJobList = function JobList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function jobs\n   * @memberof Twilio.Bulkexports.V1.ExportContext#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Bulkexports.V1.ExportContext.JobContext}\n   */\n  /* jshint ignore:end */\n  function JobListInstance(sid) {\n    return JobListInstance.get(sid);\n  }\n\n  JobListInstance._version = version;\n  // Path Solution\n  JobListInstance._solution = {};\n  /* jshint ignore:start */\n  /**\n   * Constructs a job\n   *\n   * @function get\n   * @memberof Twilio.Bulkexports.V1.ExportContext.JobList#\n   *\n   * @param {string} jobSid -\n   *          The unique string that that we created to identify the Bulk Export job\n   *\n   * @returns {Twilio.Bulkexports.V1.ExportContext.JobContext}\n   */\n  /* jshint ignore:end */\n  JobListInstance.get = function get(jobSid) {\n    return new JobContext(this._version, jobSid);\n  };\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Bulkexports.V1.ExportContext.JobList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  JobListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  JobListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return JobListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the JobPage\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.JobPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {JobSolution} solution - Path solution\n *\n * @returns JobPage\n */\n/* jshint ignore:end */\nJobPage = function JobPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(JobPage.prototype, Page.prototype);\nJobPage.prototype.constructor = JobPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of JobInstance\n *\n * @function getInstance\n * @memberof Twilio.Bulkexports.V1.ExportContext.JobPage#\n *\n * @param {JobPayload} payload - Payload response from the API\n *\n * @returns JobInstance\n */\n/* jshint ignore:end */\nJobPage.prototype.getInstance = function getInstance(payload) {\n  return new JobInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportContext.JobPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nJobPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nJobPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the JobContext\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.JobInstance\n *\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @property {string} friendlyName -\n *          The friendly name specified when creating the job\n * @property {object} details -\n *          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\n * @property {string} startDay -\n *          The start time for the export specified when creating the job\n * @property {string} endDay -\n *          The end time for the export specified when creating the job\n * @property {string} jobSid - The job_sid returned when the export was created\n * @property {string} webhookUrl - The optional webhook url called on completion\n * @property {string} webhookMethod - This is the method used to call the webhook\n * @property {string} email -\n *          The optional email to send the completion notification to\n * @property {string} url - The url\n * @property {string} jobQueuePosition -\n *          This is the job position from the 1st in line. Your queue position will never increase. As jobs ahead of yours in the queue are processed, the queue position number will decrease\n * @property {string} estimatedCompletionTime -\n *          this is the time estimated until your job is complete. This is calculated each time you request the job list. The time is calculated based on the current rate of job completion (which may vary) and your job queue position\n *\n * @param {V1} version - Version of the resource\n * @param {JobPayload} payload - The instance payload\n * @param {sid} jobSid -\n *          The unique string that that we created to identify the Bulk Export job\n */\n/* jshint ignore:end */\nJobInstance = function JobInstance(version, payload, jobSid) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.friendlyName = payload.friendly_name; // jshint ignore:line\n  this.details = payload.details; // jshint ignore:line\n  this.startDay = payload.start_day; // jshint ignore:line\n  this.endDay = payload.end_day; // jshint ignore:line\n  this.jobSid = payload.job_sid; // jshint ignore:line\n  this.webhookUrl = payload.webhook_url; // jshint ignore:line\n  this.webhookMethod = payload.webhook_method; // jshint ignore:line\n  this.email = payload.email; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.jobQueuePosition = payload.job_queue_position; // jshint ignore:line\n  this.estimatedCompletionTime = payload.estimated_completion_time; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {jobSid: jobSid || this.jobSid, };\n};\n\nObject.defineProperty(JobInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new JobContext(this._version, this._solution.jobSid);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a JobInstance\n *\n * @function fetch\n * @memberof Twilio.Bulkexports.V1.ExportContext.JobInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed JobInstance\n */\n/* jshint ignore:end */\nJobInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * remove a JobInstance\n *\n * @function remove\n * @memberof Twilio.Bulkexports.V1.ExportContext.JobInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed JobInstance\n */\n/* jshint ignore:end */\nJobInstance.prototype.remove = function remove(callback) {\n  return this._proxy.remove(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportContext.JobInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nJobInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nJobInstance.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the JobContext\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext.JobContext\n *\n * @param {V1} version - Version of the resource\n * @param {sid} jobSid -\n *          The unique string that that we created to identify the Bulk Export job\n */\n/* jshint ignore:end */\nJobContext = function JobContext(version, jobSid) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {jobSid: jobSid, };\n  this._uri = `/Exports/Jobs/${jobSid}`;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a JobInstance\n *\n * @function fetch\n * @memberof Twilio.Bulkexports.V1.ExportContext.JobContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed JobInstance\n */\n/* jshint ignore:end */\nJobContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new JobInstance(this._version, payload, this._solution.jobSid));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * remove a JobInstance\n *\n * @function remove\n * @memberof Twilio.Bulkexports.V1.ExportContext.JobContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed JobInstance\n */\n/* jshint ignore:end */\nJobContext.prototype.remove = function remove(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.remove({uri: this._uri, method: 'DELETE'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(payload);\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportContext.JobContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nJobContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nJobContext.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  JobList: JobList,\n  JobPage: JobPage,\n  JobInstance: JobInstance,\n  JobContext: JobContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar Q = require('q');  /* jshint ignore:line */\nvar _ = require('lodash');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar DayList = require('./export/day').DayList;\nvar ExportCustomJobList = require(\n    './export/exportCustomJob').ExportCustomJobList;\nvar JobList = require('./export/job').JobList;\nvar Page = require('../../../base/Page');  /* jshint ignore:line */\nvar values = require('../../../base/values');  /* jshint ignore:line */\n\nvar ExportList;\nvar ExportPage;\nvar ExportInstance;\nvar ExportContext;\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportList\n *\n * @constructor Twilio.Bulkexports.V1.ExportList\n *\n * @param {Twilio.Bulkexports.V1} version - Version of the resource\n */\n/* jshint ignore:end */\nExportList = function ExportList(version) {\n  /* jshint ignore:start */\n  /**\n   * @function exports\n   * @memberof Twilio.Bulkexports.V1#\n   *\n   * @param {string} sid - sid of instance\n   *\n   * @returns {Twilio.Bulkexports.V1.ExportContext}\n   */\n  /* jshint ignore:end */\n  function ExportListInstance(sid) {\n    return ExportListInstance.get(sid);\n  }\n\n  ExportListInstance._version = version;\n  // Path Solution\n  ExportListInstance._solution = {};\n\n  // Components\n  ExportListInstance._jobs = undefined;\n\n  /* jshint ignore:start */\n  /**\n   * Constructs a export\n   *\n   * @function get\n   * @memberof Twilio.Bulkexports.V1.ExportList#\n   *\n   * @param {string} resourceType -\n   *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n   *\n   * @returns {Twilio.Bulkexports.V1.ExportContext}\n   */\n  /* jshint ignore:end */\n  ExportListInstance.get = function get(resourceType) {\n    return new ExportContext(this._version, resourceType);\n  };\n\n  Object.defineProperty(ExportListInstance,\n    'jobs', {\n      get: function jobs() {\n        if (!this._jobs) {\n          this._jobs = new JobList(this._version);\n        }\n\n        return this._jobs;\n      }\n  });\n\n  /* jshint ignore:start */\n  /**\n   * Provide a user-friendly representation\n   *\n   * @function toJSON\n   * @memberof Twilio.Bulkexports.V1.ExportList#\n   *\n   * @returns Object\n   */\n  /* jshint ignore:end */\n  ExportListInstance.toJSON = function toJSON() {\n    return this._solution;\n  };\n\n  ExportListInstance[util.inspect.custom] = function inspect(depth, options) {\n    return util.inspect(this.toJSON(), options);\n  };\n\n  return ExportListInstance;\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportPage\n *\n * @constructor Twilio.Bulkexports.V1.ExportPage\n *\n * @param {V1} version - Version of the resource\n * @param {Response<string>} response - Response from the API\n * @param {ExportSolution} solution - Path solution\n *\n * @returns ExportPage\n */\n/* jshint ignore:end */\nExportPage = function ExportPage(version, response, solution) {\n  // Path Solution\n  this._solution = solution;\n\n  Page.prototype.constructor.call(this, version, response, this._solution);\n};\n\n_.extend(ExportPage.prototype, Page.prototype);\nExportPage.prototype.constructor = ExportPage;\n\n/* jshint ignore:start */\n/**\n * Build an instance of ExportInstance\n *\n * @function getInstance\n * @memberof Twilio.Bulkexports.V1.ExportPage#\n *\n * @param {ExportPayload} payload - Payload response from the API\n *\n * @returns ExportInstance\n */\n/* jshint ignore:end */\nExportPage.prototype.getInstance = function getInstance(payload) {\n  return new ExportInstance(this._version, payload);\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportPage#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportPage.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportPage.prototype[util.inspect.custom] = function inspect(depth, options) {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportContext\n *\n * @constructor Twilio.Bulkexports.V1.ExportInstance\n *\n * @property {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n * @property {string} url - The URL of this resource.\n * @property {string} links - Nested resource URLs.\n *\n * @param {V1} version - Version of the resource\n * @param {ExportPayload} payload - The instance payload\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportInstance = function ExportInstance(version, payload, resourceType) {\n  this._version = version;\n\n  // Marshaled Properties\n  this.resourceType = payload.resource_type; // jshint ignore:line\n  this.url = payload.url; // jshint ignore:line\n  this.links = payload.links; // jshint ignore:line\n\n  // Context\n  this._context = undefined;\n  this._solution = {resourceType: resourceType || this.resourceType, };\n};\n\nObject.defineProperty(ExportInstance.prototype,\n  '_proxy', {\n    get: function() {\n      if (!this._context) {\n        this._context = new ExportContext(this._version, this._solution.resourceType);\n      }\n\n      return this._context;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * fetch a ExportInstance\n *\n * @function fetch\n * @memberof Twilio.Bulkexports.V1.ExportInstance#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportInstance\n */\n/* jshint ignore:end */\nExportInstance.prototype.fetch = function fetch(callback) {\n  return this._proxy.fetch(callback);\n};\n\n/* jshint ignore:start */\n/**\n * Access the days\n *\n * @function days\n * @memberof Twilio.Bulkexports.V1.ExportInstance#\n *\n * @returns {Twilio.Bulkexports.V1.ExportContext.DayList}\n */\n/* jshint ignore:end */\nExportInstance.prototype.days = function days() {\n  return this._proxy.days;\n};\n\n/* jshint ignore:start */\n/**\n * Access the exportCustomJobs\n *\n * @function exportCustomJobs\n * @memberof Twilio.Bulkexports.V1.ExportInstance#\n *\n * @returns {Twilio.Bulkexports.V1.ExportContext.ExportCustomJobList}\n */\n/* jshint ignore:end */\nExportInstance.prototype.exportCustomJobs = function exportCustomJobs() {\n  return this._proxy.exportCustomJobs;\n};\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportInstance#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportInstance.prototype.toJSON = function toJSON() {\n  let clone = {};\n  _.forOwn(this, function(value, key) {\n    if (!_.startsWith(key, '_') && ! _.isFunction(value)) {\n      clone[key] = value;\n    }\n  });\n  return clone;\n};\n\nExportInstance.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\n\n/* jshint ignore:start */\n/**\n * Initialize the ExportContext\n *\n * @constructor Twilio.Bulkexports.V1.ExportContext\n *\n * @property {Twilio.Bulkexports.V1.ExportContext.DayList} days - days resource\n * @property {Twilio.Bulkexports.V1.ExportContext.ExportCustomJobList} exportCustomJobs -\n *          exportCustomJobs resource\n *\n * @param {V1} version - Version of the resource\n * @param {string} resourceType -\n *          The type of communication \u2013 Messages, Calls, Conferences, and Participants\n */\n/* jshint ignore:end */\nExportContext = function ExportContext(version, resourceType) {\n  this._version = version;\n\n  // Path Solution\n  this._solution = {resourceType: resourceType, };\n  this._uri = `/Exports/${resourceType}`;\n\n  // Dependents\n  this._days = undefined;\n  this._exportCustomJobs = undefined;\n};\n\n/* jshint ignore:start */\n/**\n * fetch a ExportInstance\n *\n * @function fetch\n * @memberof Twilio.Bulkexports.V1.ExportContext#\n *\n * @param {function} [callback] - Callback to handle processed record\n *\n * @returns {Promise} Resolves to processed ExportInstance\n */\n/* jshint ignore:end */\nExportContext.prototype.fetch = function fetch(callback) {\n  var deferred = Q.defer();\n  var promise = this._version.fetch({uri: this._uri, method: 'GET'});\n\n  promise = promise.then(function(payload) {\n    deferred.resolve(new ExportInstance(this._version, payload, this._solution.resourceType));\n  }.bind(this));\n\n  promise.catch(function(error) {\n    deferred.reject(error);\n  });\n\n  if (_.isFunction(callback)) {\n    deferred.promise.nodeify(callback);\n  }\n\n  return deferred.promise;\n};\n\nObject.defineProperty(ExportContext.prototype,\n  'days', {\n    get: function() {\n      if (!this._days) {\n        this._days = new DayList(this._version, this._solution.resourceType);\n      }\n      return this._days;\n    }\n});\n\nObject.defineProperty(ExportContext.prototype,\n  'exportCustomJobs', {\n    get: function() {\n      if (!this._exportCustomJobs) {\n        this._exportCustomJobs = new ExportCustomJobList(this._version, this._solution.resourceType);\n      }\n      return this._exportCustomJobs;\n    }\n});\n\n/* jshint ignore:start */\n/**\n * Provide a user-friendly representation\n *\n * @function toJSON\n * @memberof Twilio.Bulkexports.V1.ExportContext#\n *\n * @returns Object\n */\n/* jshint ignore:end */\nExportContext.prototype.toJSON = function toJSON() {\n  return this._solution;\n};\n\nExportContext.prototype[util.inspect.custom] = function inspect(depth, options)\n    {\n  return util.inspect(this.toJSON(), options);\n};\n\nmodule.exports = {\n  ExportList: ExportList,\n  ExportPage: ExportPage,\n  ExportInstance: ExportInstance,\n  ExportContext: ExportContext\n};\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar ExportConfigurationList = require(\n    './v1/exportConfiguration').ExportConfigurationList;\nvar ExportList = require('./v1/export').ExportList;\nvar Version = require('../../base/Version');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize the V1 version of Bulkexports\n *\n * @constructor Twilio.Bulkexports.V1\n *\n * @property {Twilio.Bulkexports.V1.ExportList} exports - exports resource\n * @property {Twilio.Bulkexports.V1.ExportConfigurationList} exportConfiguration -\n *          exportConfiguration resource\n *\n * @param {Twilio.Bulkexports} domain - The twilio domain\n */\n/* jshint ignore:end */\nfunction V1(domain) {\n  Version.prototype.constructor.call(this, domain, 'v1');\n\n  // Resources\n  this._exports = undefined;\n  this._exportConfiguration = undefined;\n}\n\n_.extend(V1.prototype, Version.prototype);\nV1.prototype.constructor = V1;\n\nObject.defineProperty(V1.prototype,\n  'exports', {\n    get: function() {\n      this._exports = this._exports || new ExportList(this);\n      return this._exports;\n    }\n});\n\nObject.defineProperty(V1.prototype,\n  'exportConfiguration', {\n    get: function() {\n      this._exportConfiguration = this._exportConfiguration || new ExportConfigurationList(this);\n      return this._exportConfiguration;\n    }\n});\n\nmodule.exports = V1;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar _ = require('lodash');  /* jshint ignore:line */\nvar Domain = require('../base/Domain');  /* jshint ignore:line */\nvar V1 = require('./bulkexports/V1');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Initialize bulkexports domain\n *\n * @constructor Twilio.Bulkexports\n *\n * @property {Twilio.Bulkexports.V1} v1 - v1 version\n * @property {Twilio.Bulkexports.V1.ExportList} exports - exports resource\n * @property {Twilio.Bulkexports.V1.ExportConfigurationList} exportConfiguration -\n *          exportConfiguration resource\n *\n * @param {Twilio} twilio - The twilio client\n */\n/* jshint ignore:end */\nfunction Bulkexports(twilio) {\n  Domain.prototype.constructor.call(this, twilio, 'https://bulkexports.twilio.com');\n\n  // Versions\n  this._v1 = undefined;\n}\n\n_.extend(Bulkexports.prototype, Domain.prototype);\nBulkexports.prototype.constructor = Bulkexports;\n\nObject.defineProperty(Bulkexports.prototype,\n  'v1', {\n    get: function() {\n      this._v1 = this._v1 || new V1(this);\n      return this._v1;\n    }\n});\n\nObject.defineProperty(Bulkexports.prototype,\n  'exports', {\n    get: function() {\n      return this.v1.exports;\n    }\n});\n\nObject.defineProperty(Bulkexports.prototype,\n  'exportConfiguration', {\n    get: function() {\n      return this.v1.exportConfiguration;\n    }\n});\n\nmodule.exports = Bulkexports;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar os = require('os');  /* jshint ignore:line */\nvar url = require('url');  /* jshint ignore:line */\nvar moduleInfo = require('../../package.json');  /* jshint ignore:line */\nvar util = require('util');  /* jshint ignore:line */\nvar RestException = require('../base/RestException');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * Twilio Client to interact with the Rest API\n *\n * @constructor Twilio\n *\n * @property {Twilio.Accounts} accounts - accounts domain\n * @property {Twilio.Api} api - api domain\n * @property {Twilio.Autopilot} autopilot - autopilot domain\n * @property {Twilio.Chat} chat - chat domain\n * @property {Twilio.Conversations} conversations - conversations domain\n * @property {Twilio.Events} events - events domain\n * @property {Twilio.Fax} fax - fax domain\n * @property {Twilio.FlexApi} flexApi - flex_api domain\n * @property {Twilio.FrontlineApi} frontlineApi - frontline_api domain\n * @property {Twilio.Insights} insights - insights domain\n * @property {Twilio.IpMessaging} ipMessaging - ip_messaging domain\n * @property {Twilio.Lookups} lookups - lookups domain\n * @property {Twilio.Media} media - media domain\n * @property {Twilio.Messaging} messaging - messaging domain\n * @property {Twilio.Monitor} monitor - monitor domain\n * @property {Twilio.Notify} notify - notify domain\n * @property {Twilio.Numbers} numbers - numbers domain\n * @property {Twilio.Preview} preview - preview domain\n * @property {Twilio.Pricing} pricing - pricing domain\n * @property {Twilio.Proxy} proxy - proxy domain\n * @property {Twilio.Serverless} serverless - serverless domain\n * @property {Twilio.Studio} studio - studio domain\n * @property {Twilio.Sync} sync - sync domain\n * @property {Twilio.Taskrouter} taskrouter - taskrouter domain\n * @property {Twilio.Trunking} trunking - trunking domain\n * @property {Twilio.Trusthub} trusthub - trusthub domain\n * @property {Twilio.Verify} verify - verify domain\n * @property {Twilio.Video} video - video domain\n * @property {Twilio.Voice} voice - voice domain\n * @property {Twilio.Wireless} wireless - wireless domain\n * @property {Twilio.Supersim} supersim - supersim domain\n * @property {Twilio.Bulkexports} bulkexports - bulkexports domain\n * @property {Twilio.Api.V2010.AccountContext.AddressList} addresses -\n *          addresses resource\n * @property {Twilio.Api.V2010.AccountContext.ApplicationList} applications -\n *          applications resource\n * @property {Twilio.Api.V2010.AccountContext.AuthorizedConnectAppList} authorizedConnectApps -\n *          authorizedConnectApps resource\n * @property {Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryList} availablePhoneNumbers -\n *          availablePhoneNumbers resource\n * @property {Twilio.Api.V2010.AccountContext.BalanceList} balance -\n *          balance resource\n * @property {Twilio.Api.V2010.AccountContext.CallList} calls - calls resource\n * @property {Twilio.Api.V2010.AccountContext.ConferenceList} conferences -\n *          conferences resource\n * @property {Twilio.Api.V2010.AccountContext.ConnectAppList} connectApps -\n *          connectApps resource\n * @property {Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList} incomingPhoneNumbers -\n *          incomingPhoneNumbers resource\n * @property {Twilio.Api.V2010.AccountContext.KeyList} keys - keys resource\n * @property {Twilio.Api.V2010.AccountContext.MessageList} messages -\n *          messages resource\n * @property {Twilio.Api.V2010.AccountContext.NewKeyList} newKeys -\n *          newKeys resource\n * @property {Twilio.Api.V2010.AccountContext.NewSigningKeyList} newSigningKeys -\n *          newSigningKeys resource\n * @property {Twilio.Api.V2010.AccountContext.NotificationList} notifications -\n *          notifications resource\n * @property {Twilio.Api.V2010.AccountContext.OutgoingCallerIdList} outgoingCallerIds -\n *          outgoingCallerIds resource\n * @property {Twilio.Api.V2010.AccountContext.QueueList} queues - queues resource\n * @property {Twilio.Api.V2010.AccountContext.RecordingList} recordings -\n *          recordings resource\n * @property {Twilio.Api.V2010.AccountContext.SigningKeyList} signingKeys -\n *          signingKeys resource\n * @property {Twilio.Api.V2010.AccountContext.SipList} sip - sip resource\n * @property {Twilio.Api.V2010.AccountContext.ShortCodeList} shortCodes -\n *          shortCodes resource\n * @property {Twilio.Api.V2010.AccountContext.TokenList} tokens - tokens resource\n * @property {Twilio.Api.V2010.AccountContext.TranscriptionList} transcriptions -\n *          transcriptions resource\n * @property {Twilio.Api.V2010.AccountContext.UsageList} usage - usage resource\n * @property {Twilio.Api.V2010.AccountContext.ValidationRequestList} validationRequests -\n *          validationRequests resource\n *\n * @param {string} username -\n *          The username used for authentication. This is normally account sid, but if using key/secret auth will be the api key sid.\n * @param {string} password -\n *          The password used for authentication. This is normally auth token, but if using key/secret auth will be the secret.\n * @param {object} [opts] - The options argument\n * @param {RequestClient} [opts.httpClient] -\n *          The client used for http requests. Defaults to RequestClient\n * @param {string} [opts.accountSid] -\n *          The default accountSid. This is set to username if not provided\n * @param {object} [opts.env] - The environment object. Defaults to process.env\n * @param {string} [opts.edge] - Twilio edge to use. Defaults to none\n * @param {string} [opts.region] -\n *          Twilio region to use. Defaults to us1 if edge defined\n * @param {boolean} [opts.lazyLoading] -\n *          Enable lazy loading, loading time will decrease if enabled\n * @param {string} [opts.logLevel] - Debug logs will be shown. Defaults to none\n * @param {string[]} [opts.userAgentExtensions] -\n *          Additions to the user agent string\n *\n * @returns {Twilio} A new instance of Twilio client\n */\n/* jshint ignore:end */\nfunction Twilio(username, password, opts) {\n  opts = opts || {};\n  var env = opts.env || process.env;\n\n  this.username = username || env.TWILIO_ACCOUNT_SID;\n  this.password = password || env.TWILIO_AUTH_TOKEN;\n  this.accountSid = opts.accountSid || this.username;\n  this._httpClient = opts.httpClient;\n  if (!opts.lazyLoading) {\n    this._httpClient = this.httpClient;\n  }\n  this.edge = opts.edge || env.TWILIO_EDGE;\n  this.region = opts.region || env.TWILIO_REGION;\n  this.logLevel = opts.logLevel || env.TWILIO_LOG_LEVEL;\n  this.userAgentExtensions = opts.userAgentExtensions || [];\n\n  if (!this.username) {\n    throw new Error('username is required');\n  }\n\n  if (!this.password) {\n    throw new Error('password is required');\n  }\n\n  if (!this.accountSid.startsWith('AC')) {\n    throw new Error('accountSid must start with AC');\n  }\n\n  // Domains\n  this._accounts = undefined;\n  this._api = undefined;\n  this._autopilot = undefined;\n  this._chat = undefined;\n  this._conversations = undefined;\n  this._events = undefined;\n  this._fax = undefined;\n  this._flexApi = undefined;\n  this._frontlineApi = undefined;\n  this._insights = undefined;\n  this._ipMessaging = undefined;\n  this._lookups = undefined;\n  this._media = undefined;\n  this._messaging = undefined;\n  this._monitor = undefined;\n  this._notify = undefined;\n  this._numbers = undefined;\n  this._preview = undefined;\n  this._pricing = undefined;\n  this._proxy = undefined;\n  this._serverless = undefined;\n  this._studio = undefined;\n  this._sync = undefined;\n  this._taskrouter = undefined;\n  this._trunking = undefined;\n  this._trusthub = undefined;\n  this._verify = undefined;\n  this._video = undefined;\n  this._voice = undefined;\n  this._wireless = undefined;\n  this._supersim = undefined;\n  this._bulkexports = undefined;\n\n  if (!opts.lazyLoading) {\n    this.accounts;\n    this.api;\n    this.autopilot;\n    this.chat;\n    this.conversations;\n    this.events;\n    this.fax;\n    this.flexApi;\n    this.frontlineApi;\n    this.insights;\n    this.ipMessaging;\n    this.lookups;\n    this.media;\n    this.messaging;\n    this.monitor;\n    this.notify;\n    this.numbers;\n    this.preview;\n    this.pricing;\n    this.proxy;\n    this.serverless;\n    this.studio;\n    this.sync;\n    this.taskrouter;\n    this.trunking;\n    this.trusthub;\n    this.verify;\n    this.video;\n    this.voice;\n    this.wireless;\n    this.supersim;\n    this.bulkexports;\n  }\n}\n\n/* jshint ignore:start */\n/**\n * Makes a request to the Twilio API using the configured http client.\n * Authentication information is automatically added if none is provided.\n *\n * @function request\n * @memberof Twilio#\n *\n * @param {object} opts - The options argument\n * @param {string} opts.method - The http method\n * @param {string} opts.uri - The request uri\n * @param {string} [opts.username] - The username used for auth\n * @param {string} [opts.password] - The password used for auth\n * @param {object} [opts.headers] - The request headers\n * @param {object} [opts.params] - The request params\n * @param {object} [opts.data] - The request data\n * @param {int} [opts.timeout] - The request timeout in milliseconds\n * @param {boolean} [opts.allowRedirects] - Should the client follow redirects\n * @param {string} [opts.logLevel] - Show debug logs\n */\n/* jshint ignore:end */\nTwilio.prototype.request = function request(opts) {\n  opts = opts || {};\n\n  if (!opts.method) {\n    throw new Error('method is required');\n  }\n\n  if (!opts.uri) {\n    throw new Error('uri is required');\n  }\n\n  var username = opts.username || this.username;\n  var password = opts.password || this.password;\n\n  var headers = opts.headers || {};\n\n  var pkgVersion = moduleInfo.version;\n  var osName = os.platform();\n  var osArch = os.arch();\n  var nodeVersion = process.version;\n  headers['User-Agent'] = util.format(\n    'twilio-node/%s (%s %s) node/%s',\n    pkgVersion,\n    osName,\n    osArch,\n    nodeVersion\n  );\n  this.userAgentExtensions.forEach(extension => {\n    headers['User-Agent'] += ` ${extension}`;\n  });\n  headers['Accept-Charset'] = 'utf-8';\n\n  if (opts.method === 'POST' && !headers['Content-Type']) {\n    headers['Content-Type'] = 'application/x-www-form-urlencoded';\n  }\n\n  if (!headers.Accept) {\n    headers.Accept = 'application/json';\n  }\n\n  var uri = new url.URL(opts.uri);\n  uri.hostname = this.getHostname(uri.hostname, this.edge, this.region);\n\n  return this.httpClient.request({\n    method: opts.method,\n    uri: uri.href,\n    username: username,\n    password: password,\n    headers: headers,\n    params: opts.params,\n    data: opts.data,\n    timeout: opts.timeout,\n    allowRedirects: opts.allowRedirects,\n    logLevel: opts.logLevel || this.logLevel\n  });\n};\n\n/* jshint ignore:start */\n/**\n * Adds a region and/or edge to a given hostname\n *\n * @function getHostname\n * @memberof Twilio#\n *\n * @param {string} hostname - A URI hostname (e.g. api.twilio.com)\n * @param {string} targetEdge - The targeted edge location (e.g. sydney)\n * @param {string} targetRegion - The targeted region location (e.g. au1)\n */\n/* jshint ignore:end */\nTwilio.prototype.getHostname = function getHostname(hostname, targetEdge,\n                                                     targetRegion) {\n  const defaultRegion = 'us1';\n\n  const domain = hostname.split('.').slice(-2).join('.');\n  const prefix = hostname.split('.' + domain)[0];\n  let [product, edge, region] = prefix.split('.');\n  if (edge && !region) {\n    region = edge;\n    edge = undefined;\n  }\n\n  region = targetRegion || region || (targetEdge && defaultRegion);\n  if (!region) {\n    return hostname;\n  }\n  edge = targetEdge || edge;\n\n  return [product, edge, region, domain].filter(part => part).join('.');\n};\n\n/* jshint ignore:start */\n/**\n * Validates that a request to the new SSL certificate is successful.\n *\n * @throws {RestException} if the request fails\n *\n * @function validateSslCert\n * @memberof Twilio#\n */\n/* jshint ignore:end */\nTwilio.prototype.validateSslCert = function validateSslCert() {\n  return this.httpClient.request({\n    method: 'GET',\n    uri: 'https://api.twilio.com:8443/2010-04-01/.json',\n  }).then((response) => {\n    if (response.statusCode < 200 || response.statusCode >= 300) {\n      throw new RestException(response);\n    }\n\n    return response;\n  });\n};\n\nObject.defineProperty(Twilio.prototype,\n  'httpClient', {\n    get: function() {\n      if (!this._httpClient) {\n        var RequestClient = require('../base/RequestClient');  /* jshint ignore:line */\n        this._httpClient = new RequestClient();\n      }\n      return this._httpClient;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'accounts', {\n    get: function() {\n      if (!this._accounts) {\n        var Accounts = require('./Accounts');  /* jshint ignore:line */\n        this._accounts = new Accounts(this);\n      }\n      return this._accounts;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'api', {\n    get: function() {\n      if (!this._api) {\n        var Api = require('./Api');  /* jshint ignore:line */\n        this._api = new Api(this);\n      }\n      return this._api;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'autopilot', {\n    get: function() {\n      if (!this._autopilot) {\n        var Autopilot = require('./Autopilot');  /* jshint ignore:line */\n        this._autopilot = new Autopilot(this);\n      }\n      return this._autopilot;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'chat', {\n    get: function() {\n      if (!this._chat) {\n        var Chat = require('./Chat');  /* jshint ignore:line */\n        this._chat = new Chat(this);\n      }\n      return this._chat;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'conversations', {\n    get: function() {\n      if (!this._conversations) {\n        var Conversations = require('./Conversations');  /* jshint ignore:line */\n        this._conversations = new Conversations(this);\n      }\n      return this._conversations;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'events', {\n    get: function() {\n      if (!this._events) {\n        var Events = require('./Events');  /* jshint ignore:line */\n        this._events = new Events(this);\n      }\n      return this._events;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'fax', {\n    get: function() {\n      if (!this._fax) {\n        var Fax = require('./Fax');  /* jshint ignore:line */\n        this._fax = new Fax(this);\n      }\n      return this._fax;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'flexApi', {\n    get: function() {\n      if (!this._flexApi) {\n        var FlexApi = require('./FlexApi');  /* jshint ignore:line */\n        this._flexApi = new FlexApi(this);\n      }\n      return this._flexApi;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'frontlineApi', {\n    get: function() {\n      if (!this._frontlineApi) {\n        var FrontlineApi = require('./FrontlineApi');  /* jshint ignore:line */\n        this._frontlineApi = new FrontlineApi(this);\n      }\n      return this._frontlineApi;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'insights', {\n    get: function() {\n      if (!this._insights) {\n        var Insights = require('./Insights');  /* jshint ignore:line */\n        this._insights = new Insights(this);\n      }\n      return this._insights;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'ipMessaging', {\n    get: function() {\n      if (!this._ipMessaging) {\n        var IpMessaging = require('./IpMessaging');  /* jshint ignore:line */\n        this._ipMessaging = new IpMessaging(this);\n      }\n      return this._ipMessaging;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'lookups', {\n    get: function() {\n      if (!this._lookups) {\n        var Lookups = require('./Lookups');  /* jshint ignore:line */\n        this._lookups = new Lookups(this);\n      }\n      return this._lookups;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'media', {\n    get: function() {\n      if (!this._media) {\n        var Media = require('./Media');  /* jshint ignore:line */\n        this._media = new Media(this);\n      }\n      return this._media;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'messaging', {\n    get: function() {\n      if (!this._messaging) {\n        var Messaging = require('./Messaging');  /* jshint ignore:line */\n        this._messaging = new Messaging(this);\n      }\n      return this._messaging;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'monitor', {\n    get: function() {\n      if (!this._monitor) {\n        var Monitor = require('./Monitor');  /* jshint ignore:line */\n        this._monitor = new Monitor(this);\n      }\n      return this._monitor;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'notify', {\n    get: function() {\n      if (!this._notify) {\n        var Notify = require('./Notify');  /* jshint ignore:line */\n        this._notify = new Notify(this);\n      }\n      return this._notify;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'numbers', {\n    get: function() {\n      if (!this._numbers) {\n        var Numbers = require('./Numbers');  /* jshint ignore:line */\n        this._numbers = new Numbers(this);\n      }\n      return this._numbers;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'preview', {\n    get: function() {\n      if (!this._preview) {\n        var Preview = require('./Preview');  /* jshint ignore:line */\n        this._preview = new Preview(this);\n      }\n      return this._preview;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'pricing', {\n    get: function() {\n      if (!this._pricing) {\n        var Pricing = require('./Pricing');  /* jshint ignore:line */\n        this._pricing = new Pricing(this);\n      }\n      return this._pricing;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'proxy', {\n    get: function() {\n      if (!this._proxy) {\n        var Proxy = require('./Proxy');  /* jshint ignore:line */\n        this._proxy = new Proxy(this);\n      }\n      return this._proxy;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'serverless', {\n    get: function() {\n      if (!this._serverless) {\n        var Serverless = require('./Serverless');  /* jshint ignore:line */\n        this._serverless = new Serverless(this);\n      }\n      return this._serverless;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'studio', {\n    get: function() {\n      if (!this._studio) {\n        var Studio = require('./Studio');  /* jshint ignore:line */\n        this._studio = new Studio(this);\n      }\n      return this._studio;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'sync', {\n    get: function() {\n      if (!this._sync) {\n        var Sync = require('./Sync');  /* jshint ignore:line */\n        this._sync = new Sync(this);\n      }\n      return this._sync;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'taskrouter', {\n    get: function() {\n      if (!this._taskrouter) {\n        var Taskrouter = require('./Taskrouter');  /* jshint ignore:line */\n        this._taskrouter = new Taskrouter(this);\n      }\n      return this._taskrouter;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'trunking', {\n    get: function() {\n      if (!this._trunking) {\n        var Trunking = require('./Trunking');  /* jshint ignore:line */\n        this._trunking = new Trunking(this);\n      }\n      return this._trunking;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'trusthub', {\n    get: function() {\n      if (!this._trusthub) {\n        var Trusthub = require('./Trusthub');  /* jshint ignore:line */\n        this._trusthub = new Trusthub(this);\n      }\n      return this._trusthub;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'verify', {\n    get: function() {\n      if (!this._verify) {\n        var Verify = require('./Verify');  /* jshint ignore:line */\n        this._verify = new Verify(this);\n      }\n      return this._verify;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'video', {\n    get: function() {\n      if (!this._video) {\n        var Video = require('./Video');  /* jshint ignore:line */\n        this._video = new Video(this);\n      }\n      return this._video;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'voice', {\n    get: function() {\n      if (!this._voice) {\n        var Voice = require('./Voice');  /* jshint ignore:line */\n        this._voice = new Voice(this);\n      }\n      return this._voice;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'wireless', {\n    get: function() {\n      if (!this._wireless) {\n        var Wireless = require('./Wireless');  /* jshint ignore:line */\n        this._wireless = new Wireless(this);\n      }\n      return this._wireless;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'supersim', {\n    get: function() {\n      if (!this._supersim) {\n        var Supersim = require('./Supersim');  /* jshint ignore:line */\n        this._supersim = new Supersim(this);\n      }\n      return this._supersim;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'bulkexports', {\n    get: function() {\n      if (!this._bulkexports) {\n        var Bulkexports = require('./Bulkexports');  /* jshint ignore:line */\n        this._bulkexports = new Bulkexports(this);\n      }\n      return this._bulkexports;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'addresses', {\n    get: function() {\n      return this.api.account.addresses;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'applications', {\n    get: function() {\n      return this.api.account.applications;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'authorizedConnectApps', {\n    get: function() {\n      return this.api.account.authorizedConnectApps;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'availablePhoneNumbers', {\n    get: function() {\n      return this.api.account.availablePhoneNumbers;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'balance', {\n    get: function() {\n      return this.api.account.balance;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'calls', {\n    get: function() {\n      return this.api.account.calls;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'conferences', {\n    get: function() {\n      return this.api.account.conferences;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'connectApps', {\n    get: function() {\n      return this.api.account.connectApps;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'incomingPhoneNumbers', {\n    get: function() {\n      return this.api.account.incomingPhoneNumbers;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'keys', {\n    get: function() {\n      return this.api.account.keys;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'messages', {\n    get: function() {\n      return this.api.account.messages;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'newKeys', {\n    get: function() {\n      return this.api.account.newKeys;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'newSigningKeys', {\n    get: function() {\n      return this.api.account.newSigningKeys;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'notifications', {\n    get: function() {\n      return this.api.account.notifications;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'outgoingCallerIds', {\n    get: function() {\n      return this.api.account.outgoingCallerIds;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'queues', {\n    get: function() {\n      return this.api.account.queues;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'recordings', {\n    get: function() {\n      return this.api.account.recordings;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'signingKeys', {\n    get: function() {\n      return this.api.account.signingKeys;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'sip', {\n    get: function() {\n      return this.api.account.sip;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'shortCodes', {\n    get: function() {\n      return this.api.account.shortCodes;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'tokens', {\n    get: function() {\n      return this.api.account.tokens;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'transcriptions', {\n    get: function() {\n      return this.api.account.transcriptions;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'usage', {\n    get: function() {\n      return this.api.account.usage;\n    }\n});\n\nObject.defineProperty(Twilio.prototype,\n  'validationRequests', {\n    get: function() {\n      return this.api.account.validationRequests;\n    }\n});\n\nmodule.exports = Twilio;\n", "'use strict';\n\nvar crypto = require('crypto');\nvar _ = require('lodash');\nvar scmp = require('scmp');\nvar urllib = require('url');\nvar Url = require('url-parse');\n\n/**\n * Utility function to construct the URL string, since Node.js url library won't include standard port numbers\n *\n * @param {Url} parsedUrl - The parsed url object that Twilio requested on your server\n * @returns {string} - URL with standard port number included\n */\nfunction buildUrlWithStandardPort(parsedUrl) {\n  let url = '';\n  const port = parsedUrl.protocol === 'https:' ? ':443' : ':80';\n\n  url += parsedUrl.protocol ? parsedUrl.protocol + '//' : '';\n  url += parsedUrl.username;\n  url += parsedUrl.password ? ':' + parsedUrl.password : '';\n  url += (parsedUrl.username || parsedUrl.password) ? '@' : '';\n  url += parsedUrl.host ? parsedUrl.host + port : '';\n  url += parsedUrl.pathname + parsedUrl.query + parsedUrl.hash;\n\n  return url;\n}\n\n/**\n Utility function to add a port number to a URL\n\n @param {Url} parsedUrl - The parsed url object that Twilio requested on your server\n @returns {string} - URL with port\n */\nfunction addPort(parsedUrl) {\n  if (!parsedUrl.port) {\n    return buildUrlWithStandardPort(parsedUrl);\n  }\n  return parsedUrl.toString();\n}\n\n/**\n Utility function to remove a port number from a URL\n\n @param {Url} parsedUrl - The parsed url object that Twilio requested on your server\n @returns {string} - URL without port\n */\nfunction removePort(parsedUrl) {\n  parsedUrl.set('port', '');\n  return parsedUrl.toString();\n}\n\n/**\n Utility function to convert request parameter to a string format\n\n @param {string} paramName - The request parameter name\n @param {string|array<string>} paramValue - The request parameter value\n @returns {string} - Formatted parameter string\n */\nfunction toFormUrlEncodedParam(paramName, paramValue) {\n  if (paramValue instanceof Array) {\n    return paramValue\n      .map(val => toFormUrlEncodedParam(paramName, val))\n      .reduce((acc, val) => acc + val, '');\n  }\n  return paramName + paramValue;\n}\n\n/**\n Utility function to get the expected signature for a given request\n\n @param {string} authToken - The auth token, as seen in the Twilio portal\n @param {string} url - The full URL (with query string) you configured to handle this request\n @param {object} params - the parameters sent with this request\n @returns {string} - signature\n */\nfunction getExpectedTwilioSignature(authToken, url, params) {\n  if (url.indexOf('bodySHA256') !== -1 && params === null) {\n    params = {};\n  }\n\n  var data = Object.keys(params)\n    .sort()\n    .reduce((acc, key) => acc + toFormUrlEncodedParam(key, params[key]), url);\n\n  return crypto\n    .createHmac('sha1', authToken)\n    .update(Buffer.from(data, 'utf-8'))\n    .digest('base64');\n}\n\n/**\n Utility function to get the expected body hash for a given request's body\n\n @param {string} body - The plain-text body of the request\n */\nfunction getExpectedBodyHash(body) {\n  return crypto\n    .createHash('sha256')\n    .update(Buffer.from(body, 'utf-8'))\n    .digest('hex');\n}\n\n/**\n Utility function to validate an incoming request is indeed from Twilio\n\n @param {string} authToken - The auth token, as seen in the Twilio portal\n @param {string} header - The value of the X-Twilio-Signature or X-SignalWire-Signature header from the request\n @param {string} url - The full URL (with query string) you configured to handle this request\n @param {object} params - the parameters sent with this request\n @returns {boolean} - valid\n */\nfunction validateRequest(authToken, twilioHeader, url, params, suppressWarning) {\n  twilioHeader = twilioHeader || '';\n  const urlObject = new Url(url);\n  const urlWithPort = addPort(urlObject);\n  const urlWithoutPort = removePort(urlObject);\n\n  /*\n   *  Check signature of the url with and without the port number\n   *  since signature generation on the back end is inconsistent\n   */\n  const signatureWithPort = getExpectedTwilioSignature(authToken, urlWithPort, params);\n  const signatureWithoutPort = getExpectedTwilioSignature(authToken, urlWithoutPort, params);\n  const validSignatureWithPort = scmp(Buffer.from(twilioHeader), Buffer.from(signatureWithPort));\n  const validSignatureWithoutPort = scmp(Buffer.from(twilioHeader), Buffer.from(signatureWithoutPort));\n  const isValid = validSignatureWithoutPort || validSignatureWithPort\n  \n  if (!isValid && suppressWarning !== true) {\n    const { project_id, call_id, call, message_id } = params || {}\n    if (project_id || call_id || message_id || call?.project_id) {\n      console.warn('It seems that you are trying to validate a RELAY request using the Compatibility SDK \"validateRequest\" method. Please use the `WebAPI.validateRequest()` method from the `@signalwire/node` SDK to validate all types of SignalWire requests (RELAY and Compatibility).')\n    }\n  }\n\n  return isValid;\n}\n\nfunction validateBody(body, bodyHash) {\n  var expectedHash = getExpectedBodyHash(body);\n  return scmp(Buffer.from(bodyHash), Buffer.from(expectedHash));\n}\n\n/**\n Utility function to validate an incoming request is indeed from Twilio. This also validates\n the request body against the bodySHA256 post parameter.\n\n @param {string} authToken - The auth token, as seen in the Twilio portal\n @param {string} header - The value of the X-Twilio-Signature or X-SignalWire-Signature header from the request\n @param {string} url - The full URL (with query string) you configured to handle this request\n @param {string} body - The body of the request\n @returns {boolean} - valid\n */\nfunction validateRequestWithBody(authToken, twilioHeader, url, body) {\n  const urlObject = new Url(url, true);\n  return validateRequest(authToken, twilioHeader, url, {}) &&\n    validateBody(body, urlObject.query.bodySHA256);\n}\n\n/**\n Utility function to validate an incoming request is indeed from Twilio (for use with express).\n adapted from https://github.com/crabasa/twiliosig\n\n @param {object} request - An expressjs request object (http://expressjs.com/api.html#req.params)\n @param {string} authToken - The auth token, as seen in the Twilio portal\n @param {object} opts - options for request validation:\n    - url: The full URL (with query string) you used to configure the webhook with Twilio - overrides host/protocol options\n    - host: manually specify the host name used by Twilio in a number's webhook config\n    - protocol: manually specify the protocol used by Twilio in a number's webhook config\n */\nfunction validateExpressRequest(request, authToken, opts) {\n  var options = opts || {};\n  var webhookUrl;\n\n  if (options.url) {\n    // Let the user specify the full URL\n    webhookUrl = options.url;\n  } else {\n    // Use configured host/protocol, or infer based on request\n    var protocol = options.protocol || request.protocol;\n    var host = options.host || request.headers.host;\n\n    webhookUrl = urllib.format({\n      protocol: protocol,\n      host: host,\n      pathname: request.originalUrl,\n    });\n    if (request.originalUrl.search(/\\?/) >= 0) {\n      webhookUrl = webhookUrl.replace(/%3F/g, '?');\n    }\n\n  }\n\n  const reqHeaderSignature = request.header('X-SignalWire-Signature') || request.header('X-Twilio-Signature');\n\n  if (webhookUrl.indexOf('bodySHA256') > 0) {\n    return validateRequestWithBody(\n      authToken,\n      reqHeaderSignature,\n      webhookUrl,\n      request.rawBody || '{}'\n    );\n  } else {\n    return validateRequest(\n      authToken,\n      reqHeaderSignature,\n      webhookUrl,\n      request.body || {}\n    );\n  }\n}\n\n/**\nExpress middleware to accompany a Twilio webhook. Provides Twilio\nrequest validation, and makes the response a little more friendly for our\nTwiML generator.  Request validation requires the express.urlencoded middleware\nto have been applied (e.g. app.use(express.urlencoded()); in your app config).\n\nOptions:\n- validate: {Boolean} whether or not the middleware should validate the request\n    came from Twilio.  Default true. If the request does not originate from\n    Twilio, we will return a text body and a 403.  If there is no configured\n    auth token and validate=true, this is an error condition, so we will return\n    a 500.\n- host: manually specify the host name used by Twilio in a number's webhook config\n- protocol: manually specify the protocol used by Twilio in a number's webhook config\n- url: The full URL (with query string) you used to configure the webhook with Twilio - overrides host/protocol options\n\nReturns a middleware function.\n\nExamples:\nvar webhookMiddleware = twilio.webhook();\nvar webhookMiddleware = twilio.webhook('asdha9dhjasd'); //init with auth token\nvar webhookMiddleware = twilio.webhook({\n    validate:false // don't attempt request validation\n});\nvar webhookMiddleware = twilio.webhook({\n    host: 'hook.twilio.com',\n    protocol: 'https'\n});\n */\nfunction webhook() {\n  var opts = {\n    validate: true,\n  };\n\n  // Process arguments\n  var tokenString;\n  for (var i = 0, l = arguments.length; i < l; i++) {\n    var arg = arguments[i];\n    if (typeof arg === 'string') {\n      tokenString = arg;\n    } else {\n      opts = _.extend(opts, arg);\n    }\n  }\n\n  // set auth token from input or environment variable\n  opts.authToken = tokenString ? tokenString : process.env.TWILIO_AUTH_TOKEN;\n\n  // Create middleware function\n  return function hook(request, response, next) {\n    // Do validation if requested\n    if (opts.validate) {\n      // Check if the 'X-Twilio-Signature' header exists or not\n      if (!request.header('X-Twilio-Signature') && !request.header('X-SignalWire-Signature')) {\n        return response.type('text/plain')\n          .status(400)\n          .send('No signature header error - X-SignalWire-Signature header does not exist, maybe this request is not coming from SignalWire.');\n      }\n      // Check for a valid auth token\n      if (!opts.authToken) {\n        console.error('[SignalWire]: Error - SignalWire auth token is required for webhook request validation.');\n        response.type('text/plain')\n          .status(500)\n          .send('Webhook Error - we attempted to validate this request without first configuring our auth token.');\n      } else {\n        // Check that the request originated from Twilio\n        var valid = validateExpressRequest(request, opts.authToken, {\n          url: opts.url,\n          host: opts.host,\n          protocol: opts.protocol,\n        });\n\n        if (valid) {\n          next();\n        } else {\n          return response\n            .type('text/plain')\n            .status(403)\n            .send('SignalWire Request Validation Failed.');\n        }\n      }\n    } else {\n      next();\n    }\n  };\n}\n\nmodule.exports = {\n  getExpectedTwilioSignature,\n  getExpectedBodyHash,\n  validateRequest,\n  validateRequestWithBody,\n  validateExpressRequest,\n  validateBody,\n  webhook,\n};\n", "'use strict';\n\nvar util = require('util');\n\n\nfunction ObsoleteClient(sid, tkn, options) {\n  throw new Error(this.constructor.name + ' has been removed from this version of the library. Please refer to https://www.twilio.com/docs/libraries/node for more information.');\n}\n\n\nfunction RestClient(sid, tkn, options) {\n  RestClient.super_.call(this, sid, tkn, options);\n}\nutil.inherits(RestClient, ObsoleteClient);\n\n\nfunction IpMessagingClient(sid, tkn, options) {\n  IpMessagingClient.super_.call(this, sid, tkn, options);\n}\nutil.inherits(IpMessagingClient, ObsoleteClient);\n\n\nfunction PricingClient(sid, tkn, options) {\n  PricingClient.super_.call(this, sid, tkn, options);\n}\nutil.inherits(PricingClient, ObsoleteClient);\n\n\nfunction MonitorClient(sid, tkn, options) {\n  MonitorClient.super_.call(this, sid, tkn, options);\n}\nutil.inherits(MonitorClient, ObsoleteClient);\n\n\nfunction TaskRouterClient(sid, tkn, options) {\n  TaskRouterClient.super_.call(this, sid, tkn, options);\n}\nutil.inherits(TaskRouterClient, ObsoleteClient);\n\n\nfunction LookupsClient(sid, tkn, options) {\n  LookupsClient.super_.call(this, sid, tkn, options);\n}\nutil.inherits(LookupsClient, ObsoleteClient);\n\n\nfunction TrunkingClient(sid, tkn, options) {\n  TrunkingClient.super_.call(this, sid, tkn, options);\n}\nutil.inherits(TrunkingClient, ObsoleteClient);\n\n\nmodule.exports = {\n  RestClient: RestClient,\n  IpMessagingClient: IpMessagingClient,\n  PricingClient: PricingClient,\n  MonitorClient: MonitorClient,\n  TaskRouterClient: TaskRouterClient,\n  LookupsClient: LookupsClient,\n  TrunkingClient: TrunkingClient,\n};\n", "'use strict';\n\nvar _ = require('lodash');\nvar jwt = require('jsonwebtoken');\nvar util = require('util');\n\n\n/**\n * @constructor\n * @param {object} options - ...\n * @param {string} options.workspaceSid - The workspace unique ID\n * @param {string} options.workerSid - The worker unique ID\n * @param {string} options.role - The role of the grant\n */\nfunction TaskRouterGrant(options) {\n  options = options || {};\n  this.workspaceSid = options.workspaceSid;\n  this.workerSid = options.workerSid;\n  this.role = options.role;\n}\n\n_.extend(TaskRouterGrant.prototype, {\n  key: 'task_router',\n\n  toPayload: function() {\n    var grant = {};\n    if (this.workspaceSid) { grant.workspace_sid = this.workspaceSid; }\n    if (this.workerSid) { grant.worker_sid = this.workerSid; }\n    if (this.role) { grant.role = this.role; }\n    return grant;\n  }\n});\n\n\n/**\n * @constructor\n * @param {object} options - ...\n * @param {string} options.serviceSid - The service unique ID\n * @param {string} options.endpointId - The endpoint ID\n * @param {string} options.deploymentRoleSid - SID of the deployment role to be\n *                 assigned to the user\n * @param {string} options.pushCredentialSid - The Push Credentials SID\n */\nfunction ChatGrant(options) {\n  options = options || {};\n  this.serviceSid = options.serviceSid;\n  this.endpointId = options.endpointId;\n  this.deploymentRoleSid = options.deploymentRoleSid;\n  this.pushCredentialSid = options.pushCredentialSid;\n}\n\n_.extend(ChatGrant.prototype, {\n  key: 'chat',\n\n  toPayload: function() {\n    var grant = {};\n    if (this.serviceSid) { grant.service_sid = this.serviceSid; }\n    if (this.endpointId) { grant.endpoint_id = this.endpointId; }\n    if (this.deploymentRoleSid) {\n      grant.deployment_role_sid = this.deploymentRoleSid;\n    }\n    if (this.pushCredentialSid) {\n      grant.push_credential_sid = this.pushCredentialSid;\n    }\n    return grant;\n  }\n});\n\n/**\n * @deprecated - Use ChatGrant instead.\n *\n * @constructor\n * @param {object} options - ...\n * @param {string} options.serviceSid - The service unique ID\n * @param {string} options.endpointId - The endpoint ID\n * @param {string} options.deploymentRoleSid - SID of the deployment role to be\n *                 assigned to the user\n * @param {string} options.pushCredentialSid - The Push Credentials SID\n */\nfunction IpMessagingGrant(options) {\n  ChatGrant.call(this, options);\n}\n\nIpMessagingGrant.prototype = _.create(ChatGrant.prototype, _.assign({\n  '_super': ChatGrant.prototype,\n  'constructor': ChatGrant\n}));\n\nIpMessagingGrant.prototype.key = 'ip_messaging';\n\n/**\n  * @deprecated - Use VideoGrant instead\n  *\n  * @constructor\n  * @param {object} options - ...\n  * @param {string} options.configurationProfileSid - The configuration\n  *                 profile unique ID\n  */\nfunction ConversationsGrant(options) {\n  options = options || {};\n  this.configurationProfileSid = options.configurationProfileSid;\n}\n\n_.extend(ConversationsGrant.prototype, {\n  key: 'rtc',\n  toPayload: function() {\n    var grant = {};\n    if (this.configurationProfileSid) {\n      grant.configuration_profile_sid = this.configurationProfileSid;\n    }\n    return grant;\n  }\n});\n\n/**\n * @constructor\n * @param {object} options - ...\n * @param {string} options.room - The Room name or Room sid.\n */\nfunction VideoGrant(options) {\n  options = options || {};\n  this.room = options.room;\n}\n\n_.extend(VideoGrant.prototype, {\n  key: 'video',\n  toPayload: function() {\n    var grant = {};\n    if (this.room) { grant.room = this.room; }\n    return grant;\n  }\n});\n\n/**\n * @constructor\n * @param {string} options.serviceSid - The service unique ID\n * @param {string} options.endpointId - The endpoint ID\n */\nfunction SyncGrant(options) {\n  options = options || {};\n  this.serviceSid = options.serviceSid;\n  this.endpointId = options.endpointId;\n}\n\n_.extend(SyncGrant.prototype, {\n  key: 'data_sync',\n\n  toPayload: function() {\n    var grant = {};\n    if (this.serviceSid) { grant.service_sid = this.serviceSid; }\n    if (this.endpointId) { grant.endpoint_id = this.endpointId; }\n    return grant;\n  }\n});\n\n/**\n * @constructor\n * @param {object} options - ...\n * @param {boolean} options.incomingAllow - Whether or not this endpoint is allowed to receive incoming calls as grants.identity\n * @param {string} options.outgoingApplicationSid - application sid to call when placing outgoing call\n * @param {object} options.outgoingApplicationParams - request params to pass to the application\n * @param {string} options.pushCredentialSid - Push Credential Sid to use when registering to receive incoming call notifications\n * @param {string} options.endpointId - Specify an endpoint identifier for this device, which will allow the developer\n *                 to direct calls to a specific endpoint when multiple devices are associated with a single identity\n */\nfunction VoiceGrant(options) {\n  options = options || {};\n  this.incomingAllow = options.incomingAllow;\n  this.outgoingApplicationSid = options.outgoingApplicationSid;\n  this.outgoingApplicationParams = options.outgoingApplicationParams;\n  this.pushCredentialSid = options.pushCredentialSid;\n  this.endpointId = options.endpointId;\n}\n\n_.extend(VoiceGrant.prototype, {\n  key: 'voice',\n  toPayload: function() {\n    var grant = {};\n    if (this.incomingAllow === true) {\n      grant.incoming = { allow: true };\n    }\n\n    if (this.outgoingApplicationSid) {\n      grant.outgoing = {};\n      grant.outgoing.application_sid = this.outgoingApplicationSid;\n\n      if (this.outgoingApplicationParams) {\n        grant.outgoing.params = this.outgoingApplicationParams;\n      }\n    }\n\n    if (this.pushCredentialSid) {\n      grant.push_credential_sid = this.pushCredentialSid;\n    }\n    if (this.endpointId) {\n      grant.endpoint_id = this.endpointId;\n    }\n    return grant;\n  }\n});\n\n/**\n * @constructor\n * @param {object} options - ...\n * @param {string} options.grant - The PlaybackGrant retrieved from Twilio's API\n */\nfunction PlaybackGrant(options) {\n  options = options || {};\n  this.grant = options.grant;\n}\n\n_.extend(PlaybackGrant.prototype, {\n  key: 'player',\n  toPayload: function() {\n    var grant = {};\n    if (this.grant) { grant = this.grant; }\n    return grant;\n  }\n});\n\n/**\n * @constructor\n * @param {string} accountSid - The account's unique ID to which access is scoped\n * @param {string} keySid - The signing key's unique ID\n * @param {string} secret - The secret to sign the token with\n * @param {object} options - ...\n * @param {number} [options.ttl=3600] - Time to live in seconds\n * @param {string} [options.identity] - The identity of the first person\n * @param {number} [options.nbf] - Time from epoch in seconds for not before value\n * @param {string} [options.region] - The region value associated with this account\n */\nfunction AccessToken(accountSid, keySid, secret, options) {\n  if (!accountSid) { throw new Error('accountSid is required'); }\n  if (!keySid) { throw new Error('keySid is required'); }\n  if (!secret) { throw new Error('secret is required'); }\n  options = options || {};\n\n  this.accountSid = accountSid;\n  this.keySid = keySid;\n  this.secret = secret;\n  this.ttl = options.ttl || 3600;\n  this.identity = options.identity;\n  this.nbf = options.nbf;\n  this.region = options.region;\n  this.grants = [];\n}\n\n// Class level properties\nAccessToken.IpMessagingGrant = util.deprecate(IpMessagingGrant, 'IpMessagingGrant is deprecated, use ChatGrant instead.');\nAccessToken.ChatGrant = ChatGrant;\nAccessToken.VoiceGrant = VoiceGrant;\nAccessToken.SyncGrant = SyncGrant;\nAccessToken.VideoGrant = VideoGrant;\nAccessToken.ConversationsGrant = util.deprecate(ConversationsGrant, 'ConversationsGrant is deprecated, use VideoGrant instead.');\nAccessToken.TaskRouterGrant = TaskRouterGrant;\nAccessToken.PlaybackGrant = PlaybackGrant;\nAccessToken.DEFAULT_ALGORITHM = 'HS256';\nAccessToken.ALGORITHMS = [\n  'HS256',\n  'HS384',\n  'HS512'\n];\n\n_.extend(AccessToken.prototype, {\n  addGrant: function(grant) {\n    this.grants.push(grant);\n  },\n\n  toJwt: function(algorithm) {\n    algorithm = algorithm || AccessToken.DEFAULT_ALGORITHM;\n    if (!_.includes(AccessToken.ALGORITHMS, algorithm)) {\n      throw new Error('Algorithm not supported. Allowed values are ' + AccessToken.ALGORITHMS.join(', '));\n    }\n\n    var grants = {};\n    if (_.isInteger(this.identity) || _.isString(this.identity)) { grants.identity = String(this.identity); }\n\n    _.each(this.grants, function(grant) {\n      grants[grant.key] = grant.toPayload();\n    });\n\n    var now = Math.floor(Date.now() / 1000);\n    var payload = {\n      jti: this.keySid + '-' + now,\n      grants: grants\n    };\n    if (_.isNumber(this.nbf)) { payload.nbf = this.nbf; }\n\n    var header = {\n      cty: 'twilio-fpa;v=1',\n      typ: 'JWT'\n    };\n\n    if (this.region && _.isString(this.region)) {\n      header.twr = this.region;\n    }\n\n    return jwt.sign(payload, this.secret, {\n      header: header,\n      algorithm: algorithm,\n      issuer: this.keySid,\n      subject: this.accountSid,\n      expiresIn: this.ttl\n    });\n  }\n});\n\n\nmodule.exports = AccessToken;\n", "'use strict';\n\nvar _ = require('lodash');\nvar jwt = require('jsonwebtoken');\nvar qs = require('querystring');\n\n/**\n * @constructor\n * @param filters\n */\nfunction EventStreamScope(filters) {\n  this.filters = filters || {};\n}\n\n_.extend(EventStreamScope.prototype, {\n  scope: 'scope:stream:subscribe',\n\n  payload: function() {\n    var queryArgs = ['path=/2010-04-01/Events'];\n\n    if (!_.isEmpty(this.filters)) {\n      var queryParams = _.map(this.filters, function(value, key) {\n        return _.join([qs.escape(key), qs.escape(value)], '=');\n      });\n      var filterParams = _.join(queryParams, '&');\n\n      queryArgs.push(_.join(['appParams', qs.escape(filterParams)], '='));\n    }\n\n    var queryString = _.join(queryArgs, '&');\n    return _.join([this.scope, queryString], '?');\n  }\n});\n\n/**\n * @constructor\n * @param clientName\n */\nfunction IncomingClientScope(clientName) {\n  this.clientName = clientName;\n}\n\n_.extend(IncomingClientScope.prototype, {\n  scope: 'scope:client:incoming',\n\n  payload: function() {\n    var query = _.join(['clientName', qs.escape(this.clientName)], '=');\n    return _.join([this.scope, query], '?');\n  }\n});\n\n/**\n * @constructor\n * @param {object} options - ...\n * @param {string} options.applicationSid - the application sid\n * @param {string} [options.clientName] - the client name\n * @param {object} [options.params] - parameters\n */\nfunction OutgoingClientScope(options) {\n  if (_.isUndefined(options)) {\n    throw new Error('Required parameter \"options\" missing.');\n  }\n  if (_.isUndefined(options.applicationSid)) {\n    throw new Error('Required parameter \"options.applicationSid\" missing.');\n  }\n\n  options = options || {};\n  this.applicationSid = options.applicationSid;\n  this.clientName = options.clientName;\n  this.params = options.params;\n}\n\n_.extend(OutgoingClientScope.prototype, {\n  scope: 'scope:client:outgoing',\n\n  payload: function() {\n    var queryArgs = [_.join(['appSid', qs.escape(this.applicationSid)], '=')];\n\n    if (_.isString(this.clientName)) {\n      queryArgs.push(_.join(['clientName', qs.escape(this.clientName)], '='));\n    }\n\n    if (_.isObject(this.params)) {\n      var queryParams = _.map(this.params, function(value, key) {\n        return _.join([qs.escape(key), qs.escape(value)], '=');\n      });\n      var filterParams = _.join(queryParams, '&');\n\n      queryArgs.push(_.join(['appParams', qs.escape(filterParams)], '='));\n    }\n\n    var queryString = _.join(queryArgs, '&');\n    return _.join([this.scope, queryString], '?');\n  }\n});\n\n/**\n * @constructor\n * @param options\n */\nfunction ClientCapability(options) {\n  if (_.isUndefined(options)) {\n    throw new Error('Required parameter \"options\" missing.');\n  }\n  if (_.isUndefined(options.accountSid)) {\n    throw new Error('Required parameter \"options.accountSid\" missing.');\n  }\n  if (_.isUndefined(options.authToken)) {\n    throw new Error('Required parameter \"options.authToken\" missing.');\n  }\n\n  options = options || {};\n  this.accountSid = options.accountSid;\n  this.authToken = options.authToken;\n  this.ttl = options.ttl || 3600;\n  this.scopes = [];\n}\n\nClientCapability.EventStreamScope = EventStreamScope;\nClientCapability.IncomingClientScope = IncomingClientScope;\nClientCapability.OutgoingClientScope = OutgoingClientScope;\n\n_.extend(ClientCapability.prototype, {\n  addScope: function(scope) {\n    this.scopes.push(scope);\n  },\n\n  toJwt: function() {\n    var payload = {\n      scope: _.join(_.map(this.scopes, function(scope) {\n        return scope.payload();\n      }), ' '),\n      iss: this.accountSid,\n      exp: Math.floor(new Date() / 1000) + this.ttl\n    };\n\n    return jwt.sign(payload, this.authToken);\n  }\n});\n\nmodule.exports = ClientCapability;\n", "'use strict';\n\nvar jwt = require('jsonwebtoken');\nvar _ = require('lodash');\n\n/**\n * Create a new Policy\n *\n * @constructor\n * @param {object} options - ...\n * @param {string} [options.url] - Policy URL\n * @param {string} [options.method] - HTTP Method\n * @param {object} [options.queryFilter] - Request query filter allowances\n * @param {object} [options.postFilter] - Request post filter allowances\n * @param {boolean} [options.allowed] - Allow the policy\n */\nfunction Policy(options) {\n  options = options || {};\n  this.url = options.url;\n  this.method = options.method || 'GET';\n  this.queryFilter = options.queryFilter || {};\n  this.postFilter = options.postFilter || {};\n  this.allow = options.allow || true;\n}\n\n_.extend(Policy.prototype, {\n  payload: function() {\n    return {\n      url: this.url,\n      method: this.method,\n      query_filter: this.queryFilter,\n      post_filter: this.postFilter,\n      allow: this.allow\n    };\n  }\n});\n\n/**\n * @constructor\n * @param {object} options - ...\n * @param {string} options.accountSid - account sid\n * @param {string} options.authToken - auth token\n * @param {string} options.workspaceSid - workspace sid\n * @param {string} options.channelId - taskrouter channel id\n * @param {string} [options.friendlyName] - friendly name for the jwt\n * @param {number} [options.ttl] - time to live\n * @param {string} [options.version] - taskrouter version\n */\nfunction TaskRouterCapability(options) {\n  if (_.isUndefined(options)) {\n    throw new Error('Required parameter \"options\" missing.');\n  }\n  if (_.isUndefined(options.accountSid)) {\n    throw new Error('Required parameter \"options.accountSid\" missing.');\n  }\n  if (_.isUndefined(options.authToken)) {\n    throw new Error('Required parameter \"options.authToken\" missing.');\n  }\n  if (_.isUndefined(options.workspaceSid)) {\n    throw new Error('Required parameter \"options.workspaceSid\" missing.');\n  }\n  if (_.isUndefined(options.channelId)) {\n    throw new Error('Required parameter \"options.channelId\" missing.');\n  }\n\n  this.accountSid = options.accountSid;\n  this.authToken = options.authToken;\n  this.workspaceSid = options.workspaceSid;\n  this.channelId = options.channelId;\n  this.friendlyName = options.friendlyName;\n  this.ttl = options.ttl || 3600;\n  this.version = options.version || 'v1';\n  this.policies = [];\n}\n\nTaskRouterCapability.Policy = Policy;\n\n_.extend(TaskRouterCapability.prototype, {\n  addPolicy: function(policy) {\n    this.policies.push(policy);\n  },\n\n  toJwt: function() {\n    var payload = {\n      iss: this.accountSid,\n      exp: (Math.floor(new Date() / 1000)) + this.ttl,\n      version: this.version,\n      friendly_name: this.friendlyName,\n      account_sid: this.accountSid,\n      channel: this.channelId,\n      workspace_sid: this.workspaceSid,\n      policies: _.map(this.policies, function(policy) {\n        return policy.payload();\n      })\n    };\n\n    if (_.startsWith(this.channelId, 'WK')) {\n      payload.worker_sid = this.channelId;\n    } else if (_.startsWith(this.channelId, 'WQ')) {\n      payload.taskqueue_sid = this.channelId;\n    }\n\n    return jwt.sign(payload, this.authToken);\n  }\n});\n\nmodule.exports = TaskRouterCapability;\n", "'use strict';\n\nvar _ = require('lodash');\nvar Policy = require('./TaskRouterCapability').Policy;\n\nvar EVENT_URL_BASE = 'https://event-bridge.twilio.com/v1/wschannels';\nvar TASKROUTER_BASE_URL = 'https://taskrouter.twilio.com';\nvar TASKROUTER_VERSION = 'v1';\n\n/**\n * Build the default Policies for a worker\n *\n * @param {string} version TaskRouter version\n * @param {string} workspaceSid workspace sid\n * @param {string} workerSid worker sid\n * @returns {Array<Policy>} list of Policies\n */\nfunction defaultWorkerPolicies(version, workspaceSid, workerSid) {\n  var activities = new Policy({\n    url: _.join([TASKROUTER_BASE_URL, version, 'Workspaces', workspaceSid, 'Activities'], '/'),\n    method: 'GET',\n    allow: true\n  });\n  var tasks = new Policy({\n    url: _.join([TASKROUTER_BASE_URL, version, 'Workspaces', workspaceSid, 'Tasks', '**'], '/'),\n    method: 'GET',\n    allow: true\n  });\n  var reservations = new Policy({\n    url: _.join(\n      [TASKROUTER_BASE_URL, version, 'Workspaces', workspaceSid, 'Workers', workerSid, 'Reservations', '**'],\n      '/'\n    ),\n    method: 'GET',\n    allow: true\n  });\n  var workerFetch = new Policy({\n    url: _.join([TASKROUTER_BASE_URL, version, 'Workspaces', workspaceSid, 'Workers', workerSid], '/'),\n    method: 'GET',\n    allow: true\n  });\n\n  return [activities, tasks, reservations, workerFetch];\n}\n\n/**\n * Build the default Event Bridge Policies\n *\n * @param {string} accountSid account sid\n * @param {string} channelId channel id\n * @returns {Array<Policy>} list of Policies\n */\nfunction defaultEventBridgePolicies(accountSid, channelId) {\n  var url = _.join([EVENT_URL_BASE, accountSid, channelId], '/');\n  return [\n    new Policy({\n      url: url,\n      method: 'GET',\n      allow: true\n    }),\n    new Policy({\n      url: url,\n      method: 'POST',\n      allow: true\n    })\n  ];\n}\n\n/**\n * Generate TaskRouter workspace url\n *\n * @param {string} [workspaceSid] workspace sid or '**' for all workspaces\n * @return {string} generated url\n */\nfunction workspacesUrl(workspaceSid) {\n  return _.join(\n    _.filter([TASKROUTER_BASE_URL, TASKROUTER_VERSION, 'Workspaces', workspaceSid], _.isString),\n    '/'\n  );\n}\n\n/**\n * Generate TaskRouter task queue url\n *\n * @param {string} workspaceSid workspace sid\n * @param {string} [taskQueueSid] task queue sid or '**' for all task queues\n * @return {string} generated url\n */\nfunction taskQueuesUrl(workspaceSid, taskQueueSid) {\n  return _.join(\n    _.filter([workspacesUrl(workspaceSid), 'TaskQueues', taskQueueSid], _.isString),\n    '/'\n  );\n}\n\n/**\n * Generate TaskRouter task url\n *\n * @param {string} workspaceSid workspace sid\n * @param {string} [taskSid] task sid or '**' for all tasks\n * @returns {string} generated url\n */\nfunction tasksUrl(workspaceSid, taskSid) {\n  return _.join(\n    _.filter([workspacesUrl(workspaceSid), 'Tasks', taskSid], _.isString),\n    '/'\n  );\n}\n\n/**\n * Generate TaskRouter activity url\n * \n * @param {string} workspaceSid workspace sid\n * @param {string} [activitySid] activity sid or '**' for all activities\n * @returns {string} generated url\n */\nfunction activitiesUrl(workspaceSid, activitySid) {\n  return _.join(\n    _.filter([workspacesUrl(workspaceSid), 'Activities', activitySid], _.isString),\n    '/'\n  );\n}\n\n/**\n * Generate TaskRouter worker url\n *\n * @param {string} workspaceSid workspace sid\n * @param {string} [workerSid] worker sid or '**' for all workers\n * @returns {string} generated url\n */\nfunction workersUrl(workspaceSid, workerSid) {\n  return _.join(\n    _.filter([workspacesUrl(workspaceSid), 'Workers', workerSid], _.isString),\n    '/'\n  );\n}\n\n/**\n * Generate TaskRouter worker reservation url\n *\n * @param {string} workspaceSid workspace sid\n * @param {string} workerSid worker sid\n * @param {string} [reservationSid] reservation sid or '**' for all reservations\n * @returns {string} generated url\n */\nfunction reservationsUrl(workspaceSid, workerSid, reservationSid) {\n  return _.join(\n    _.filter([workersUrl(workspaceSid, workerSid), 'Reservations', reservationSid], _.isString),\n    '/'\n  );\n}\n\n\nmodule.exports = {\n  defaultWorkerPolicies: defaultWorkerPolicies,\n  defaultEventBridgePolicies: defaultEventBridgePolicies,\n\n  workspacesUrl: workspacesUrl,\n  taskQueuesUrl: taskQueuesUrl,\n  tasksUrl: tasksUrl,\n  activitiesUrl: activitiesUrl,\n  workersUrl: workersUrl,\n  reservationsUrl: reservationsUrl\n};\n", "'use strict';\n\nvar builder = require('xmlbuilder');  /* jshint ignore:line */\n\n/* jshint ignore:start */\n/**\n * Parent TwiML object\n */\n/* jshint ignore:end */\nfunction TwiML() {\n  this.response = builder.create('Response', {\n    stringify: {\n      attValue: function (value) {\n        if (Array.isArray(value)) {\n          value = value.join(' ');\n        }\n        return this.attEscape('' + value || '');\n      }\n    }\n  }).dec('1.0', 'UTF-8');\n}\n\n/* jshint ignore:start */\n/**\n * Because child elements have properties named after their class names, we need\n * to translate that when we want to access that at the parent prototype level.\n * So this will translate something like Say to 'say' and VoiceResponse to\n * 'response'.\n */\n/* jshint ignore:end */\nTwiML.prototype._getXml = function _getPropertyName() {\n  return this[this._propertyName];\n}\n\n/* jshint ignore:start */\n/**\n * Convert to TwiML\n *\n * @returns TwiML XML\n */\n/* jshint ignore:end */\nTwiML.prototype.toString = function toString() {\n  return this._getXml().end();\n}\n\n/* jshint ignore:start */\n/**\n * Add text under the TwiML node\n *\n * @param {string} content\n */\n/* jshint ignore:end */\nTwiML.prototype.addText = function addText(content) {\n  this._getXml().txt(content);\n}\n\n/* jshint ignore:start */\n/**\n * Add an arbitrary tag as a child.\n *\n * @param {string} content\n */\n/* jshint ignore:end */\nTwiML.prototype.addChild = function addChild(tagName, attributes) {\n  return new GenericNode(this._getXml().ele(tagName, attributes));\n}\n\n/* jshint ignore:start */\n/**\n * Generic node\n */\n/* jshint ignore:end */\nfunction GenericNode(node) {\n  // must match variable name for _getPropertyName\n  this.node = node;\n  this._propertyName = 'node';\n}\n\n// \"Inherit\" from TwiML\nGenericNode.prototype = Object.create(TwiML.prototype);\nGenericNode.prototype.constructor = GenericNode;\n\nmodule.exports = TwiML;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar util = require('util');  /* jshint ignore:line */\nvar TwiML = require('./TwiML');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * <Response> TwiML for Voice\n *\n * @constructor VoiceResponse\n */\n/* jshint ignore:end */\nfunction VoiceResponse() {\n  TwiML.call(this);\n  this._propertyName = 'response';\n}\n\nVoiceResponse.prototype = Object.create(TwiML.prototype);\nVoiceResponse.prototype.constructor = VoiceResponse;\n\n/* jshint ignore:start */\n/**\n * <Connect> TwiML Verb\n *\n * @function connect\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.action] - Action URL\n * @param {string} [attributes.method] - Action URL method\n *\n * @returns Connect\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.connect = function connect(attributes) {\n  return new Connect(this.response.ele('Connect', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Dial> TwiML Verb\n *\n * @function dial\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.action] - Action URL\n * @param {string} [attributes.method] - Action URL method\n * @param {number} [attributes.timeout] - Time to wait for answer\n * @param {boolean} [attributes.hangupOnStar] - Hangup call on star press\n * @param {number} [attributes.timeLimit] - Max time length\n * @param {string} [attributes.callerId] - Caller ID to display\n * @param {dial.record} [attributes.record] - Record the call\n * @param {dial.trim} [attributes.trim] - Trim the recording\n * @param {string} [attributes.recordingStatusCallback] -\n *          Recording status callback URL\n * @param {string} [attributes.recordingStatusCallbackMethod] -\n *          Recording status callback URL method\n * @param {dial.recording_event} [attributes.recordingStatusCallbackEvent] -\n *          Recording status callback events\n * @param {boolean} [attributes.answerOnBridge] -\n *          Preserve the ringing behavior of the inbound call until the Dialed call picks up\n * @param {dial.ring_tone} [attributes.ringTone] -\n *          Ringtone allows you to override the ringback tone that Twilio will play back to the caller while executing the Dial\n * @param {dial.recording_track} [attributes.recordingTrack] -\n *          To indicate which audio track should be recorded\n * @param {boolean} [attributes.sequential] -\n *          Used to determine if child TwiML nouns should be dialed in order, one after the other (sequential) or dial all at once (parallel). Default is false, parallel\n * @param {string} [attributes.referUrl] -\n *          Webhook that will receive future SIP REFER requests\n * @param {string} [attributes.referMethod] -\n *          The HTTP method to use for the refer Webhook\n * @param {string} [number] - Phone number to dial\n *\n * @returns Dial\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.dial = function dial(attributes, number) {\n  return new Dial(this.response.ele('Dial', attributes, number));\n};\n\n/* jshint ignore:start */\n/**\n * <Echo> TwiML Verb\n *\n * @function echo\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n *\n * @returns Echo\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.echo = function echo(attributes) {\n  return new Echo(this.response.ele('Echo', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Enqueue> TwiML Noun\n *\n * @function enqueue\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.action] - Action URL\n * @param {string} [attributes.method] - Action URL method\n * @param {string} [attributes.waitUrl] - Wait URL\n * @param {string} [attributes.waitUrlMethod] - Wait URL method\n * @param {string} [attributes.workflowSid] - TaskRouter Workflow SID\n * @param {string} [name] - Friendly name\n *\n * @returns Enqueue\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.enqueue = function enqueue(attributes, name) {\n  return new Enqueue(this.response.ele('Enqueue', attributes, name));\n};\n\n/* jshint ignore:start */\n/**\n * <Gather> TwiML Verb\n *\n * @function gather\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {gather.input} [attributes.input] - Input type Twilio should accept\n * @param {string} [attributes.action] - Action URL\n * @param {string} [attributes.method] - Action URL method\n * @param {number} [attributes.timeout] - Time to wait to gather input\n * @param {string} [attributes.speechTimeout] -\n *          Time to wait to gather speech input and it should be either auto or a positive integer.\n * @param {number} [attributes.maxSpeechTime] - Max allowed time for speech input\n * @param {boolean} [attributes.profanityFilter] - Profanity Filter on speech\n * @param {string} [attributes.finishOnKey] - Finish gather on key\n * @param {number} [attributes.numDigits] - Number of digits to collect\n * @param {string} [attributes.partialResultCallback] - Partial result callback URL\n * @param {string} [attributes.partialResultCallbackMethod] -\n *          Partial result callback URL method\n * @param {gather.language} [attributes.language] - Language to use\n * @param {string} [attributes.hints] - Speech recognition hints\n * @param {boolean} [attributes.bargeIn] - Stop playing media upon speech\n * @param {boolean} [attributes.debug] - Allow debug for gather\n * @param {boolean} [attributes.actionOnEmptyResult] -\n *          Force webhook to the action URL event if there is no input\n * @param {gather.speech_model} [attributes.speechModel] -\n *          Specify the model that is best suited for your use case\n * @param {boolean} [attributes.enhanced] - Use enhanced speech model\n *\n * @returns Gather\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.gather = function gather(attributes) {\n  return new Gather(this.response.ele('Gather', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Hangup> TwiML Verb\n *\n * @function hangup\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n *\n * @returns Hangup\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.hangup = function hangup(attributes) {\n  return new Hangup(this.response.ele('Hangup', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Leave> TwiML Verb\n *\n * @function leave\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n *\n * @returns Leave\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.leave = function leave(attributes) {\n  return new Leave(this.response.ele('Leave', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Pause> TwiML Verb\n *\n * @function pause\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {number} [attributes.length] - Length in seconds to pause\n *\n * @returns Pause\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.pause = function pause(attributes) {\n  return new Pause(this.response.ele('Pause', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Play> TwiML Verb\n *\n * @function play\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {number} [attributes.loop] - Times to loop media\n * @param {string} [attributes.digits] - Play DTMF tones for digits\n * @param {url} [url] - Media URL\n *\n * @returns Play\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.play = function play(attributes, url) {\n  return new Play(this.response.ele('Play', attributes, url));\n};\n\n/* jshint ignore:start */\n/**\n * <Queue> TwiML Noun\n *\n * @function queue\n * @memberof VoiceResponse#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.url] - Action URL\n * @param {string} [attributes.method] - Action URL method\n * @param {string} [attributes.reservationSid] - TaskRouter Reservation SID\n * @param {string} [attributes.postWorkActivitySid] - TaskRouter Activity SID\n * @param {string} name - Queue name\n *\n * @returns Queue\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.queue = function queue(attributes, name) {\n  return new Queue(this.response.ele('Queue', attributes, name));\n};\n\n/* jshint ignore:start */\n/**\n * <Record> TwiML Verb\n *\n * @function record\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.action] - Action URL\n * @param {string} [attributes.method] - Action URL method\n * @param {number} [attributes.timeout] - Timeout to begin recording\n * @param {string} [attributes.finishOnKey] - Finish recording on key\n * @param {number} [attributes.maxLength] - Max time to record in seconds\n * @param {boolean} [attributes.playBeep] - Play beep\n * @param {record.trim} [attributes.trim] - Trim the recording\n * @param {string} [attributes.recordingStatusCallback] - Status callback URL\n * @param {string} [attributes.recordingStatusCallbackMethod] -\n *          Status callback URL method\n * @param {record.recording_event} [attributes.recordingStatusCallbackEvent] -\n *          Recording status callback events\n * @param {boolean} [attributes.transcribe] - Transcribe the recording\n * @param {string} [attributes.transcribeCallback] - Transcribe callback URL\n *\n * @returns Record\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.record = function record(attributes) {\n  return new Record(this.response.ele('Record', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Redirect> TwiML Verb\n *\n * @function redirect\n * @memberof VoiceResponse#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.method] - Redirect URL method\n * @param {url} url - Redirect URL\n *\n * @returns Redirect\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.redirect = function redirect(attributes, url) {\n  return new Redirect(this.response.ele('Redirect', attributes, url));\n};\n\n/* jshint ignore:start */\n/**\n * <Reject> TwiML Verb\n *\n * @function reject\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {reject.reason} [attributes.reason] - Rejection reason\n *\n * @returns Reject\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.reject = function reject(attributes) {\n  return new Reject(this.response.ele('Reject', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Say> TwiML Verb\n *\n * @function say\n * @memberof VoiceResponse#\n *\n * @param {object} attributes - TwiML attributes\n * @param {say.voice} [attributes.voice] - Voice to use\n * @param {number} [attributes.loop] - Times to loop message\n * @param {say.language} [attributes.language] - Message langauge\n * @param {string} message - Message to say\n *\n * @returns Say\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.say = function say(attributes, message) {\n  return new Say(this.response.ele('Say', attributes, message));\n};\n\n/* jshint ignore:start */\n/**\n * <Sms> TwiML Noun\n *\n * @function sms\n * @memberof VoiceResponse#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.to] - Number to send message to\n * @param {string} [attributes.from] - Number to send message from\n * @param {string} [attributes.action] - Action URL\n * @param {string} [attributes.method] - Action URL method\n * @param {string} [attributes.statusCallback] - Status callback URL\n * @param {string} message - Message body\n *\n * @returns Sms\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.sms = function sms(attributes, message) {\n  return new Sms(this.response.ele('Sms', attributes, message));\n};\n\n/* jshint ignore:start */\n/**\n * <Pay> Twiml Verb\n *\n * @function pay\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {pay.input} [attributes.input] - Input type Twilio should accept\n * @param {string} [attributes.action] - Action URL\n * @param {pay.bank_account_type} [attributes.bankAccountType] -\n *          Bank account type for ach transactions. If set, payment method attribute must be provided and value should be set to ach-debit. defaults to consumer-checking\n * @param {string} [attributes.statusCallback] - Status callback URL\n * @param {pay.status_callback_method} [attributes.statusCallbackMethod] -\n *          Status callback method\n * @param {number} [attributes.timeout] - Time to wait to gather input\n * @param {number} [attributes.maxAttempts] -\n *          Maximum number of allowed retries when gathering input\n * @param {boolean} [attributes.securityCode] - Prompt for security code\n * @param {string} [attributes.postalCode] -\n *          Prompt for postal code and it should be true/false or default postal code\n * @param {number} [attributes.minPostalCodeLength] -\n *          Prompt for minimum postal code length\n * @param {string} [attributes.paymentConnector] -\n *          Unique name for payment connector\n * @param {pay.payment_method} [attributes.paymentMethod] -\n *          Payment method to be used. defaults to credit-card\n * @param {pay.token_type} [attributes.tokenType] - Type of token\n * @param {string} [attributes.chargeAmount] -\n *          Amount to process. If value is greater than 0 then make the payment else create a payment token\n * @param {string} [attributes.currency] - Currency of the amount attribute\n * @param {string} [attributes.description] - Details regarding the payment\n * @param {pay.valid_card_types} [attributes.validCardTypes] -\n *          Comma separated accepted card types\n * @param {pay.language} [attributes.language] - Language to use\n *\n * @returns Pay\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.pay = function pay(attributes) {\n  return new Pay(this.response.ele('Pay', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Prompt> Twiml Verb\n *\n * @function prompt\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {prompt.for} [attributes.for_] - Name of the payment source data element\n * @param {prompt.error_type} [attributes.errorType] - Type of error\n * @param {prompt.card_type} [attributes.cardType] - Type of the credit card\n * @param {number} [attributes.attempt] - Current attempt count\n *\n * @returns Prompt\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.prompt = function prompt(attributes) {\n  return new Prompt(this.response.ele('Prompt', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Start> TwiML Verb\n *\n * @function start\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.action] - Action URL\n * @param {string} [attributes.method] - Action URL method\n *\n * @returns Start\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.start = function start(attributes) {\n  return new Start(this.response.ele('Start', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Stop> TwiML Verb\n *\n * @function stop\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n *\n * @returns Stop\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.stop = function stop(attributes) {\n  return new Stop(this.response.ele('Stop', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Refer> TwiML Verb\n *\n * @function refer\n * @memberof VoiceResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.action] - Action URL\n * @param {string} [attributes.method] - Action URL method\n *\n * @returns Refer\n */\n/* jshint ignore:end */\nVoiceResponse.prototype.refer = function refer(attributes) {\n  return new Refer(this.response.ele('Refer', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Refer> TwiML Verb\n *\n * @constructor Refer\n *\n * @param {object} refer - <Refer> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Refer(refer) {\n  this.refer = refer;\n  this._propertyName = 'refer';\n}\n\nRefer.prototype = Object.create(TwiML.prototype);\nRefer.prototype.constructor = Refer;\n\n/* jshint ignore:start */\n/**\n * <Sip> TwiML Noun used in <Refer>\n *\n * @function sip\n * @memberof Refer#\n *\n * @param {object} attributes - TwiML attributes\n * @param {url} sipUrl - SIP URL\n *\n * @returns ReferSip\n */\n/* jshint ignore:end */\nRefer.prototype.sip = function sip(attributes, sipUrl) {\n  return new ReferSip(this.refer.ele('Sip', attributes, sipUrl));\n};\n\n/* jshint ignore:start */\n/**\n * <Sip> TwiML Noun used in <Refer>\n *\n * @function referSip\n * @memberof Refer#\n * @deprecated - Use sip() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {url} sipUrl - SIP URL\n *\n * @returns ReferSip\n */\n/* jshint ignore:end */\nRefer.prototype.referSip = util.deprecate(function referSip(attributes, sipUrl)\n                                                             {\n  return this.sip(attributes, sipUrl);\n}, 'referSip() is deprecated. Use sip() instead.');\n\n\n/* jshint ignore:start */\n/**\n * <Sip> TwiML Noun used in <Refer>\n *\n * @constructor ReferSip\n *\n * @param {object} referSip - <Sip> TwiML Noun used in <Refer>\n */\n/* jshint ignore:end */\nfunction ReferSip(referSip) {\n  this.referSip = referSip;\n  this._propertyName = 'referSip';\n}\n\nReferSip.prototype = Object.create(TwiML.prototype);\nReferSip.prototype.constructor = ReferSip;\n\n\n/* jshint ignore:start */\n/**\n * <Stop> TwiML Verb\n *\n * @constructor Stop\n *\n * @param {object} stop - <Stop> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Stop(stop) {\n  this.stop = stop;\n  this._propertyName = 'stop';\n}\n\nStop.prototype = Object.create(TwiML.prototype);\nStop.prototype.constructor = Stop;\n\n/* jshint ignore:start */\n/**\n * <Stream> TwiML Noun\n *\n * @function stream\n * @memberof Stop#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.name] - Friendly name given to the Stream\n * @param {string} [attributes.connectorName] - Unique name for Stream Connector\n * @param {string} [attributes.url] -\n *          URL of the remote service where the Stream is routed\n * @param {stream.track} [attributes.track] -\n *          Track to be streamed to remote service\n * @param {string} [attributes.statusCallback] - Status Callback URL\n * @param {stream.status_callback_method} [attributes.statusCallbackMethod] -\n *          Status Callback URL method\n *\n * @returns Stream\n */\n/* jshint ignore:end */\nStop.prototype.stream = function stream(attributes) {\n  return new Stream(this.stop.ele('Stream', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Siprec> TwiML Noun\n *\n * @function siprec\n * @memberof Stop#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.name] - Friendly name given to SIPREC\n * @param {string} [attributes.connectorName] - Unique name for Connector\n * @param {siprec.track} [attributes.track] -\n *          Track to be streamed to remote service\n *\n * @returns Siprec\n */\n/* jshint ignore:end */\nStop.prototype.siprec = function siprec(attributes) {\n  return new Siprec(this.stop.ele('Siprec', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Siprec> TwiML Noun\n *\n * @constructor Siprec\n *\n * @param {object} siprec - <Siprec> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Siprec(siprec) {\n  this.siprec = siprec;\n  this._propertyName = 'siprec';\n}\n\nSiprec.prototype = Object.create(TwiML.prototype);\nSiprec.prototype.constructor = Siprec;\n\n/* jshint ignore:start */\n/**\n * <Parameter> TwiML Noun\n *\n * @function parameter\n * @memberof Siprec#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.name] - The name of the custom parameter\n * @param {string} [attributes.value] - The value of the custom parameter\n *\n * @returns Parameter\n */\n/* jshint ignore:end */\nSiprec.prototype.parameter = function parameter(attributes) {\n  return new Parameter(this.siprec.ele('Parameter', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Parameter> TwiML Noun\n *\n * @constructor Parameter\n *\n * @param {object} parameter - <Parameter> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Parameter(parameter) {\n  this.parameter = parameter;\n  this._propertyName = 'parameter';\n}\n\nParameter.prototype = Object.create(TwiML.prototype);\nParameter.prototype.constructor = Parameter;\n\n\n/* jshint ignore:start */\n/**\n * <Stream> TwiML Noun\n *\n * @constructor Stream\n *\n * @param {object} stream - <Stream> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Stream(stream) {\n  this.stream = stream;\n  this._propertyName = 'stream';\n}\n\nStream.prototype = Object.create(TwiML.prototype);\nStream.prototype.constructor = Stream;\n\n/* jshint ignore:start */\n/**\n * <Parameter> TwiML Noun\n *\n * @function parameter\n * @memberof Stream#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.name] - The name of the custom parameter\n * @param {string} [attributes.value] - The value of the custom parameter\n *\n * @returns Parameter\n */\n/* jshint ignore:end */\nStream.prototype.parameter = function parameter(attributes) {\n  return new Parameter(this.stream.ele('Parameter', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Start> TwiML Verb\n *\n * @constructor Start\n *\n * @param {object} start - <Start> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Start(start) {\n  this.start = start;\n  this._propertyName = 'start';\n}\n\nStart.prototype = Object.create(TwiML.prototype);\nStart.prototype.constructor = Start;\n\n/* jshint ignore:start */\n/**\n * <Stream> TwiML Noun\n *\n * @function stream\n * @memberof Start#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.name] - Friendly name given to the Stream\n * @param {string} [attributes.connectorName] - Unique name for Stream Connector\n * @param {string} [attributes.url] -\n *          URL of the remote service where the Stream is routed\n * @param {stream.track} [attributes.track] -\n *          Track to be streamed to remote service\n * @param {string} [attributes.statusCallback] - Status Callback URL\n * @param {stream.status_callback_method} [attributes.statusCallbackMethod] -\n *          Status Callback URL method\n *\n * @returns Stream\n */\n/* jshint ignore:end */\nStart.prototype.stream = function stream(attributes) {\n  return new Stream(this.start.ele('Stream', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Siprec> TwiML Noun\n *\n * @function siprec\n * @memberof Start#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.name] - Friendly name given to SIPREC\n * @param {string} [attributes.connectorName] - Unique name for Connector\n * @param {siprec.track} [attributes.track] -\n *          Track to be streamed to remote service\n *\n * @returns Siprec\n */\n/* jshint ignore:end */\nStart.prototype.siprec = function siprec(attributes) {\n  return new Siprec(this.start.ele('Siprec', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Prompt> Twiml Verb\n *\n * @constructor Prompt\n *\n * @param {object} prompt - <Prompt> Twiml Verb\n */\n/* jshint ignore:end */\nfunction Prompt(prompt) {\n  this.prompt = prompt;\n  this._propertyName = 'prompt';\n}\n\nPrompt.prototype = Object.create(TwiML.prototype);\nPrompt.prototype.constructor = Prompt;\n\n/* jshint ignore:start */\n/**\n * <Say> TwiML Verb\n *\n * @function say\n * @memberof Prompt#\n *\n * @param {object} attributes - TwiML attributes\n * @param {say.voice} [attributes.voice] - Voice to use\n * @param {number} [attributes.loop] - Times to loop message\n * @param {say.language} [attributes.language] - Message langauge\n * @param {string} message - Message to say\n *\n * @returns Say\n */\n/* jshint ignore:end */\nPrompt.prototype.say = function say(attributes, message) {\n  return new Say(this.prompt.ele('Say', attributes, message));\n};\n\n/* jshint ignore:start */\n/**\n * <Play> TwiML Verb\n *\n * @function play\n * @memberof Prompt#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {number} [attributes.loop] - Times to loop media\n * @param {string} [attributes.digits] - Play DTMF tones for digits\n * @param {url} [url] - Media URL\n *\n * @returns Play\n */\n/* jshint ignore:end */\nPrompt.prototype.play = function play(attributes, url) {\n  return new Play(this.prompt.ele('Play', attributes, url));\n};\n\n/* jshint ignore:start */\n/**\n * <Pause> TwiML Verb\n *\n * @function pause\n * @memberof Prompt#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {number} [attributes.length] - Length in seconds to pause\n *\n * @returns Pause\n */\n/* jshint ignore:end */\nPrompt.prototype.pause = function pause(attributes) {\n  return new Pause(this.prompt.ele('Pause', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Pause> TwiML Verb\n *\n * @constructor Pause\n *\n * @param {object} pause - <Pause> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Pause(pause) {\n  this.pause = pause;\n  this._propertyName = 'pause';\n}\n\nPause.prototype = Object.create(TwiML.prototype);\nPause.prototype.constructor = Pause;\n\n\n/* jshint ignore:start */\n/**\n * <Play> TwiML Verb\n *\n * @constructor Play\n *\n * @param {object} play - <Play> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Play(play) {\n  this.play = play;\n  this._propertyName = 'play';\n}\n\nPlay.prototype = Object.create(TwiML.prototype);\nPlay.prototype.constructor = Play;\n\n\n/* jshint ignore:start */\n/**\n * <Say> TwiML Verb\n *\n * @constructor Say\n *\n * @param {object} say - <Say> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Say(say) {\n  this.say = say;\n  this._propertyName = 'say';\n}\n\nSay.prototype = Object.create(TwiML.prototype);\nSay.prototype.constructor = Say;\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function break_\n * @memberof Say#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSay.prototype.break_ = function break_(attributes) {\n  return new SsmlBreak(this.say.ele('break', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function ssmlBreak\n * @memberof Say#\n * @deprecated - Use break_() instead.\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSay.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) {\n  return this.break_(attributes);\n}, 'ssmlBreak() is deprecated. Use break_() instead.');\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function emphasis\n * @memberof Say#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSay.prototype.emphasis = function emphasis(attributes, words) {\n  return new SsmlEmphasis(this.say.ele('emphasis', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function ssmlEmphasis\n * @memberof Say#\n * @deprecated - Use emphasis() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSay.prototype.ssmlEmphasis = util.deprecate(function ssmlEmphasis(attributes,\n    words) {\n  return this.emphasis(attributes, words);\n}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.');\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function lang\n * @memberof Say#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSay.prototype.lang = function lang(attributes, words) {\n  return new SsmlLang(this.say.ele('lang', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function ssmlLang\n * @memberof Say#\n * @deprecated - Use lang() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSay.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, words) {\n  return this.lang(attributes, words);\n}, 'ssmlLang() is deprecated. Use lang() instead.');\n\n/* jshint ignore:start */\n/**\n * Adding a Pause Between Paragraphs in <Say>\n *\n * @function p\n * @memberof Say#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlP\n */\n/* jshint ignore:end */\nSay.prototype.p = function p(attributes, words) {\n  return new SsmlP(this.say.ele('p', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause Between Paragraphs in <Say>\n *\n * @function ssmlP\n * @memberof Say#\n * @deprecated - Use p() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlP\n */\n/* jshint ignore:end */\nSay.prototype.ssmlP = util.deprecate(function ssmlP(attributes, words) {\n  return this.p(attributes, words);\n}, 'ssmlP() is deprecated. Use p() instead.');\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function phoneme\n * @memberof Say#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSay.prototype.phoneme = function phoneme(attributes, words) {\n  return new SsmlPhoneme(this.say.ele('phoneme', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function ssmlPhoneme\n * @memberof Say#\n * @deprecated - Use phoneme() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSay.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes,\n    words) {\n  return this.phoneme(attributes, words);\n}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.');\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function prosody\n * @memberof Say#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSay.prototype.prosody = function prosody(attributes, words) {\n  return new SsmlProsody(this.say.ele('prosody', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function ssmlProsody\n * @memberof Say#\n * @deprecated - Use prosody() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSay.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes,\n    words) {\n  return this.prosody(attributes, words);\n}, 'ssmlProsody() is deprecated. Use prosody() instead.');\n\n/* jshint ignore:start */\n/**\n * Adding A Pause Between Sentences in <Say>\n *\n * @function s\n * @memberof Say#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlS\n */\n/* jshint ignore:end */\nSay.prototype.s = function s(attributes, words) {\n  return new SsmlS(this.say.ele('s', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Adding A Pause Between Sentences in <Say>\n *\n * @function ssmlS\n * @memberof Say#\n * @deprecated - Use s() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlS\n */\n/* jshint ignore:end */\nSay.prototype.ssmlS = util.deprecate(function ssmlS(attributes, words) {\n  return this.s(attributes, words);\n}, 'ssmlS() is deprecated. Use s() instead.');\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function sayAs\n * @memberof Say#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSay.prototype.sayAs = function sayAs(attributes, words) {\n  return new SsmlSayAs(this.say.ele('say-as', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function ssmlSayAs\n * @memberof Say#\n * @deprecated - Use sayAs() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSay.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, words) {\n  return this.sayAs(attributes, words);\n}, 'ssmlSayAs() is deprecated. Use sayAs() instead.');\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function sub\n * @memberof Say#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSay.prototype.sub = function sub(attributes, words) {\n  return new SsmlSub(this.say.ele('sub', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function ssmlSub\n * @memberof Say#\n * @deprecated - Use sub() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSay.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words) {\n  return this.sub(attributes, words);\n}, 'ssmlSub() is deprecated. Use sub() instead.');\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function w\n * @memberof Say#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSay.prototype.w = function w(attributes, words) {\n  return new SsmlW(this.say.ele('w', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function ssmlW\n * @memberof Say#\n * @deprecated - Use w() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSay.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) {\n  return this.w(attributes, words);\n}, 'ssmlW() is deprecated. Use w() instead.');\n\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @constructor SsmlW\n *\n * @param {object} ssmlW -\n *          Improving Pronunciation by Specifying Parts of Speech in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlW(ssmlW) {\n  this.ssmlW = ssmlW;\n  this._propertyName = 'ssmlW';\n}\n\nSsmlW.prototype = Object.create(TwiML.prototype);\nSsmlW.prototype.constructor = SsmlW;\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function break_\n * @memberof SsmlW#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlW.prototype.break_ = function break_(attributes) {\n  return new SsmlBreak(this.w.ele('break', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function ssmlBreak\n * @memberof SsmlW#\n * @deprecated - Use break_() instead.\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlW.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) {\n  return this.break_(attributes);\n}, 'ssmlBreak() is deprecated. Use break_() instead.');\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function emphasis\n * @memberof SsmlW#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlW.prototype.emphasis = function emphasis(attributes, words) {\n  return new SsmlEmphasis(this.w.ele('emphasis', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function ssmlEmphasis\n * @memberof SsmlW#\n * @deprecated - Use emphasis() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlW.prototype.ssmlEmphasis = util.deprecate(function ssmlEmphasis(attributes,\n    words) {\n  return this.emphasis(attributes, words);\n}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.');\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function phoneme\n * @memberof SsmlW#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlW.prototype.phoneme = function phoneme(attributes, words) {\n  return new SsmlPhoneme(this.w.ele('phoneme', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function ssmlPhoneme\n * @memberof SsmlW#\n * @deprecated - Use phoneme() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlW.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes,\n    words) {\n  return this.phoneme(attributes, words);\n}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.');\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function prosody\n * @memberof SsmlW#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlW.prototype.prosody = function prosody(attributes, words) {\n  return new SsmlProsody(this.w.ele('prosody', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function ssmlProsody\n * @memberof SsmlW#\n * @deprecated - Use prosody() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlW.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes,\n    words) {\n  return this.prosody(attributes, words);\n}, 'ssmlProsody() is deprecated. Use prosody() instead.');\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function sayAs\n * @memberof SsmlW#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlW.prototype.sayAs = function sayAs(attributes, words) {\n  return new SsmlSayAs(this.w.ele('say-as', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function ssmlSayAs\n * @memberof SsmlW#\n * @deprecated - Use sayAs() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlW.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, words)\n    {\n  return this.sayAs(attributes, words);\n}, 'ssmlSayAs() is deprecated. Use sayAs() instead.');\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function sub\n * @memberof SsmlW#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlW.prototype.sub = function sub(attributes, words) {\n  return new SsmlSub(this.w.ele('sub', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function ssmlSub\n * @memberof SsmlW#\n * @deprecated - Use sub() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlW.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words) {\n  return this.sub(attributes, words);\n}, 'ssmlSub() is deprecated. Use sub() instead.');\n\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @constructor SsmlSub\n *\n * @param {object} ssmlSub - Pronouncing Acronyms and Abbreviations in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlSub(ssmlSub) {\n  this.ssmlSub = ssmlSub;\n  this._propertyName = 'ssmlSub';\n}\n\nSsmlSub.prototype = Object.create(TwiML.prototype);\nSsmlSub.prototype.constructor = SsmlSub;\n\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @constructor SsmlSayAs\n *\n * @param {object} ssmlSayAs -\n *          Controlling How Special Types of Words Are Spoken in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlSayAs(ssmlSayAs) {\n  this.ssmlSayAs = ssmlSayAs;\n  this._propertyName = 'ssmlSayAs';\n}\n\nSsmlSayAs.prototype = Object.create(TwiML.prototype);\nSsmlSayAs.prototype.constructor = SsmlSayAs;\n\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @constructor SsmlProsody\n *\n * @param {object} ssmlProsody -\n *          Controling Volume, Speaking Rate, and Pitch in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlProsody(ssmlProsody) {\n  this.ssmlProsody = ssmlProsody;\n  this._propertyName = 'ssmlProsody';\n}\n\nSsmlProsody.prototype = Object.create(TwiML.prototype);\nSsmlProsody.prototype.constructor = SsmlProsody;\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function break_\n * @memberof SsmlProsody#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.break_ = function break_(attributes) {\n  return new SsmlBreak(this.prosody.ele('break', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function ssmlBreak\n * @memberof SsmlProsody#\n * @deprecated - Use break_() instead.\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes)\n    {\n  return this.break_(attributes);\n}, 'ssmlBreak() is deprecated. Use break_() instead.');\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function emphasis\n * @memberof SsmlProsody#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.emphasis = function emphasis(attributes, words) {\n  return new SsmlEmphasis(this.prosody.ele('emphasis', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function ssmlEmphasis\n * @memberof SsmlProsody#\n * @deprecated - Use emphasis() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlEmphasis = util.deprecate(function\n    ssmlEmphasis(attributes, words) {\n  return this.emphasis(attributes, words);\n}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.');\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function lang\n * @memberof SsmlProsody#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.lang = function lang(attributes, words) {\n  return new SsmlLang(this.prosody.ele('lang', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function ssmlLang\n * @memberof SsmlProsody#\n * @deprecated - Use lang() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes,\n    words) {\n  return this.lang(attributes, words);\n}, 'ssmlLang() is deprecated. Use lang() instead.');\n\n/* jshint ignore:start */\n/**\n * Adding a Pause Between Paragraphs in <Say>\n *\n * @function p\n * @memberof SsmlProsody#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlP\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.p = function p(attributes, words) {\n  return new SsmlP(this.prosody.ele('p', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause Between Paragraphs in <Say>\n *\n * @function ssmlP\n * @memberof SsmlProsody#\n * @deprecated - Use p() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlP\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlP = util.deprecate(function ssmlP(attributes, words) {\n  return this.p(attributes, words);\n}, 'ssmlP() is deprecated. Use p() instead.');\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function phoneme\n * @memberof SsmlProsody#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.phoneme = function phoneme(attributes, words) {\n  return new SsmlPhoneme(this.prosody.ele('phoneme', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function ssmlPhoneme\n * @memberof SsmlProsody#\n * @deprecated - Use phoneme() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlPhoneme = util.deprecate(function\n    ssmlPhoneme(attributes, words) {\n  return this.phoneme(attributes, words);\n}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.');\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function prosody\n * @memberof SsmlProsody#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.prosody = function prosody(attributes, words) {\n  return new SsmlProsody(this.prosody.ele('prosody', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function ssmlProsody\n * @memberof SsmlProsody#\n * @deprecated - Use prosody() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlProsody = util.deprecate(function\n    ssmlProsody(attributes, words) {\n  return this.prosody(attributes, words);\n}, 'ssmlProsody() is deprecated. Use prosody() instead.');\n\n/* jshint ignore:start */\n/**\n * Adding A Pause Between Sentences in <Say>\n *\n * @function s\n * @memberof SsmlProsody#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlS\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.s = function s(attributes, words) {\n  return new SsmlS(this.prosody.ele('s', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Adding A Pause Between Sentences in <Say>\n *\n * @function ssmlS\n * @memberof SsmlProsody#\n * @deprecated - Use s() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlS\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlS = util.deprecate(function ssmlS(attributes, words) {\n  return this.s(attributes, words);\n}, 'ssmlS() is deprecated. Use s() instead.');\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function sayAs\n * @memberof SsmlProsody#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.sayAs = function sayAs(attributes, words) {\n  return new SsmlSayAs(this.prosody.ele('say-as', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function ssmlSayAs\n * @memberof SsmlProsody#\n * @deprecated - Use sayAs() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes,\n    words) {\n  return this.sayAs(attributes, words);\n}, 'ssmlSayAs() is deprecated. Use sayAs() instead.');\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function sub\n * @memberof SsmlProsody#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.sub = function sub(attributes, words) {\n  return new SsmlSub(this.prosody.ele('sub', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function ssmlSub\n * @memberof SsmlProsody#\n * @deprecated - Use sub() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes,\n    words) {\n  return this.sub(attributes, words);\n}, 'ssmlSub() is deprecated. Use sub() instead.');\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function w\n * @memberof SsmlProsody#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.w = function w(attributes, words) {\n  return new SsmlW(this.prosody.ele('w', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function ssmlW\n * @memberof SsmlProsody#\n * @deprecated - Use w() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlProsody.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) {\n  return this.w(attributes, words);\n}, 'ssmlW() is deprecated. Use w() instead.');\n\n\n/* jshint ignore:start */\n/**\n * Adding A Pause Between Sentences in <Say>\n *\n * @constructor SsmlS\n *\n * @param {object} ssmlS - Adding A Pause Between Sentences in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlS(ssmlS) {\n  this.ssmlS = ssmlS;\n  this._propertyName = 'ssmlS';\n}\n\nSsmlS.prototype = Object.create(TwiML.prototype);\nSsmlS.prototype.constructor = SsmlS;\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function break_\n * @memberof SsmlS#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlS.prototype.break_ = function break_(attributes) {\n  return new SsmlBreak(this.s.ele('break', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function ssmlBreak\n * @memberof SsmlS#\n * @deprecated - Use break_() instead.\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlS.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) {\n  return this.break_(attributes);\n}, 'ssmlBreak() is deprecated. Use break_() instead.');\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function emphasis\n * @memberof SsmlS#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlS.prototype.emphasis = function emphasis(attributes, words) {\n  return new SsmlEmphasis(this.s.ele('emphasis', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function ssmlEmphasis\n * @memberof SsmlS#\n * @deprecated - Use emphasis() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlS.prototype.ssmlEmphasis = util.deprecate(function ssmlEmphasis(attributes,\n    words) {\n  return this.emphasis(attributes, words);\n}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.');\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function lang\n * @memberof SsmlS#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlS.prototype.lang = function lang(attributes, words) {\n  return new SsmlLang(this.s.ele('lang', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function ssmlLang\n * @memberof SsmlS#\n * @deprecated - Use lang() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlS.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, words) {\n  return this.lang(attributes, words);\n}, 'ssmlLang() is deprecated. Use lang() instead.');\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function phoneme\n * @memberof SsmlS#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlS.prototype.phoneme = function phoneme(attributes, words) {\n  return new SsmlPhoneme(this.s.ele('phoneme', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function ssmlPhoneme\n * @memberof SsmlS#\n * @deprecated - Use phoneme() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlS.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes,\n    words) {\n  return this.phoneme(attributes, words);\n}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.');\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function prosody\n * @memberof SsmlS#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlS.prototype.prosody = function prosody(attributes, words) {\n  return new SsmlProsody(this.s.ele('prosody', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function ssmlProsody\n * @memberof SsmlS#\n * @deprecated - Use prosody() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlS.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes,\n    words) {\n  return this.prosody(attributes, words);\n}, 'ssmlProsody() is deprecated. Use prosody() instead.');\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function sayAs\n * @memberof SsmlS#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlS.prototype.sayAs = function sayAs(attributes, words) {\n  return new SsmlSayAs(this.s.ele('say-as', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function ssmlSayAs\n * @memberof SsmlS#\n * @deprecated - Use sayAs() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlS.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, words)\n    {\n  return this.sayAs(attributes, words);\n}, 'ssmlSayAs() is deprecated. Use sayAs() instead.');\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function sub\n * @memberof SsmlS#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlS.prototype.sub = function sub(attributes, words) {\n  return new SsmlSub(this.s.ele('sub', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function ssmlSub\n * @memberof SsmlS#\n * @deprecated - Use sub() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlS.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words) {\n  return this.sub(attributes, words);\n}, 'ssmlSub() is deprecated. Use sub() instead.');\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function w\n * @memberof SsmlS#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlS.prototype.w = function w(attributes, words) {\n  return new SsmlW(this.s.ele('w', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function ssmlW\n * @memberof SsmlS#\n * @deprecated - Use w() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlS.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) {\n  return this.w(attributes, words);\n}, 'ssmlW() is deprecated. Use w() instead.');\n\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @constructor SsmlPhoneme\n *\n * @param {object} ssmlPhoneme - Using Phonetic Pronunciation in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlPhoneme(ssmlPhoneme) {\n  this.ssmlPhoneme = ssmlPhoneme;\n  this._propertyName = 'ssmlPhoneme';\n}\n\nSsmlPhoneme.prototype = Object.create(TwiML.prototype);\nSsmlPhoneme.prototype.constructor = SsmlPhoneme;\n\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @constructor SsmlLang\n *\n * @param {object} ssmlLang -\n *          Specifying Another Language for Specific Words in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlLang(ssmlLang) {\n  this.ssmlLang = ssmlLang;\n  this._propertyName = 'ssmlLang';\n}\n\nSsmlLang.prototype = Object.create(TwiML.prototype);\nSsmlLang.prototype.constructor = SsmlLang;\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function break_\n * @memberof SsmlLang#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlLang.prototype.break_ = function break_(attributes) {\n  return new SsmlBreak(this.lang.ele('break', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function ssmlBreak\n * @memberof SsmlLang#\n * @deprecated - Use break_() instead.\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) {\n  return this.break_(attributes);\n}, 'ssmlBreak() is deprecated. Use break_() instead.');\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function emphasis\n * @memberof SsmlLang#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlLang.prototype.emphasis = function emphasis(attributes, words) {\n  return new SsmlEmphasis(this.lang.ele('emphasis', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function ssmlEmphasis\n * @memberof SsmlLang#\n * @deprecated - Use emphasis() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlEmphasis = util.deprecate(function\n    ssmlEmphasis(attributes, words) {\n  return this.emphasis(attributes, words);\n}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.');\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function lang\n * @memberof SsmlLang#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlLang.prototype.lang = function lang(attributes, words) {\n  return new SsmlLang(this.lang.ele('lang', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function ssmlLang\n * @memberof SsmlLang#\n * @deprecated - Use lang() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes,\n    words) {\n  return this.lang(attributes, words);\n}, 'ssmlLang() is deprecated. Use lang() instead.');\n\n/* jshint ignore:start */\n/**\n * Adding a Pause Between Paragraphs in <Say>\n *\n * @function p\n * @memberof SsmlLang#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlP\n */\n/* jshint ignore:end */\nSsmlLang.prototype.p = function p(attributes, words) {\n  return new SsmlP(this.lang.ele('p', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause Between Paragraphs in <Say>\n *\n * @function ssmlP\n * @memberof SsmlLang#\n * @deprecated - Use p() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlP\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlP = util.deprecate(function ssmlP(attributes, words) {\n  return this.p(attributes, words);\n}, 'ssmlP() is deprecated. Use p() instead.');\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function phoneme\n * @memberof SsmlLang#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlLang.prototype.phoneme = function phoneme(attributes, words) {\n  return new SsmlPhoneme(this.lang.ele('phoneme', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function ssmlPhoneme\n * @memberof SsmlLang#\n * @deprecated - Use phoneme() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes,\n    words) {\n  return this.phoneme(attributes, words);\n}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.');\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function prosody\n * @memberof SsmlLang#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlLang.prototype.prosody = function prosody(attributes, words) {\n  return new SsmlProsody(this.lang.ele('prosody', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function ssmlProsody\n * @memberof SsmlLang#\n * @deprecated - Use prosody() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes,\n    words) {\n  return this.prosody(attributes, words);\n}, 'ssmlProsody() is deprecated. Use prosody() instead.');\n\n/* jshint ignore:start */\n/**\n * Adding A Pause Between Sentences in <Say>\n *\n * @function s\n * @memberof SsmlLang#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlS\n */\n/* jshint ignore:end */\nSsmlLang.prototype.s = function s(attributes, words) {\n  return new SsmlS(this.lang.ele('s', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Adding A Pause Between Sentences in <Say>\n *\n * @function ssmlS\n * @memberof SsmlLang#\n * @deprecated - Use s() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlS\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlS = util.deprecate(function ssmlS(attributes, words) {\n  return this.s(attributes, words);\n}, 'ssmlS() is deprecated. Use s() instead.');\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function sayAs\n * @memberof SsmlLang#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlLang.prototype.sayAs = function sayAs(attributes, words) {\n  return new SsmlSayAs(this.lang.ele('say-as', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function ssmlSayAs\n * @memberof SsmlLang#\n * @deprecated - Use sayAs() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes,\n    words) {\n  return this.sayAs(attributes, words);\n}, 'ssmlSayAs() is deprecated. Use sayAs() instead.');\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function sub\n * @memberof SsmlLang#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlLang.prototype.sub = function sub(attributes, words) {\n  return new SsmlSub(this.lang.ele('sub', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function ssmlSub\n * @memberof SsmlLang#\n * @deprecated - Use sub() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words)\n    {\n  return this.sub(attributes, words);\n}, 'ssmlSub() is deprecated. Use sub() instead.');\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function w\n * @memberof SsmlLang#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlLang.prototype.w = function w(attributes, words) {\n  return new SsmlW(this.lang.ele('w', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function ssmlW\n * @memberof SsmlLang#\n * @deprecated - Use w() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlLang.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) {\n  return this.w(attributes, words);\n}, 'ssmlW() is deprecated. Use w() instead.');\n\n\n/* jshint ignore:start */\n/**\n * Adding a Pause Between Paragraphs in <Say>\n *\n * @constructor SsmlP\n *\n * @param {object} ssmlP - Adding a Pause Between Paragraphs in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlP(ssmlP) {\n  this.ssmlP = ssmlP;\n  this._propertyName = 'ssmlP';\n}\n\nSsmlP.prototype = Object.create(TwiML.prototype);\nSsmlP.prototype.constructor = SsmlP;\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function break_\n * @memberof SsmlP#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlP.prototype.break_ = function break_(attributes) {\n  return new SsmlBreak(this.p.ele('break', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function ssmlBreak\n * @memberof SsmlP#\n * @deprecated - Use break_() instead.\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlP.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes) {\n  return this.break_(attributes);\n}, 'ssmlBreak() is deprecated. Use break_() instead.');\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function emphasis\n * @memberof SsmlP#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlP.prototype.emphasis = function emphasis(attributes, words) {\n  return new SsmlEmphasis(this.p.ele('emphasis', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function ssmlEmphasis\n * @memberof SsmlP#\n * @deprecated - Use emphasis() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlP.prototype.ssmlEmphasis = util.deprecate(function ssmlEmphasis(attributes,\n    words) {\n  return this.emphasis(attributes, words);\n}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.');\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function lang\n * @memberof SsmlP#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlP.prototype.lang = function lang(attributes, words) {\n  return new SsmlLang(this.p.ele('lang', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function ssmlLang\n * @memberof SsmlP#\n * @deprecated - Use lang() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlP.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes, words) {\n  return this.lang(attributes, words);\n}, 'ssmlLang() is deprecated. Use lang() instead.');\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function phoneme\n * @memberof SsmlP#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlP.prototype.phoneme = function phoneme(attributes, words) {\n  return new SsmlPhoneme(this.p.ele('phoneme', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function ssmlPhoneme\n * @memberof SsmlP#\n * @deprecated - Use phoneme() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlP.prototype.ssmlPhoneme = util.deprecate(function ssmlPhoneme(attributes,\n    words) {\n  return this.phoneme(attributes, words);\n}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.');\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function prosody\n * @memberof SsmlP#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlP.prototype.prosody = function prosody(attributes, words) {\n  return new SsmlProsody(this.p.ele('prosody', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function ssmlProsody\n * @memberof SsmlP#\n * @deprecated - Use prosody() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlP.prototype.ssmlProsody = util.deprecate(function ssmlProsody(attributes,\n    words) {\n  return this.prosody(attributes, words);\n}, 'ssmlProsody() is deprecated. Use prosody() instead.');\n\n/* jshint ignore:start */\n/**\n * Adding A Pause Between Sentences in <Say>\n *\n * @function s\n * @memberof SsmlP#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlS\n */\n/* jshint ignore:end */\nSsmlP.prototype.s = function s(attributes, words) {\n  return new SsmlS(this.p.ele('s', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Adding A Pause Between Sentences in <Say>\n *\n * @function ssmlS\n * @memberof SsmlP#\n * @deprecated - Use s() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} words - Words to speak\n *\n * @returns SsmlS\n */\n/* jshint ignore:end */\nSsmlP.prototype.ssmlS = util.deprecate(function ssmlS(attributes, words) {\n  return this.s(attributes, words);\n}, 'ssmlS() is deprecated. Use s() instead.');\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function sayAs\n * @memberof SsmlP#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlP.prototype.sayAs = function sayAs(attributes, words) {\n  return new SsmlSayAs(this.p.ele('say-as', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function ssmlSayAs\n * @memberof SsmlP#\n * @deprecated - Use sayAs() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlP.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes, words)\n    {\n  return this.sayAs(attributes, words);\n}, 'ssmlSayAs() is deprecated. Use sayAs() instead.');\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function sub\n * @memberof SsmlP#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlP.prototype.sub = function sub(attributes, words) {\n  return new SsmlSub(this.p.ele('sub', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function ssmlSub\n * @memberof SsmlP#\n * @deprecated - Use sub() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlP.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes, words) {\n  return this.sub(attributes, words);\n}, 'ssmlSub() is deprecated. Use sub() instead.');\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function w\n * @memberof SsmlP#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlP.prototype.w = function w(attributes, words) {\n  return new SsmlW(this.p.ele('w', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function ssmlW\n * @memberof SsmlP#\n * @deprecated - Use w() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlP.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words) {\n  return this.w(attributes, words);\n}, 'ssmlW() is deprecated. Use w() instead.');\n\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @constructor SsmlEmphasis\n *\n * @param {object} ssmlEmphasis - Emphasizing Words in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlEmphasis(ssmlEmphasis) {\n  this.ssmlEmphasis = ssmlEmphasis;\n  this._propertyName = 'ssmlEmphasis';\n}\n\nSsmlEmphasis.prototype = Object.create(TwiML.prototype);\nSsmlEmphasis.prototype.constructor = SsmlEmphasis;\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function break_\n * @memberof SsmlEmphasis#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.break_ = function break_(attributes) {\n  return new SsmlBreak(this.emphasis.ele('break', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @function ssmlBreak\n * @memberof SsmlEmphasis#\n * @deprecated - Use break_() instead.\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {ssml_break.strength} [attributes.strength] -\n *          Set a pause based on strength\n * @param {string} [attributes.time] -\n *          Set a pause to a specific length of time in seconds or milliseconds, available values: [number]s, [number]ms\n *\n * @returns SsmlBreak\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.ssmlBreak = util.deprecate(function ssmlBreak(attributes)\n    {\n  return this.break_(attributes);\n}, 'ssmlBreak() is deprecated. Use break_() instead.');\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function emphasis\n * @memberof SsmlEmphasis#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.emphasis = function emphasis(attributes, words) {\n  return new SsmlEmphasis(this.emphasis.ele('emphasis', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Emphasizing Words in <Say>\n *\n * @function ssmlEmphasis\n * @memberof SsmlEmphasis#\n * @deprecated - Use emphasis() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_emphasis.level} [attributes.level] - Specify the degree of emphasis\n * @param {string} words - Words to emphasize\n *\n * @returns SsmlEmphasis\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.ssmlEmphasis = util.deprecate(function\n    ssmlEmphasis(attributes, words) {\n  return this.emphasis(attributes, words);\n}, 'ssmlEmphasis() is deprecated. Use emphasis() instead.');\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function lang\n * @memberof SsmlEmphasis#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.lang = function lang(attributes, words) {\n  return new SsmlLang(this.emphasis.ele('lang', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Specifying Another Language for Specific Words in <Say>\n *\n * @function ssmlLang\n * @memberof SsmlEmphasis#\n * @deprecated - Use lang() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_lang.xml_lang} [attributes.xml:lang] - Specify the language\n * @param {string} words - Words to speak\n *\n * @returns SsmlLang\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.ssmlLang = util.deprecate(function ssmlLang(attributes,\n    words) {\n  return this.lang(attributes, words);\n}, 'ssmlLang() is deprecated. Use lang() instead.');\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function phoneme\n * @memberof SsmlEmphasis#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.phoneme = function phoneme(attributes, words) {\n  return new SsmlPhoneme(this.emphasis.ele('phoneme', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Using Phonetic Pronunciation in <Say>\n *\n * @function ssmlPhoneme\n * @memberof SsmlEmphasis#\n * @deprecated - Use phoneme() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_phoneme.alphabet} [attributes.alphabet] -\n *          Specify the phonetic alphabet\n * @param {string} [attributes.ph] -\n *          Specifiy the phonetic symbols for pronunciation\n * @param {string} words - Words to speak\n *\n * @returns SsmlPhoneme\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.ssmlPhoneme = util.deprecate(function\n    ssmlPhoneme(attributes, words) {\n  return this.phoneme(attributes, words);\n}, 'ssmlPhoneme() is deprecated. Use phoneme() instead.');\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function prosody\n * @memberof SsmlEmphasis#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.prosody = function prosody(attributes, words) {\n  return new SsmlProsody(this.emphasis.ele('prosody', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controling Volume, Speaking Rate, and Pitch in <Say>\n *\n * @function ssmlProsody\n * @memberof SsmlEmphasis#\n * @deprecated - Use prosody() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.volume] -\n *          Specify the volume, available values: default, silent, x-soft, soft, medium, loud, x-loud, +ndB, -ndB\n * @param {string} [attributes.rate] -\n *          Specify the rate, available values: x-slow, slow, medium, fast, x-fast, n%\n * @param {string} [attributes.pitch] -\n *          Specify the pitch, available values: default, x-low, low, medium, high, x-high, +n%, -n%\n * @param {string} words - Words to speak\n *\n * @returns SsmlProsody\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.ssmlProsody = util.deprecate(function\n    ssmlProsody(attributes, words) {\n  return this.prosody(attributes, words);\n}, 'ssmlProsody() is deprecated. Use prosody() instead.');\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function sayAs\n * @memberof SsmlEmphasis#\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.sayAs = function sayAs(attributes, words) {\n  return new SsmlSayAs(this.emphasis.ele('say-as', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Controlling How Special Types of Words Are Spoken in <Say>\n *\n * @function ssmlSayAs\n * @memberof SsmlEmphasis#\n * @deprecated - Use sayAs() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {ssml_say_as.interpret_as} [attributes.interpret-\n *         as] - Specify the type of words are spoken\n * @param {ssml_say_as.role} [attributes.role] -\n *          Specify the format of the date when interpret-as is set to date\n * @param {string} words - Words to be interpreted\n *\n * @returns SsmlSayAs\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.ssmlSayAs = util.deprecate(function ssmlSayAs(attributes,\n    words) {\n  return this.sayAs(attributes, words);\n}, 'ssmlSayAs() is deprecated. Use sayAs() instead.');\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function sub\n * @memberof SsmlEmphasis#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.sub = function sub(attributes, words) {\n  return new SsmlSub(this.emphasis.ele('sub', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Pronouncing Acronyms and Abbreviations in <Say>\n *\n * @function ssmlSub\n * @memberof SsmlEmphasis#\n * @deprecated - Use sub() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.alias] -\n *          Substitute a different word (or pronunciation) for selected text such as an acronym or abbreviation\n * @param {string} words - Words to be substituted\n *\n * @returns SsmlSub\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.ssmlSub = util.deprecate(function ssmlSub(attributes,\n    words) {\n  return this.sub(attributes, words);\n}, 'ssmlSub() is deprecated. Use sub() instead.');\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function w\n * @memberof SsmlEmphasis#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.w = function w(attributes, words) {\n  return new SsmlW(this.emphasis.ele('w', attributes, words));\n};\n\n/* jshint ignore:start */\n/**\n * Improving Pronunciation by Specifying Parts of Speech in <Say>\n *\n * @function ssmlW\n * @memberof SsmlEmphasis#\n * @deprecated - Use w() instead.\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.role] -\n *          Customize the pronunciation of words by specifying the word\u2019s part of speech or alternate meaning\n * @param {string} words - Words to speak\n *\n * @returns SsmlW\n */\n/* jshint ignore:end */\nSsmlEmphasis.prototype.ssmlW = util.deprecate(function ssmlW(attributes, words)\n    {\n  return this.w(attributes, words);\n}, 'ssmlW() is deprecated. Use w() instead.');\n\n\n/* jshint ignore:start */\n/**\n * Adding a Pause in <Say>\n *\n * @constructor SsmlBreak\n *\n * @param {object} ssmlBreak - Adding a Pause in <Say>\n */\n/* jshint ignore:end */\nfunction SsmlBreak(ssmlBreak) {\n  this.ssmlBreak = ssmlBreak;\n  this._propertyName = 'ssmlBreak';\n}\n\nSsmlBreak.prototype = Object.create(TwiML.prototype);\nSsmlBreak.prototype.constructor = SsmlBreak;\n\n\n/* jshint ignore:start */\n/**\n * <Pay> Twiml Verb\n *\n * @constructor Pay\n *\n * @param {object} pay - <Pay> Twiml Verb\n */\n/* jshint ignore:end */\nfunction Pay(pay) {\n  this.pay = pay;\n  this._propertyName = 'pay';\n}\n\nPay.prototype = Object.create(TwiML.prototype);\nPay.prototype.constructor = Pay;\n\n/* jshint ignore:start */\n/**\n * <Prompt> Twiml Verb\n *\n * @function prompt\n * @memberof Pay#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {prompt.for} [attributes.for_] - Name of the payment source data element\n * @param {prompt.error_type} [attributes.errorType] - Type of error\n * @param {prompt.card_type} [attributes.cardType] - Type of the credit card\n * @param {number} [attributes.attempt] - Current attempt count\n *\n * @returns Prompt\n */\n/* jshint ignore:end */\nPay.prototype.prompt = function prompt(attributes) {\n  return new Prompt(this.pay.ele('Prompt', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Parameter> TwiML Noun\n *\n * @function parameter\n * @memberof Pay#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.name] - The name of the custom parameter\n * @param {string} [attributes.value] - The value of the custom parameter\n *\n * @returns Parameter\n */\n/* jshint ignore:end */\nPay.prototype.parameter = function parameter(attributes) {\n  return new Parameter(this.pay.ele('Parameter', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Sms> TwiML Noun\n *\n * @constructor Sms\n *\n * @param {object} sms - <Sms> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Sms(sms) {\n  this.sms = sms;\n  this._propertyName = 'sms';\n}\n\nSms.prototype = Object.create(TwiML.prototype);\nSms.prototype.constructor = Sms;\n\n\n/* jshint ignore:start */\n/**\n * <Reject> TwiML Verb\n *\n * @constructor Reject\n *\n * @param {object} reject - <Reject> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Reject(reject) {\n  this.reject = reject;\n  this._propertyName = 'reject';\n}\n\nReject.prototype = Object.create(TwiML.prototype);\nReject.prototype.constructor = Reject;\n\n\n/* jshint ignore:start */\n/**\n * <Redirect> TwiML Verb\n *\n * @constructor Redirect\n *\n * @param {object} redirect - <Redirect> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Redirect(redirect) {\n  this.redirect = redirect;\n  this._propertyName = 'redirect';\n}\n\nRedirect.prototype = Object.create(TwiML.prototype);\nRedirect.prototype.constructor = Redirect;\n\n\n/* jshint ignore:start */\n/**\n * <Record> TwiML Verb\n *\n * @constructor Record\n *\n * @param {object} record - <Record> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Record(record) {\n  this.record = record;\n  this._propertyName = 'record';\n}\n\nRecord.prototype = Object.create(TwiML.prototype);\nRecord.prototype.constructor = Record;\n\n\n/* jshint ignore:start */\n/**\n * <Queue> TwiML Noun\n *\n * @constructor Queue\n *\n * @param {object} queue - <Queue> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Queue(queue) {\n  this.queue = queue;\n  this._propertyName = 'queue';\n}\n\nQueue.prototype = Object.create(TwiML.prototype);\nQueue.prototype.constructor = Queue;\n\n\n/* jshint ignore:start */\n/**\n * <Leave> TwiML Verb\n *\n * @constructor Leave\n *\n * @param {object} leave - <Leave> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Leave(leave) {\n  this.leave = leave;\n  this._propertyName = 'leave';\n}\n\nLeave.prototype = Object.create(TwiML.prototype);\nLeave.prototype.constructor = Leave;\n\n\n/* jshint ignore:start */\n/**\n * <Hangup> TwiML Verb\n *\n * @constructor Hangup\n *\n * @param {object} hangup - <Hangup> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Hangup(hangup) {\n  this.hangup = hangup;\n  this._propertyName = 'hangup';\n}\n\nHangup.prototype = Object.create(TwiML.prototype);\nHangup.prototype.constructor = Hangup;\n\n\n/* jshint ignore:start */\n/**\n * <Gather> TwiML Verb\n *\n * @constructor Gather\n *\n * @param {object} gather - <Gather> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Gather(gather) {\n  this.gather = gather;\n  this._propertyName = 'gather';\n}\n\nGather.prototype = Object.create(TwiML.prototype);\nGather.prototype.constructor = Gather;\n\n/* jshint ignore:start */\n/**\n * <Say> TwiML Verb\n *\n * @function say\n * @memberof Gather#\n *\n * @param {object} attributes - TwiML attributes\n * @param {say.voice} [attributes.voice] - Voice to use\n * @param {number} [attributes.loop] - Times to loop message\n * @param {say.language} [attributes.language] - Message langauge\n * @param {string} message - Message to say\n *\n * @returns Say\n */\n/* jshint ignore:end */\nGather.prototype.say = function say(attributes, message) {\n  return new Say(this.gather.ele('Say', attributes, message));\n};\n\n/* jshint ignore:start */\n/**\n * <Pause> TwiML Verb\n *\n * @function pause\n * @memberof Gather#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {number} [attributes.length] - Length in seconds to pause\n *\n * @returns Pause\n */\n/* jshint ignore:end */\nGather.prototype.pause = function pause(attributes) {\n  return new Pause(this.gather.ele('Pause', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <Play> TwiML Verb\n *\n * @function play\n * @memberof Gather#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {number} [attributes.loop] - Times to loop media\n * @param {string} [attributes.digits] - Play DTMF tones for digits\n * @param {url} [url] - Media URL\n *\n * @returns Play\n */\n/* jshint ignore:end */\nGather.prototype.play = function play(attributes, url) {\n  return new Play(this.gather.ele('Play', attributes, url));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Enqueue> TwiML Noun\n *\n * @constructor Enqueue\n *\n * @param {object} enqueue - <Enqueue> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Enqueue(enqueue) {\n  this.enqueue = enqueue;\n  this._propertyName = 'enqueue';\n}\n\nEnqueue.prototype = Object.create(TwiML.prototype);\nEnqueue.prototype.constructor = Enqueue;\n\n/* jshint ignore:start */\n/**\n * <Task> TwiML Noun\n *\n * @function task\n * @memberof Enqueue#\n *\n * @param {object} attributes - TwiML attributes\n * @param {number} [attributes.priority] - Task priority\n * @param {number} [attributes.timeout] - Timeout associated with task\n * @param {string} body - TaskRouter task attributes\n *\n * @returns Task\n */\n/* jshint ignore:end */\nEnqueue.prototype.task = function task(attributes, body) {\n  return new Task(this.enqueue.ele('Task', attributes, body));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Task> TwiML Noun\n *\n * @constructor Task\n *\n * @param {object} task - <Task> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Task(task) {\n  this.task = task;\n  this._propertyName = 'task';\n}\n\nTask.prototype = Object.create(TwiML.prototype);\nTask.prototype.constructor = Task;\n\n\n/* jshint ignore:start */\n/**\n * <Echo> TwiML Verb\n *\n * @constructor Echo\n *\n * @param {object} echo - <Echo> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Echo(echo) {\n  this.echo = echo;\n  this._propertyName = 'echo';\n}\n\nEcho.prototype = Object.create(TwiML.prototype);\nEcho.prototype.constructor = Echo;\n\n\n/* jshint ignore:start */\n/**\n * <Dial> TwiML Verb\n *\n * @constructor Dial\n *\n * @param {object} dial - <Dial> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Dial(dial) {\n  this.dial = dial;\n  this._propertyName = 'dial';\n}\n\nDial.prototype = Object.create(TwiML.prototype);\nDial.prototype.constructor = Dial;\n\n/* jshint ignore:start */\n/**\n * <Client> TwiML Noun\n *\n * @function client\n * @memberof Dial#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.url] - Client URL\n * @param {string} [attributes.method] - Client URL Method\n * @param {client.event} [attributes.statusCallbackEvent] -\n *          Events to trigger status callback\n * @param {string} [attributes.statusCallback] - Status Callback URL\n * @param {string} [attributes.statusCallbackMethod] - Status Callback URL Method\n * @param {string} [identity] - Client identity\n *\n * @returns Client\n */\n/* jshint ignore:end */\nDial.prototype.client = function client(attributes, identity) {\n  return new Client(this.dial.ele('Client', attributes, identity));\n};\n\n/* jshint ignore:start */\n/**\n * <Conference> TwiML Noun\n *\n * @function conference\n * @memberof Dial#\n *\n * @param {object} attributes - TwiML attributes\n * @param {boolean} [attributes.muted] - Join the conference muted\n * @param {conference.beep} [attributes.beep] - Play beep when joining\n * @param {boolean} [attributes.startConferenceOnEnter] -\n *          Start the conference on enter\n * @param {boolean} [attributes.endConferenceOnExit] - End the conferenceon exit\n * @param {string} [attributes.waitUrl] - Wait URL\n * @param {string} [attributes.waitMethod] - Wait URL method\n * @param {number} [attributes.maxParticipants] - Maximum number of participants\n * @param {conference.record} [attributes.record] - Record the conference\n * @param {conference.region} [attributes.region] - Conference region\n * @param {string} [attributes.coach] - Call coach\n * @param {conference.trim} [attributes.trim] - Trim the conference recording\n * @param {conference.event} [attributes.statusCallbackEvent] -\n *          Events to call status callback URL\n * @param {string} [attributes.statusCallback] - Status callback URL\n * @param {string} [attributes.statusCallbackMethod] - Status callback URL method\n * @param {string} [attributes.recordingStatusCallback] -\n *          Recording status callback URL\n * @param {string} [attributes.recordingStatusCallbackMethod] -\n *          Recording status callback URL method\n * @param {conference.recording_event} [attributes.recordingStatusCallbackEvent] -\n *          Recording status callback events\n * @param {string} [attributes.eventCallbackUrl] - Event callback URL\n * @param {conference.jitter_buffer_size} [attributes.jitterBufferSize] -\n *          Size of jitter buffer for participant\n * @param {string} [attributes.participantLabel] - A label for participant\n * @param {string} name - Conference name\n *\n * @returns Conference\n */\n/* jshint ignore:end */\nDial.prototype.conference = function conference(attributes, name) {\n  return new Conference(this.dial.ele('Conference', attributes, name));\n};\n\n/* jshint ignore:start */\n/**\n * <Number> TwiML Noun\n *\n * @function number\n * @memberof Dial#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.sendDigits] -\n *          DTMF tones to play when the call is answered\n * @param {string} [attributes.url] - TwiML URL\n * @param {string} [attributes.method] - TwiML URL method\n * @param {number.event} [attributes.statusCallbackEvent] -\n *          Events to call status callback\n * @param {string} [attributes.statusCallback] - Status callback URL\n * @param {string} [attributes.statusCallbackMethod] - Status callback URL method\n * @param {string} [attributes.byoc] - BYOC trunk SID (Beta)\n * @param {phone_number} phoneNumber - Phone Number to dial\n *\n * @returns Number\n */\n/* jshint ignore:end */\nDial.prototype.number = function number(attributes, phoneNumber) {\n  return new Number(this.dial.ele('Number', attributes, phoneNumber));\n};\n\n/* jshint ignore:start */\n/**\n * <Queue> TwiML Noun\n *\n * @function queue\n * @memberof Dial#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.url] - Action URL\n * @param {string} [attributes.method] - Action URL method\n * @param {string} [attributes.reservationSid] - TaskRouter Reservation SID\n * @param {string} [attributes.postWorkActivitySid] - TaskRouter Activity SID\n * @param {string} name - Queue name\n *\n * @returns Queue\n */\n/* jshint ignore:end */\nDial.prototype.queue = function queue(attributes, name) {\n  return new Queue(this.dial.ele('Queue', attributes, name));\n};\n\n/* jshint ignore:start */\n/**\n * <Sim> TwiML Noun\n *\n * @function sim\n * @memberof Dial#\n *\n * @param {object} attributes - TwiML attributes\n * @param {sid} simSid - SIM SID\n *\n * @returns Sim\n */\n/* jshint ignore:end */\nDial.prototype.sim = function sim(attributes, simSid) {\n  return new Sim(this.dial.ele('Sim', attributes, simSid));\n};\n\n/* jshint ignore:start */\n/**\n * <Sip> TwiML Noun\n *\n * @function sip\n * @memberof Dial#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.username] - SIP Username\n * @param {string} [attributes.password] - SIP Password\n * @param {string} [attributes.url] - Action URL\n * @param {string} [attributes.method] - Action URL method\n * @param {sip.event} [attributes.statusCallbackEvent] - Status callback events\n * @param {string} [attributes.statusCallback] - Status callback URL\n * @param {string} [attributes.statusCallbackMethod] - Status callback URL method\n * @param {url} sipUrl - SIP URL\n *\n * @returns Sip\n */\n/* jshint ignore:end */\nDial.prototype.sip = function sip(attributes, sipUrl) {\n  return new Sip(this.dial.ele('Sip', attributes, sipUrl));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Sip> TwiML Noun\n *\n * @constructor Sip\n *\n * @param {object} sip - <Sip> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Sip(sip) {\n  this.sip = sip;\n  this._propertyName = 'sip';\n}\n\nSip.prototype = Object.create(TwiML.prototype);\nSip.prototype.constructor = Sip;\n\n\n/* jshint ignore:start */\n/**\n * <Sim> TwiML Noun\n *\n * @constructor Sim\n *\n * @param {object} sim - <Sim> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Sim(sim) {\n  this.sim = sim;\n  this._propertyName = 'sim';\n}\n\nSim.prototype = Object.create(TwiML.prototype);\nSim.prototype.constructor = Sim;\n\n\n/* jshint ignore:start */\n/**\n * <Number> TwiML Noun\n *\n * @constructor Number\n *\n * @param {object} number - <Number> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Number(number) {\n  this.number = number;\n  this._propertyName = 'number';\n}\n\nNumber.prototype = Object.create(TwiML.prototype);\nNumber.prototype.constructor = Number;\n\n\n/* jshint ignore:start */\n/**\n * <Conference> TwiML Noun\n *\n * @constructor Conference\n *\n * @param {object} conference - <Conference> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Conference(conference) {\n  this.conference = conference;\n  this._propertyName = 'conference';\n}\n\nConference.prototype = Object.create(TwiML.prototype);\nConference.prototype.constructor = Conference;\n\n\n/* jshint ignore:start */\n/**\n * <Client> TwiML Noun\n *\n * @constructor Client\n *\n * @param {object} client - <Client> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Client(client) {\n  this.client = client;\n  this._propertyName = 'client';\n}\n\nClient.prototype = Object.create(TwiML.prototype);\nClient.prototype.constructor = Client;\n\n/* jshint ignore:start */\n/**\n * <Identity> TwiML Noun\n *\n * @function identity\n * @memberof Client#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} clientIdentity - Identity of the client to dial\n *\n * @returns Identity\n */\n/* jshint ignore:end */\nClient.prototype.identity = function identity(attributes, clientIdentity) {\n  return new Identity(this.client.ele('Identity', attributes, clientIdentity));\n};\n\n/* jshint ignore:start */\n/**\n * <Parameter> TwiML Noun\n *\n * @function parameter\n * @memberof Client#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.name] - The name of the custom parameter\n * @param {string} [attributes.value] - The value of the custom parameter\n *\n * @returns Parameter\n */\n/* jshint ignore:end */\nClient.prototype.parameter = function parameter(attributes) {\n  return new Parameter(this.client.ele('Parameter', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Identity> TwiML Noun\n *\n * @constructor Identity\n *\n * @param {object} identity - <Identity> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Identity(identity) {\n  this.identity = identity;\n  this._propertyName = 'identity';\n}\n\nIdentity.prototype = Object.create(TwiML.prototype);\nIdentity.prototype.constructor = Identity;\n\n\n/* jshint ignore:start */\n/**\n * <Connect> TwiML Verb\n *\n * @constructor Connect\n *\n * @param {object} connect - <Connect> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Connect(connect) {\n  this.connect = connect;\n  this._propertyName = 'connect';\n}\n\nConnect.prototype = Object.create(TwiML.prototype);\nConnect.prototype.constructor = Connect;\n\n/* jshint ignore:start */\n/**\n * <Room> TwiML Noun\n *\n * @function room\n * @memberof Connect#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.participantIdentity] -\n *          Participant identity when connecting to the Room\n * @param {string} name - Room name\n *\n * @returns Room\n */\n/* jshint ignore:end */\nConnect.prototype.room = function room(attributes, name) {\n  return new Room(this.connect.ele('Room', attributes, name));\n};\n\n/* jshint ignore:start */\n/**\n * <Autopilot> TwiML Noun\n *\n * @function autopilot\n * @memberof Connect#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} name - Autopilot assistant sid or unique name\n *\n * @returns Autopilot\n */\n/* jshint ignore:end */\nConnect.prototype.autopilot = function autopilot(attributes, name) {\n  return new Autopilot(this.connect.ele('Autopilot', attributes, name));\n};\n\n/* jshint ignore:start */\n/**\n * <Stream> TwiML Noun\n *\n * @function stream\n * @memberof Connect#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.name] - Friendly name given to the Stream\n * @param {string} [attributes.connectorName] - Unique name for Stream Connector\n * @param {string} [attributes.url] -\n *          URL of the remote service where the Stream is routed\n * @param {stream.track} [attributes.track] -\n *          Track to be streamed to remote service\n * @param {string} [attributes.statusCallback] - Status Callback URL\n * @param {stream.status_callback_method} [attributes.statusCallbackMethod] -\n *          Status Callback URL method\n *\n * @returns Stream\n */\n/* jshint ignore:end */\nConnect.prototype.stream = function stream(attributes) {\n  return new Stream(this.connect.ele('Stream', attributes));\n};\n\n/* jshint ignore:start */\n/**\n * <VirtualAgent> TwiML Noun\n *\n * @function virtualAgent\n * @memberof Connect#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.connectorName] -\n *          Defines the conversation profile Dialogflow needs to use\n * @param {string} [attributes.language] -\n *          Language to be used by Dialogflow to transcribe speech\n * @param {boolean} [attributes.sentimentAnalysis] -\n *          Whether sentiment analysis needs to be enabled or not\n * @param {string} [attributes.statusCallback] -\n *          URL to post status callbacks from Twilio\n *\n * @returns VirtualAgent\n */\n/* jshint ignore:end */\nConnect.prototype.virtualAgent = function virtualAgent(attributes) {\n  return new VirtualAgent(this.connect.ele('VirtualAgent', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <VirtualAgent> TwiML Noun\n *\n * @constructor VirtualAgent\n *\n * @param {object} virtualAgent - <VirtualAgent> TwiML Noun\n */\n/* jshint ignore:end */\nfunction VirtualAgent(virtualAgent) {\n  this.virtualAgent = virtualAgent;\n  this._propertyName = 'virtualAgent';\n}\n\nVirtualAgent.prototype = Object.create(TwiML.prototype);\nVirtualAgent.prototype.constructor = VirtualAgent;\n\n\n/* jshint ignore:start */\n/**\n * <Autopilot> TwiML Noun\n *\n * @constructor Autopilot\n *\n * @param {object} autopilot - <Autopilot> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Autopilot(autopilot) {\n  this.autopilot = autopilot;\n  this._propertyName = 'autopilot';\n}\n\nAutopilot.prototype = Object.create(TwiML.prototype);\nAutopilot.prototype.constructor = Autopilot;\n\n\n/* jshint ignore:start */\n/**\n * <Room> TwiML Noun\n *\n * @constructor Room\n *\n * @param {object} room - <Room> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Room(room) {\n  this.room = room;\n  this._propertyName = 'room';\n}\n\nRoom.prototype = Object.create(TwiML.prototype);\nRoom.prototype.constructor = Room;\n\nmodule.exports = VoiceResponse;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar TwiML = require('./TwiML');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * <Response> TwiML for Messages\n *\n * @constructor MessagingResponse\n */\n/* jshint ignore:end */\nfunction MessagingResponse() {\n  TwiML.call(this);\n  this._propertyName = 'response';\n}\n\nMessagingResponse.prototype = Object.create(TwiML.prototype);\nMessagingResponse.prototype.constructor = MessagingResponse;\n\n/* jshint ignore:start */\n/**\n * <Message> TwiML Verb\n *\n * @function message\n * @memberof MessagingResponse#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.to] - Phone Number to send Message to\n * @param {string} [attributes.from] - Phone Number to send Message from\n * @param {string} [attributes.action] - Action URL\n * @param {string} [attributes.method] - Action URL Method\n * @param {string} [attributes.statusCallback] -\n *          Status callback URL. Deprecated in favor of action.\n * @param {string} body - Message Body\n *\n * @returns Message\n */\n/* jshint ignore:end */\nMessagingResponse.prototype.message = function message(attributes, body) {\n  return new Message(this.response.ele('Message', attributes, body));\n};\n\n/* jshint ignore:start */\n/**\n * <Redirect> TwiML Verb\n *\n * @function redirect\n * @memberof MessagingResponse#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} [attributes.method] - Redirect URL method\n * @param {url} url - Redirect URL\n *\n * @returns Redirect\n */\n/* jshint ignore:end */\nMessagingResponse.prototype.redirect = function redirect(attributes, url) {\n  return new Redirect(this.response.ele('Redirect', attributes, url));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Redirect> TwiML Verb\n *\n * @constructor Redirect\n *\n * @param {object} redirect - <Redirect> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Redirect(redirect) {\n  this.redirect = redirect;\n  this._propertyName = 'redirect';\n}\n\nRedirect.prototype = Object.create(TwiML.prototype);\nRedirect.prototype.constructor = Redirect;\n\n\n/* jshint ignore:start */\n/**\n * <Message> TwiML Verb\n *\n * @constructor Message\n *\n * @param {object} message - <Message> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Message(message) {\n  this.message = message;\n  this._propertyName = 'message';\n}\n\nMessage.prototype = Object.create(TwiML.prototype);\nMessage.prototype.constructor = Message;\n\n/* jshint ignore:start */\n/**\n * <Body> TwiML Noun\n *\n * @function body\n * @memberof Message#\n *\n * @param {object} attributes - TwiML attributes\n * @param {string} message - Message Body\n *\n * @returns Body\n */\n/* jshint ignore:end */\nMessage.prototype.body = function body(attributes, message) {\n  return new Body(this.message.ele('Body', attributes, message));\n};\n\n/* jshint ignore:start */\n/**\n * <Media> TwiML Noun\n *\n * @function media\n * @memberof Message#\n *\n * @param {object} attributes - TwiML attributes\n * @param {url} url - Media URL\n *\n * @returns Media\n */\n/* jshint ignore:end */\nMessage.prototype.media = function media(attributes, url) {\n  return new Media(this.message.ele('Media', attributes, url));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Media> TwiML Noun\n *\n * @constructor Media\n *\n * @param {object} media - <Media> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Media(media) {\n  this.media = media;\n  this._propertyName = 'media';\n}\n\nMedia.prototype = Object.create(TwiML.prototype);\nMedia.prototype.constructor = Media;\n\n\n/* jshint ignore:start */\n/**\n * <Body> TwiML Noun\n *\n * @constructor Body\n *\n * @param {object} body - <Body> TwiML Noun\n */\n/* jshint ignore:end */\nfunction Body(body) {\n  this.body = body;\n  this._propertyName = 'body';\n}\n\nBody.prototype = Object.create(TwiML.prototype);\nBody.prototype.constructor = Body;\n\nmodule.exports = MessagingResponse;\n", "'use strict';\n\n/* jshint ignore:start */\n/**\n * This code was generated by\n * \\ / _    _  _|   _  _\n *  | (_)\\/(_)(_|\\/| |(/_  v1.0.0\n *       /       /\n */\n/* jshint ignore:end */\n\nvar TwiML = require('./TwiML');  /* jshint ignore:line */\n\n\n/* jshint ignore:start */\n/**\n * <Response> TwiML for Faxes\n *\n * @constructor FaxResponse\n */\n/* jshint ignore:end */\nfunction FaxResponse() {\n  TwiML.call(this);\n  this._propertyName = 'response';\n}\n\nFaxResponse.prototype = Object.create(TwiML.prototype);\nFaxResponse.prototype.constructor = FaxResponse;\n\n/* jshint ignore:start */\n/**\n * <Receive> TwiML Verb\n *\n * @function receive\n * @memberof FaxResponse#\n *\n * @param {object} [attributes] - TwiML attributes\n * @param {string} [attributes.action] - Receive action URL\n * @param {string} [attributes.method] - Receive action URL method\n * @param {receive.media_type} [attributes.mediaType] -\n *          The media type used to store media in the fax media store\n * @param {receive.page_size} [attributes.pageSize] -\n *          What size to interpret received pages as\n * @param {boolean} [attributes.storeMedia] -\n *          Whether or not to store received media in the fax media store\n *\n * @returns Receive\n */\n/* jshint ignore:end */\nFaxResponse.prototype.receive = function receive(attributes) {\n  return new Receive(this.response.ele('Receive', attributes));\n};\n\n\n/* jshint ignore:start */\n/**\n * <Receive> TwiML Verb\n *\n * @constructor Receive\n *\n * @param {object} receive - <Receive> TwiML Verb\n */\n/* jshint ignore:end */\nfunction Receive(receive) {\n  this.receive = receive;\n  this._propertyName = 'receive';\n}\n\nReceive.prototype = Object.create(TwiML.prototype);\nReceive.prototype.constructor = Receive;\n\nmodule.exports = FaxResponse;\n", "'use strict';\n\nvar Twilio = require('./rest/Twilio');\nvar webhooks = require('./webhooks/webhooks');\nvar obsolete = require('./base/obsolete');\nvar RequestClient = require('./base/RequestClient');\n\n// Shorthand to automatically create a RestClient\nvar initializer = function(accountSid, authToken, opts) {\n  return new Twilio(accountSid, authToken, opts);\n};\n\n// Main functional components of the Twilio module\ninitializer.Twilio = Twilio;\ninitializer.jwt = { };\ninitializer.twiml = { };\ninitializer.RequestClient = RequestClient;\n\nvar AccessToken;\nObject.defineProperty(initializer.jwt,\n  'AccessToken', {\n    get: function() {\n      return AccessToken = AccessToken || require('./jwt/AccessToken');\n    }\n});\n\nvar ClientCapability;\nObject.defineProperty(initializer.jwt,\n  'ClientCapability', {\n    get: function() {\n      return ClientCapability = ClientCapability || require('./jwt/ClientCapability');\n    }\n});\n\nvar taskrouter;\nObject.defineProperty(initializer.jwt,\n  'taskrouter', {\n    get: function() {\n      return taskrouter = taskrouter || {\n        TaskRouterCapability: require('./jwt/taskrouter/TaskRouterCapability'),\n        util: require('./jwt/taskrouter/util')\n      };\n    }\n});\n\nvar VoiceResponse;\nObject.defineProperty(initializer.twiml,\n  'VoiceResponse', {\n    get: function() {\n      return VoiceResponse = VoiceResponse || require('./twiml/VoiceResponse');\n    }\n});\n\nvar MessagingResponse;\nObject.defineProperty(initializer.twiml,\n  'MessagingResponse', {\n    get: function() {\n      return MessagingResponse = MessagingResponse || require('./twiml/MessagingResponse');\n    }\n});\n\nvar FaxResponse;\nObject.defineProperty(initializer.twiml,\n  'FaxResponse', {\n    get: function() {\n      return FaxResponse = FaxResponse || require('./twiml/FaxResponse');\n    }\n});\n\n// Add obsolete clients\ninitializer.RestClient = obsolete.RestClient;\ninitializer.PricingClient = obsolete.PricingClient;\ninitializer.MonitorClient = obsolete.MonitorClient;\ninitializer.TaskRouterClient = obsolete.TaskRouterClient;\ninitializer.IpMessagingClient = obsolete.IpMessagingClient;\ninitializer.LookupsClient = obsolete.LookupsClient;\ninitializer.TrunkingClient = obsolete.TrunkingClient;\n\n// Setup webhook helper functionality\ninitializer.validateRequest = webhooks.validateRequest;\ninitializer.validateRequestWithBody = webhooks.validateRequestWithBody;\ninitializer.validateExpressRequest = webhooks.validateExpressRequest;\ninitializer.webhook = webhooks.webhook;\n\n// Public module interface is a function, which passes through to RestClient constructor\nmodule.exports = initializer;\n", "module.exports = require('./lib');", "import twilio from '../lib'\nimport { getHost, Reject, AI } from './helpers'\nimport { Twilio, TwimlInterface, JwtInterface } from '../index'\nimport { AIAttributes } from './types'\nimport type { CompatibilityAPIRestClientOptions, CompatibilityApi } from '../compatibility-api'\n\ntwilio.twiml.FaxResponse.prototype.reject = function (attributes: any) {\n  return new Reject(this.response.ele('Reject', attributes))\n}\n\nconst connectRef = twilio.twiml.VoiceResponse.prototype.connect\ntwilio.twiml.VoiceResponse.prototype.connect = function (attributes: any) {\n  const connect = connectRef.call(this, attributes)\n  connect.ai = (aIAttributes?: AIAttributes) => {\n    return new AI(connect.connect.ele('AI', aIAttributes));\n  }\n  return connect\n}\n\n/** @remarks See index.d.ts for types */\nconst RestClient = function (\n  username: string,\n  token: string,\n  opts?: CompatibilityAPIRestClientOptions\n): CompatibilityApi {\n  const host = getHost(opts)\n  // \"AC\" prefix because twilio-node requires it\n  const client = twilio('AC' + username, token, opts)\n  // @ts-expect-error - Remove \"AC\" prefix\n  client.username = username\n  // @ts-expect-error\n  client.accountSid = username\n  // @ts-expect-error\n  client.password = token\n\n  // @ts-expect-error - Replace base url\n  client.api.baseUrl = `https://${host}`\n\n  // @ts-expect-error\n  client.fax.baseUrl = `https://${host}`\n  // @ts-expect-error\n  client.fax.v1._version = `2010-04-01/Accounts/${client.accountSid}`\n\n  return client\n}\n\n// Define old properties\nconst properties = Object.getOwnPropertyNames(twilio)\nfor (let i = 0; i < properties.length; i++) {\n  const newProp = properties[i] === 'twiml' ? 'LaML' : properties[i]\n  Object.defineProperty(RestClient, newProp, {\n    value: twilio[properties[i]],\n  })\n}\n\nexport { RestClient }\n\nexport {\n  CompatibilityAPIRestClientOptions,\n  Twilio,\n  TwimlInterface,\n  JwtInterface,\n}\n", "import twilio from '../lib'\nimport TwiML from '../lib/twiml/TwiML'\n\nimport {\n  AIPostPromptAttributes,\n  AIPromptAttributes,\n  DefaultsAttributes,\n  FunctionAttributes,\n  LanguageAttributes,\n} from './types'\n\nfunction Reject(reject: any) {\n  this.reject = reject\n  this._propertyName = 'reject'\n}\nReject.prototype = Object.create(twilio.twiml.FaxResponse.prototype)\nReject.prototype.constructor = 'Reject'\n\nfunction AI(aiElement: Element) {\n  this.ai = aiElement\n  this._propertyName = 'ai'\n\n  this.setEngine = (engine: string) => {\n    this.ai.att('engine', engine)\n  }\n\n  this.setVoice = (voice: string) => {\n    this.ai.att('voice', voice)\n  }\n\n  this.setPostPromptURL = (postPromptURL: string) => {\n    this.ai.att('postPromptURL', postPromptURL)\n  }\n\n  this.setPostPromptAuthUser = (postPromptAuthUser: string) => {\n    this.ai.att('postPromptAuthUser', postPromptAuthUser)\n  }\n\n  this.setPostPromptAuthPassword = (postPromptAuthPassword: string) => {\n    this.ai.att('postPromptAuthPassword', postPromptAuthPassword)\n  }\n\n  this.setHints = (hints: string) => {\n    this.ai.att('hints', hints)\n  }\n\n  this.prompt = (text?: string) => {\n    const promptElement = this.ai.ele('Prompt', text)\n    const promptInstance = new Prompt(promptElement)\n    return promptInstance\n  }\n\n  this.prompt = (attributes?: AIPromptAttributes, text?: string) => {\n    const promptElement = this.ai.ele('Prompt', attributes, text)\n    const promptInstance = new Prompt(promptElement)\n    return promptInstance\n  }\n\n  this.postPrompt = (text: string) => {\n    const postPromptElement = this.ai.ele('PostPrompt', text)\n    const postPromptInstance = new PostPrompt(postPromptElement)\n    return postPromptInstance\n  }\n\n  this.postPrompt = (attributes: AIPostPromptAttributes, text?: string) => {\n    const postPromptElement = this.ai.ele('PostPrompt', attributes, text)\n    const postPromptInstance = new PostPrompt(postPromptElement)\n    return postPromptInstance\n  }\n\n  this.languages = (attributes: any) => {\n    return new Languages(this.ai.ele('Languages', attributes))\n  }\n\n  this.swaig = (attributes: any) => {\n    return new SWAIG(this.ai.ele('SWAIG', attributes))\n  }\n}\nAI.prototype = Object.create(TwiML.prototype)\nAI.prototype.constructor = AI\n\nfunction Prompt(promptElement: Element) {\n  this.prompt = promptElement\n  this._propertyName = 'prompt'\n\n  this.setTemperature = (temperature: number) => {\n    return this.prompt.att('temperature', temperature)\n  }\n\n  this.setTopP = (topP: number) => {\n    return this.topP.att('topP', topP)\n  }\n\n  this.setConfidence = (confidence: number) => {\n    return this.confidence.att('confidence', confidence)\n  }\n\n  this.setBargeConfidence = (bargeConfidence: number) => {\n    return this.bargeConfidence.att('bargeConfidence', bargeConfidence)\n  }\n\n  this.setPresencePenalty = (presencePenalty: number) => {\n    return this.presencePenalty.att('presencePenalty', presencePenalty)\n  }\n\n  this.setFrequencyPenalty = (frequencyPenalty: number) => {\n    return this.frequencyPenalty.att('frequencyPenalty', frequencyPenalty)\n  }\n}\nPrompt.prototype = Object.create(TwiML.prototype)\nPrompt.prototype.constructor = Prompt\n\nfunction PostPrompt(postPromptElement: Element) {\n  Prompt.call(this, postPromptElement)\n  this._propertyName = 'postPrompt'\n}\nPostPrompt.prototype = Object.create(TwiML.prototype)\nPostPrompt.prototype.constructor = PostPrompt\n\nfunction Languages(languagesElement: Element) {\n  this.languages = languagesElement\n  this._propertyName = 'languages'\n\n  this.language = (attributes: LanguageAttributes) => {\n    return new Language(this.languages.ele('Language', attributes))\n  }\n}\nLanguages.prototype = Object.create(TwiML.prototype)\nLanguages.prototype.constructor = Languages\n\nfunction Language(languageElement: Element) {\n  this.language = languageElement\n  this._propertyName = 'language'\n\n  this.setCode = (code: string) => {\n    return this.language.att('code', code)\n  }\n\n  this.setName = (name: string) => {\n    return this.language.att('name', name)\n  }\n\n  this.setVoice = (voice: string) => {\n    return this.language.att('voice', voice)\n  }\n}\nLanguage.prototype = Object.create(TwiML.prototype)\nLanguage.prototype.constructor = Language\n\nfunction SWAIG(swaigElement: Element) {\n  this.swaig = swaigElement\n  this._propertyName = 'swaig'\n\n  this.defaults = (attributes: DefaultsAttributes) => {\n    return new Defaults(this.swaig.ele('Defaults', attributes))\n  }\n\n  this.function = (attributes: FunctionAttributes) => {\n    return new Function(this.swaig.ele('Function', attributes))\n  }\n}\nSWAIG.prototype = Object.create(TwiML.prototype)\nSWAIG.prototype.constructor = SWAIG\n\nfunction Defaults(defaultsElement: Element) {\n  this.defaults = defaultsElement\n  this._propertyName = 'defaults'\n\n  this.setWebHookURL = (webHookURL: string) => {\n    return this.defaults.att('webHookURL', webHookURL)\n  }\n\n  this.setWebHookAuthUser = (webHookAuthUser: string) => {\n    return this.defaults.att('webHookAuthUser', webHookAuthUser)\n  }\n\n  this.setWebHookAuthPass = (webHookAuthPass: string) => {\n    return this.defaults.att('webHookAuthPass', webHookAuthPass)\n  }\n\n  this.addMetaData = (name: string, value: string) => {\n    return new Metadata(this.defaults.ele(name, value))\n  }\n}\nDefaults.prototype = Object.create(TwiML.prototype)\nDefaults.prototype.constructor = Defaults\n\nfunction Function(functionElement: Element) {\n  this.function = functionElement\n  this._propertyName = 'function'\n\n  this.setName = (name: string) => {\n    return this.function.att('name', name)\n  }\n\n  this.setArgument = (argument: string) => {\n    return this.function.att('argument', argument)\n  }\n\n  this.setPurpose = (purpose: string) => {\n    return this.function.att('purpose', purpose)\n  }\n\n  this.setWebHookURL = (webHookURL: string) => {\n    return this.function.att('webHookURL', webHookURL)\n  }\n\n  this.setWebHookAuthUser = (webHookAuthUser: string) => {\n    return this.function.att('webHookAuthUser', webHookAuthUser)\n  }\n\n  this.setWebHookAuthPass = (webHookAuthPass: string) => {\n    return this.function.att('webHookAuthPass', webHookAuthPass)\n  }\n\n  this.addMetaData = (name: string, value: string) => {\n    return new Metadata(this.function.ele(name, value))\n  }\n}\nFunction.prototype = Object.create(TwiML.prototype)\nFunction.prototype.constructor = Function\n\nfunction Metadata(metadataElement: Element) {\n  this.metadata = metadataElement\n  this._propertyName = 'metadata'\n}\nMetadata.prototype = Object.create(TwiML.prototype)\nMetadata.prototype.constructor = Metadata\n\nconst getHost = (opts: { signalwireSpaceUrl?: string } = {}): string => {\n  const { signalwireSpaceUrl } = opts\n  if (signalwireSpaceUrl) {\n    return signalwireSpaceUrl\n  }\n  const { SIGNALWIRE_SPACE_URL, SIGNALWIRE_API_HOSTNAME } = process.env\n  if (SIGNALWIRE_SPACE_URL) {\n    return SIGNALWIRE_SPACE_URL\n  }\n  if (SIGNALWIRE_API_HOSTNAME) {\n    return SIGNALWIRE_API_HOSTNAME\n  }\n  throw new Error(\n    'SignalWire Space URL is not configured.\\nEnter your SignalWire Space domain via the SIGNALWIRE_SPACE_URL or SIGNALWIRE_API_HOSTNAME environment variables, or specifying the property \"signalwireSpaceUrl\" in the init options.'\n  )\n}\n\nexport { getHost, Reject, AI }\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,MACE,MAAQ;AAAA,MACR,aAAe;AAAA,MACf,QAAU;AAAA,MACV,SAAW;AAAA,MACX,SAAW;AAAA,MACX,UAAY;AAAA,QACV;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,YAAc;AAAA,QACZ,MAAQ;AAAA,QACR,KAAO;AAAA,MACT;AAAA,MACA,MAAQ;AAAA,QACN,KAAO;AAAA,MACT;AAAA,MACA,UAAY;AAAA,MACZ,cAAgB;AAAA,QACd,OAAS;AAAA,QACT,OAAS;AAAA,QACT,qBAAqB;AAAA,QACrB,cAAgB;AAAA,QAChB,QAAU;AAAA,QACV,GAAK;AAAA,QACL,IAAM;AAAA,QACN,UAAY;AAAA,QACZ,MAAQ;AAAA,QACR,aAAa;AAAA,QACb,YAAc;AAAA,MAChB;AAAA,MACA,iBAAmB;AAAA,QACjB,eAAe;AAAA,QACf,SAAW;AAAA,QACX,0BAA0B;AAAA,QAC1B,QAAU;AAAA,QACV,SAAW;AAAA,QACX,SAAW;AAAA,QACX,OAAS;AAAA,QACT,QAAU;AAAA,QACV,WAAW;AAAA,QACX,MAAQ;AAAA,QACR,mBAAmB;AAAA,QACnB,KAAO;AAAA,QACP,YAAc;AAAA,QACd,YAAc;AAAA,MAChB;AAAA,MACA,SAAW;AAAA,QACT,MAAQ;AAAA,QACR,mBAAmB;AAAA,QACnB,mBAAmB;AAAA,QACnB,QAAU;AAAA,QACV,MAAQ;AAAA,QAC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,EACT;AACA,MAAI,yBAAyB;AAC3B,WAAO;AAAA,EACT;AACA,QAAM,IAAI;AAAA,IACR;AAAA,EACF;AACF;;;ADlPA,eAAqD;AAIrD,YAAAC,QAAO,MAAM,YAAY,UAAU,SAAS,SAAU,YAAiB;AACrE,SAAO,IAAI,OAAO,KAAK,SAAS,IAAI,UAAU,UAAU,CAAC;AAC3D;AAEA,IAAM,aAAa,YAAAA,QAAO,MAAM,cAAc,UAAU;AACxD,YAAAA,QAAO,MAAM,cAAc,UAAU,UAAU,SAAU,YAAiB;AACxE,QAAM,UAAU,WAAW,KAAK,MAAM,UAAU;AAChD,UAAQ,KAAK,CAAC,iBAAgC;AAC5C,WAAO,IAAI,GAAG,QAAQ,QAAQ,IAAI,MAAM,YAAY,CAAC;AAAA,EACvD;AACA,SAAO;AACT;AAGA,IAAM,aAAa,SACjB,UACA,OACA,MACkB;AAClB,QAAM,OAAO,QAAQ,IAAI;AAEzB,QAAM,aAAS,YAAAA,SAAO,OAAO,UAAU,OAAO,IAAI;AAElD,SAAO,WAAW;AAElB,SAAO,aAAa;AAEpB,SAAO,WAAW;AAGlB,SAAO,IAAI,UAAU,WAAW;AAGhC,SAAO,IAAI,UAAU,WAAW;AAEhC,SAAO,IAAI,GAAG,WAAW,uBAAuB,OAAO;AAEvD,SAAO;AACT;AAGA,IAAM,aAAa,OAAO,oBAAoB,YAAAA,OAAM;AACpD,SAAS,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;AAC1C,QAAM,UAAU,WAAW,CAAC,MAAM,UAAU,SAAS,WAAW,CAAC;AACjE,SAAO,eAAe,YAAY,SAAS;AAAA,IACzC,OAAO,YAAAA,QAAO,WAAW,CAAC,CAAC;AAAA,EAC7B,CAAC;AACH;",
  "names": ["twilio", "AuthTokenPromotionList", "AuthTokenPromotionPage", "AuthTokenPromotionInstance", "AuthTokenPromotionContext", "AwsList", "AwsPage", "AwsInstance", "AwsContext", "PublicKeyList", "PublicKeyPage", "PublicKeyInstance", "PublicKeyContext", "CredentialList", "SecondaryAuthTokenList", "SecondaryAuthTokenPage", "SecondaryAuthTokenInstance", "SecondaryAuthTokenContext", "twilio", "DependentPhoneNumberList", "DependentPhoneNumberPage", "DependentPhoneNumberInstance", "m", "result", "AddressList", "AddressPage", "AddressInstance", "AddressContext", "ApplicationList", "ApplicationPage", "ApplicationInstance", "ApplicationContext", "AuthorizedConnectAppList", "AuthorizedConnectAppPage", "AuthorizedConnectAppInstance", "AuthorizedConnectAppContext", "LocalList", "LocalPage", "LocalInstance", "MachineToMachineList", "MachineToMachinePage", "MachineToMachineInstance", "MobileList", "MobilePage", "MobileInstance", "NationalList", "NationalPage", "NationalInstance", "SharedCostList", "SharedCostPage", "SharedCostInstance", "TollFreeList", "TollFreePage", "TollFreeInstance", "VoipList", "VoipPage", "VoipInstance", "AvailablePhoneNumberCountryList", "AvailablePhoneNumberCountryPage", "AvailablePhoneNumberCountryInstance", "AvailablePhoneNumberCountryContext", "BalanceList", "BalancePage", "BalanceInstance", "EventList", "EventPage", "EventInstance", "FeedbackList", "FeedbackPage", "FeedbackInstance", "FeedbackContext", "FeedbackSummaryList", "FeedbackSummaryPage", "FeedbackSummaryInstance", "FeedbackSummaryContext", "NotificationList", "NotificationPage", "NotificationInstance", "NotificationContext", "PaymentList", "PaymentPage", "PaymentInstance", "PaymentContext", "RecordingList", "RecordingPage", "RecordingInstance", "RecordingContext", "SiprecList", "SiprecPage", "SiprecInstance", "SiprecContext", "StreamList", "StreamPage", "StreamInstance", "StreamContext", "CallList", "CallPage", "CallInstance", "CallContext", "ParticipantList", "ParticipantPage", "ParticipantInstance", "ParticipantContext", "require_recording", "RecordingList", "RecordingPage", "RecordingInstance", "RecordingContext", "ConferenceList", "ConferencePage", "ConferenceInstance", "ConferenceContext", "ConnectAppList", "ConnectAppPage", "ConnectAppInstance", "ConnectAppContext", "AssignedAddOnExtensionList", "AssignedAddOnExtensionPage", "AssignedAddOnExtensionInstance", "AssignedAddOnExtensionContext", "AssignedAddOnList", "AssignedAddOnPage", "AssignedAddOnInstance", "AssignedAddOnContext", "require_local", "LocalList", "LocalPage", "LocalInstance", "require_mobile", "MobileList", "MobilePage", "MobileInstance", "require_tollFree", "TollFreeList", "TollFreePage", "TollFreeInstance", "IncomingPhoneNumberList", "IncomingPhoneNumberPage", "IncomingPhoneNumberInstance", "IncomingPhoneNumberContext", "KeyList", "KeyPage", "KeyInstance", "KeyContext", "require_feedback", "FeedbackList", "FeedbackPage", "FeedbackInstance", "MediaList", "MediaPage", "MediaInstance", "MediaContext", "MessageList", "MessagePage", "MessageInstance", "MessageContext", "NewKeyList", "NewKeyPage", "NewKeyInstance", "NewSigningKeyList", "NewSigningKeyPage", "NewSigningKeyInstance", "require_notification", "NotificationList", "NotificationPage", "NotificationInstance", "NotificationContext", "OutgoingCallerIdList", "OutgoingCallerIdPage", "OutgoingCallerIdInstance", "OutgoingCallerIdContext", "MemberList", "MemberPage", "MemberInstance", "MemberContext", "QueueList", "QueuePage", "QueueInstance", "QueueContext", "PayloadList", "PayloadPage", "PayloadInstance", "PayloadContext", "AddOnResultList", "AddOnResultPage", "AddOnResultInstance", "AddOnResultContext", "TranscriptionList", "TranscriptionPage", "TranscriptionInstance", "TranscriptionContext", "require_recording", "RecordingList", "RecordingPage", "RecordingInstance", "RecordingContext", "ShortCodeList", "ShortCodePage", "ShortCodeInstance", "ShortCodeContext", "SigningKeyList", "SigningKeyPage", "SigningKeyInstance", "SigningKeyContext", "require_credential", "CredentialList", "CredentialPage", "CredentialInstance", "CredentialContext", "CredentialListList", "CredentialListPage", "CredentialListInstance", "CredentialListContext", "AuthCallsCredentialListMappingList", "AuthCallsCredentialListMappingPage", "AuthCallsCredentialListMappingInstance", "AuthCallsCredentialListMappingContext", "AuthCallsIpAccessControlListMappingList", "AuthCallsIpAccessControlListMappingPage", "AuthCallsIpAccessControlListMappingInstance", "AuthCallsIpAccessControlListMappingContext", "AuthTypeCallsList", "AuthRegistrationsCredentialListMappingList", "AuthRegistrationsCredentialListMappingPage", "AuthRegistrationsCredentialListMappingInstance", "AuthRegistrationsCredentialListMappingContext", "AuthTypeRegistrationsList", "AuthTypesList", "CredentialListMappingList", "CredentialListMappingPage", "CredentialListMappingInstance", "CredentialListMappingContext", "IpAccessControlListMappingList", "IpAccessControlListMappingPage", "IpAccessControlListMappingInstance", "IpAccessControlListMappingContext", "DomainList", "DomainPage", "DomainInstance", "DomainContext", "IpAddressList", "IpAddressPage", "IpAddressInstance", "IpAddressContext", "IpAccessControlListList", "IpAccessControlListPage", "IpAccessControlListInstance", "IpAccessControlListContext", "SipList", "TokenList", "TokenPage", "TokenInstance", "require_transcription", "TranscriptionList", "TranscriptionPage", "TranscriptionInstance", "TranscriptionContext", "AllTimeList", "AllTimePage", "AllTimeInstance", "DailyList", "DailyPage", "DailyInstance", "LastMonthList", "LastMonthPage", "LastMonthInstance", "MonthlyList", "MonthlyPage", "MonthlyInstance", "ThisMonthList", "ThisMonthPage", "ThisMonthInstance", "TodayList", "TodayPage", "TodayInstance", "YearlyList", "YearlyPage", "YearlyInstance", "YesterdayList", "YesterdayPage", "YesterdayInstance", "RecordList", "RecordPage", "RecordInstance", "TriggerList", "TriggerPage", "TriggerInstance", "TriggerContext", "UsageList", "ValidationRequestList", "ValidationRequestPage", "ValidationRequestInstance", "AccountList", "AccountPage", "AccountInstance", "AccountContext", "twilio", "DefaultsList", "DefaultsPage", "DefaultsInstance", "DefaultsContext", "DialogueList", "DialoguePage", "DialogueInstance", "DialogueContext", "FieldValueList", "FieldValuePage", "FieldValueInstance", "FieldValueContext", "FieldTypeList", "FieldTypePage", "FieldTypeInstance", "FieldTypeContext", "ModelBuildList", "ModelBuildPage", "ModelBuildInstance", "ModelBuildContext", "QueryList", "QueryPage", "QueryInstance", "QueryContext", "StyleSheetList", "StyleSheetPage", "StyleSheetInstance", "StyleSheetContext", "FieldList", "FieldPage", "FieldInstance", "FieldContext", "SampleList", "SamplePage", "SampleInstance", "SampleContext", "TaskActionsList", "TaskActionsPage", "TaskActionsInstance", "TaskActionsContext", "TaskStatisticsList", "TaskStatisticsPage", "TaskStatisticsInstance", "TaskStatisticsContext", "TaskList", "TaskPage", "TaskInstance", "TaskContext", "WebhookList", "WebhookPage", "WebhookInstance", "WebhookContext", "AssistantList", "AssistantPage", "AssistantInstance", "AssistantContext", "RestoreAssistantList", "RestoreAssistantPage", "RestoreAssistantInstance", "require_V1", "twilio", "require_credential", "CredentialList", "CredentialPage", "CredentialInstance", "CredentialContext", "InviteList", "InvitePage", "InviteInstance", "InviteContext", "require_member", "MemberList", "MemberPage", "MemberInstance", "MemberContext", "require_message", "MessageList", "MessagePage", "MessageInstance", "MessageContext", "ChannelList", "ChannelPage", "ChannelInstance", "ChannelContext", "RoleList", "RolePage", "RoleInstance", "RoleContext", "UserChannelList", "UserChannelPage", "UserChannelInstance", "UserList", "UserPage", "UserInstance", "UserContext", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_V1", "require_credential", "CredentialList", "CredentialPage", "CredentialInstance", "CredentialContext", "BindingList", "BindingPage", "BindingInstance", "BindingContext", "require_invite", "InviteList", "InvitePage", "InviteInstance", "InviteContext", "require_member", "MemberList", "MemberPage", "MemberInstance", "MemberContext", "require_message", "MessageList", "MessagePage", "MessageInstance", "MessageContext", "require_webhook", "WebhookList", "WebhookPage", "WebhookInstance", "WebhookContext", "require_channel", "ChannelList", "ChannelPage", "ChannelInstance", "ChannelContext", "require_role", "RoleList", "RolePage", "RoleInstance", "RoleContext", "UserBindingList", "UserBindingPage", "UserBindingInstance", "UserBindingContext", "require_userChannel", "UserChannelList", "UserChannelPage", "UserChannelInstance", "UserChannelContext", "require_user", "UserList", "UserPage", "UserInstance", "UserContext", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_channel", "ChannelList", "ChannelPage", "ChannelInstance", "ChannelContext", "twilio", "AddressConfigurationList", "AddressConfigurationPage", "AddressConfigurationInstance", "AddressConfigurationContext", "require_webhook", "WebhookList", "WebhookPage", "WebhookInstance", "WebhookContext", "ConfigurationList", "ConfigurationPage", "ConfigurationInstance", "ConfigurationContext", "DeliveryReceiptList", "DeliveryReceiptPage", "DeliveryReceiptInstance", "DeliveryReceiptContext", "require_message", "MessageList", "MessagePage", "MessageInstance", "MessageContext", "require_participant", "ParticipantList", "ParticipantPage", "ParticipantInstance", "ParticipantContext", "require_webhook", "WebhookList", "WebhookPage", "WebhookInstance", "WebhookContext", "ConversationList", "ConversationPage", "ConversationInstance", "ConversationContext", "require_credential", "CredentialList", "CredentialPage", "CredentialInstance", "CredentialContext", "ParticipantConversationList", "ParticipantConversationPage", "ParticipantConversationInstance", "require_role", "RoleList", "RolePage", "RoleInstance", "RoleContext", "require_binding", "BindingList", "BindingPage", "BindingInstance", "BindingContext", "require_notification", "NotificationList", "NotificationPage", "NotificationInstance", "NotificationContext", "require_webhook", "WebhookList", "WebhookPage", "WebhookInstance", "WebhookContext", "require_configuration", "ConfigurationList", "ConfigurationPage", "ConfigurationInstance", "ConfigurationContext", "require_deliveryReceipt", "DeliveryReceiptList", "DeliveryReceiptPage", "DeliveryReceiptInstance", "DeliveryReceiptContext", "require_message", "MessageList", "MessagePage", "MessageInstance", "MessageContext", "require_participant", "ParticipantList", "ParticipantPage", "ParticipantInstance", "ParticipantContext", "require_webhook", "WebhookList", "WebhookPage", "WebhookInstance", "WebhookContext", "require_conversation", "ConversationList", "ConversationPage", "ConversationInstance", "ConversationContext", "require_participantConversation", "ParticipantConversationList", "ParticipantConversationPage", "ParticipantConversationInstance", "require_role", "RoleList", "RolePage", "RoleInstance", "RoleContext", "UserConversationList", "UserConversationPage", "UserConversationInstance", "UserConversationContext", "require_user", "UserList", "UserPage", "UserInstance", "UserContext", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_userConversation", "UserConversationList", "UserConversationPage", "UserConversationInstance", "UserConversationContext", "require_user", "UserList", "UserPage", "UserInstance", "UserContext", "require_V1", "twilio", "EventTypeList", "EventTypePage", "EventTypeInstance", "EventTypeContext", "SchemaVersionList", "SchemaVersionPage", "SchemaVersionInstance", "SchemaVersionContext", "SchemaList", "SchemaPage", "SchemaInstance", "SchemaContext", "SinkTestList", "sid", "SinkTestPage", "SinkTestInstance", "SinkValidateList", "sid", "SinkValidatePage", "SinkValidateInstance", "SinkList", "SinkPage", "SinkInstance", "SinkContext", "SubscribedEventList", "SubscribedEventPage", "SubscribedEventInstance", "SubscribedEventContext", "SubscriptionList", "SubscriptionPage", "SubscriptionInstance", "SubscriptionContext", "require_V1", "twilio", "FaxMediaList", "FaxMediaPage", "FaxMediaInstance", "FaxMediaContext", "FaxList", "FaxPage", "FaxInstance", "FaxContext", "require_V1", "twilio", "require_channel", "ChannelList", "ChannelPage", "ChannelInstance", "ChannelContext", "require_configuration", "ConfigurationList", "ConfigurationPage", "ConfigurationInstance", "ConfigurationContext", "FlexFlowList", "FlexFlowPage", "FlexFlowInstance", "FlexFlowContext", "InteractionChannelInviteList", "InteractionChannelInvitePage", "InteractionChannelInviteInstance", "InteractionChannelParticipantList", "InteractionChannelParticipantPage", "InteractionChannelParticipantInstance", "InteractionChannelParticipantContext", "InteractionChannelList", "InteractionChannelPage", "InteractionChannelInstance", "InteractionChannelContext", "InteractionList", "InteractionPage", "InteractionInstance", "InteractionContext", "WebChannelList", "WebChannelPage", "WebChannelInstance", "WebChannelContext", "require_V1", "twilio", "require_user", "UserList", "UserPage", "UserInstance", "UserContext", "require_V1", "twilio", "AnnotationList", "AnnotationPage", "AnnotationInstance", "AnnotationContext", "CallSummaryList", "CallSummaryPage", "CallSummaryInstance", "CallSummaryContext", "require_event", "EventList", "EventPage", "EventInstance", "MetricList", "MetricPage", "MetricInstance", "require_call", "CallList", "CallPage", "CallInstance", "CallContext", "CallSummariesList", "CallSummariesPage", "CallSummariesInstance", "ConferenceParticipantList", "ConferenceParticipantPage", "ConferenceParticipantInstance", "ConferenceParticipantContext", "require_conference", "ConferenceList", "ConferencePage", "ConferenceInstance", "ConferenceContext", "require_participant", "ParticipantList", "ParticipantPage", "ParticipantInstance", "ParticipantContext", "RoomList", "RoomPage", "RoomInstance", "RoomContext", "SettingList", "SettingPage", "SettingInstance", "SettingContext", "require_V1", "twilio", "require_credential", "CredentialList", "CredentialPage", "CredentialInstance", "CredentialContext", "require_invite", "InviteList", "InvitePage", "InviteInstance", "InviteContext", "require_member", "MemberList", "MemberPage", "MemberInstance", "MemberContext", "require_message", "MessageList", "MessagePage", "MessageInstance", "MessageContext", "require_channel", "ChannelList", "ChannelPage", "ChannelInstance", "ChannelContext", "require_role", "RoleList", "RolePage", "RoleInstance", "RoleContext", "require_userChannel", "UserChannelList", "UserChannelPage", "UserChannelInstance", "require_user", "UserList", "UserPage", "UserInstance", "UserContext", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_V1", "require_credential", "CredentialList", "CredentialPage", "CredentialInstance", "CredentialContext", "require_binding", "BindingList", "BindingPage", "BindingInstance", "BindingContext", "require_invite", "InviteList", "InvitePage", "InviteInstance", "InviteContext", "require_member", "MemberList", "MemberPage", "MemberInstance", "MemberContext", "require_message", "MessageList", "MessagePage", "MessageInstance", "MessageContext", "require_webhook", "WebhookList", "WebhookPage", "WebhookInstance", "WebhookContext", "require_channel", "ChannelList", "ChannelPage", "ChannelInstance", "ChannelContext", "require_role", "RoleList", "RolePage", "RoleInstance", "RoleContext", "require_userBinding", "UserBindingList", "UserBindingPage", "UserBindingInstance", "UserBindingContext", "require_userChannel", "UserChannelList", "UserChannelPage", "UserChannelInstance", "UserChannelContext", "require_user", "UserList", "UserPage", "UserInstance", "UserContext", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_V2", "twilio", "PhoneNumberList", "PhoneNumberPage", "PhoneNumberInstance", "PhoneNumberContext", "require_V1", "twilio", "MediaProcessorList", "MediaProcessorPage", "MediaProcessorInstance", "MediaProcessorContext", "MediaRecordingList", "MediaRecordingPage", "MediaRecordingInstance", "MediaRecordingContext", "PlaybackGrantList", "sid", "PlaybackGrantPage", "PlaybackGrantInstance", "PlaybackGrantContext", "PlayerStreamerList", "PlayerStreamerPage", "PlayerStreamerInstance", "PlayerStreamerContext", "require_V1", "twilio", "BrandVettingList", "BrandVettingPage", "BrandVettingInstance", "BrandVettingContext", "BrandRegistrationList", "BrandRegistrationPage", "BrandRegistrationInstance", "BrandRegistrationContext", "DeactivationsList", "DeactivationsPage", "DeactivationsInstance", "DeactivationsContext", "ExternalCampaignList", "ExternalCampaignPage", "ExternalCampaignInstance", "AlphaSenderList", "AlphaSenderPage", "AlphaSenderInstance", "AlphaSenderContext", "require_phoneNumber", "PhoneNumberList", "PhoneNumberPage", "PhoneNumberInstance", "PhoneNumberContext", "require_shortCode", "ShortCodeList", "ShortCodePage", "ShortCodeInstance", "ShortCodeContext", "UsAppToPersonList", "UsAppToPersonPage", "UsAppToPersonInstance", "UsAppToPersonContext", "UsAppToPersonUsecaseList", "UsAppToPersonUsecasePage", "UsAppToPersonUsecaseInstance", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "UsecaseList", "UsecasePage", "UsecaseInstance", "require_V1", "twilio", "AlertList", "AlertPage", "AlertInstance", "AlertContext", "require_event", "EventList", "EventPage", "EventInstance", "EventContext", "require_V1", "twilio", "require_credential", "CredentialList", "CredentialPage", "CredentialInstance", "CredentialContext", "require_binding", "BindingList", "BindingPage", "BindingInstance", "BindingContext", "require_notification", "NotificationList", "NotificationPage", "NotificationInstance", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_V1", "twilio", "BundleCopyList", "BundleCopyPage", "BundleCopyInstance", "EvaluationList", "EvaluationPage", "EvaluationInstance", "EvaluationContext", "ItemAssignmentList", "ItemAssignmentPage", "ItemAssignmentInstance", "ItemAssignmentContext", "ReplaceItemsList", "ReplaceItemsPage", "ReplaceItemsInstance", "BundleList", "BundlePage", "BundleInstance", "BundleContext", "EndUserList", "EndUserPage", "EndUserInstance", "EndUserContext", "EndUserTypeList", "EndUserTypePage", "EndUserTypeInstance", "EndUserTypeContext", "RegulationList", "RegulationPage", "RegulationInstance", "RegulationContext", "SupportingDocumentList", "SupportingDocumentPage", "SupportingDocumentInstance", "SupportingDocumentContext", "SupportingDocumentTypeList", "SupportingDocumentTypePage", "SupportingDocumentTypeInstance", "SupportingDocumentTypeContext", "RegulatoryComplianceList", "require_V2", "twilio", "ExportConfigurationList", "ExportConfigurationPage", "ExportConfigurationInstance", "ExportConfigurationContext", "DayList", "DayPage", "DayInstance", "DayContext", "ExportCustomJobList", "ExportCustomJobPage", "ExportCustomJobInstance", "JobList", "JobPage", "JobInstance", "JobContext", "ExportList", "ExportPage", "ExportInstance", "ExportContext", "CertificateList", "CertificatePage", "CertificateInstance", "CertificateContext", "DeploymentList", "DeploymentPage", "DeploymentInstance", "DeploymentContext", "DeviceList", "DevicePage", "DeviceInstance", "DeviceContext", "require_key", "KeyList", "KeyPage", "KeyInstance", "KeyContext", "FleetList", "FleetPage", "FleetInstance", "FleetContext", "DependentHostedNumberOrderList", "DependentHostedNumberOrderPage", "DependentHostedNumberOrderInstance", "AuthorizationDocumentList", "AuthorizationDocumentPage", "AuthorizationDocumentInstance", "AuthorizationDocumentContext", "HostedNumberOrderList", "HostedNumberOrderPage", "HostedNumberOrderInstance", "HostedNumberOrderContext", "AvailableAddOnExtensionList", "AvailableAddOnExtensionPage", "AvailableAddOnExtensionInstance", "AvailableAddOnExtensionContext", "AvailableAddOnList", "AvailableAddOnPage", "AvailableAddOnInstance", "AvailableAddOnContext", "InstalledAddOnExtensionList", "InstalledAddOnExtensionPage", "InstalledAddOnExtensionInstance", "InstalledAddOnExtensionContext", "InstalledAddOnList", "InstalledAddOnPage", "InstalledAddOnInstance", "InstalledAddOnContext", "DocumentPermissionList", "DocumentPermissionPage", "DocumentPermissionInstance", "DocumentPermissionContext", "DocumentList", "DocumentPage", "DocumentInstance", "DocumentContext", "SyncListItemList", "SyncListItemPage", "SyncListItemInstance", "SyncListItemContext", "SyncListPermissionList", "SyncListPermissionPage", "SyncListPermissionInstance", "SyncListPermissionContext", "SyncListList", "SyncListPage", "SyncListInstance", "SyncListContext", "SyncMapItemList", "SyncMapItemPage", "SyncMapItemInstance", "SyncMapItemContext", "SyncMapPermissionList", "SyncMapPermissionPage", "SyncMapPermissionInstance", "SyncMapPermissionContext", "SyncMapList", "SyncMapPage", "SyncMapInstance", "SyncMapContext", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_channel", "ChannelList", "ChannelPage", "ChannelInstance", "BrandedChannelList", "BrandedChannelPage", "BrandedChannelInstance", "BrandedChannelContext", "BrandsInformationList", "BrandsInformationPage", "BrandsInformationInstance", "BrandsInformationContext", "CpsList", "CpsPage", "CpsInstance", "CpsContext", "CurrentCallList", "CurrentCallPage", "CurrentCallInstance", "CurrentCallContext", "AssistantFallbackActionsList", "AssistantFallbackActionsPage", "AssistantFallbackActionsInstance", "AssistantFallbackActionsContext", "AssistantInitiationActionsList", "AssistantInitiationActionsPage", "AssistantInitiationActionsInstance", "AssistantInitiationActionsContext", "require_dialogue", "DialogueList", "DialoguePage", "DialogueInstance", "DialogueContext", "require_fieldValue", "FieldValueList", "FieldValuePage", "FieldValueInstance", "FieldValueContext", "require_fieldType", "FieldTypeList", "FieldTypePage", "FieldTypeInstance", "FieldTypeContext", "require_modelBuild", "ModelBuildList", "ModelBuildPage", "ModelBuildInstance", "ModelBuildContext", "require_query", "QueryList", "QueryPage", "QueryInstance", "QueryContext", "require_styleSheet", "StyleSheetList", "StyleSheetPage", "StyleSheetInstance", "StyleSheetContext", "require_field", "FieldList", "FieldPage", "FieldInstance", "FieldContext", "require_sample", "SampleList", "SamplePage", "SampleInstance", "SampleContext", "require_taskActions", "TaskActionsList", "TaskActionsPage", "TaskActionsInstance", "TaskActionsContext", "require_taskStatistics", "TaskStatisticsList", "TaskStatisticsPage", "TaskStatisticsInstance", "TaskStatisticsContext", "require_task", "TaskList", "TaskPage", "TaskInstance", "TaskContext", "require_assistant", "AssistantList", "AssistantPage", "AssistantInstance", "AssistantContext", "CommandList", "CommandPage", "CommandInstance", "CommandContext", "RatePlanList", "RatePlanPage", "RatePlanInstance", "RatePlanContext", "require_usage", "UsageList", "UsagePage", "UsageInstance", "UsageContext", "SimList", "SimPage", "SimInstance", "SimContext", "twilio", "CountryList", "CountryPage", "CountryInstance", "CountryContext", "MessagingList", "MessagingPage", "MessagingInstance", "require_country", "CountryList", "CountryPage", "CountryInstance", "CountryContext", "require_phoneNumber", "PhoneNumberList", "PhoneNumberPage", "PhoneNumberInstance", "require_country", "CountryList", "CountryPage", "CountryInstance", "CountryContext", "NumberList", "NumberPage", "NumberInstance", "NumberContext", "VoiceList", "VoicePage", "VoiceInstance", "require_V1", "require_country", "CountryList", "CountryPage", "CountryInstance", "CountryContext", "require_number", "NumberList", "NumberPage", "NumberInstance", "NumberContext", "require_country", "CountryList", "CountryPage", "CountryInstance", "CountryContext", "require_number", "NumberList", "NumberPage", "NumberInstance", "NumberContext", "require_voice", "VoiceList", "VoicePage", "VoiceInstance", "require_V2", "twilio", "require_phoneNumber", "PhoneNumberList", "PhoneNumberPage", "PhoneNumberInstance", "PhoneNumberContext", "require_interaction", "InteractionList", "InteractionPage", "InteractionInstance", "InteractionContext", "MessageInteractionList", "MessageInteractionPage", "MessageInteractionInstance", "MessageInteractionContext", "require_participant", "ParticipantList", "ParticipantPage", "ParticipantInstance", "ParticipantContext", "SessionList", "SessionPage", "SessionInstance", "SessionContext", "require_shortCode", "ShortCodeList", "ShortCodePage", "ShortCodeInstance", "ShortCodeContext", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_V1", "Proxy", "twilio", "AssetVersionList", "AssetVersionPage", "AssetVersionInstance", "AssetVersionContext", "AssetList", "AssetPage", "AssetInstance", "AssetContext", "BuildStatusList", "sid", "BuildStatusPage", "BuildStatusInstance", "BuildStatusContext", "BuildList", "BuildPage", "BuildInstance", "BuildContext", "require_deployment", "DeploymentList", "DeploymentPage", "DeploymentInstance", "DeploymentContext", "LogList", "LogPage", "LogInstance", "LogContext", "VariableList", "VariablePage", "VariableInstance", "VariableContext", "EnvironmentList", "EnvironmentPage", "EnvironmentInstance", "EnvironmentContext", "FunctionVersionContentList", "sid", "FunctionVersionContentPage", "FunctionVersionContentInstance", "FunctionVersionContentContext", "FunctionVersionList", "FunctionVersionPage", "FunctionVersionInstance", "FunctionVersionContext", "FunctionList", "FunctionPage", "FunctionInstance", "FunctionContext", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_V1", "twilio", "EngagementContextList", "EngagementContextPage", "EngagementContextInstance", "EngagementContextContext", "StepContextList", "StepContextPage", "StepContextInstance", "StepContextContext", "StepList", "StepPage", "StepInstance", "StepContext", "EngagementList", "EngagementPage", "EngagementInstance", "EngagementContext", "ExecutionContextList", "ExecutionContextPage", "ExecutionContextInstance", "ExecutionContextContext", "ExecutionStepContextList", "ExecutionStepContextPage", "ExecutionStepContextInstance", "ExecutionStepContextContext", "ExecutionStepList", "ExecutionStepPage", "ExecutionStepInstance", "ExecutionStepContext", "ExecutionList", "ExecutionPage", "ExecutionInstance", "ExecutionContext", "FlowList", "FlowPage", "FlowInstance", "FlowContext", "require_V1", "require_executionContext", "ExecutionContextList", "ExecutionContextPage", "ExecutionContextInstance", "ExecutionContextContext", "require_executionStepContext", "ExecutionStepContextList", "ExecutionStepContextPage", "ExecutionStepContextInstance", "ExecutionStepContextContext", "require_executionStep", "ExecutionStepList", "ExecutionStepPage", "ExecutionStepInstance", "ExecutionStepContext", "require_execution", "ExecutionList", "ExecutionPage", "ExecutionInstance", "ExecutionContext", "FlowRevisionList", "sid", "FlowRevisionPage", "FlowRevisionInstance", "FlowRevisionContext", "FlowTestUserList", "sid", "FlowTestUserPage", "FlowTestUserInstance", "FlowTestUserContext", "require_flow", "FlowList", "FlowPage", "FlowInstance", "FlowContext", "FlowValidateList", "FlowValidatePage", "FlowValidateInstance", "require_V2", "twilio", "require_documentPermission", "DocumentPermissionList", "DocumentPermissionPage", "DocumentPermissionInstance", "DocumentPermissionContext", "require_document", "DocumentList", "DocumentPage", "DocumentInstance", "DocumentContext", "require_syncListItem", "SyncListItemList", "SyncListItemPage", "SyncListItemInstance", "SyncListItemContext", "require_syncListPermission", "SyncListPermissionList", "SyncListPermissionPage", "SyncListPermissionInstance", "SyncListPermissionContext", "require_syncList", "SyncListList", "SyncListPage", "SyncListInstance", "SyncListContext", "require_syncMapItem", "SyncMapItemList", "SyncMapItemPage", "SyncMapItemInstance", "SyncMapItemContext", "require_syncMapPermission", "SyncMapPermissionList", "SyncMapPermissionPage", "SyncMapPermissionInstance", "SyncMapPermissionContext", "require_syncMap", "SyncMapList", "SyncMapPage", "SyncMapInstance", "SyncMapContext", "StreamMessageList", "StreamMessagePage", "StreamMessageInstance", "SyncStreamList", "SyncStreamPage", "SyncStreamInstance", "SyncStreamContext", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "require_V1", "require_Sync", "twilio", "ActivityList", "ActivityPage", "ActivityInstance", "ActivityContext", "require_event", "EventList", "EventPage", "EventInstance", "EventContext", "TaskChannelList", "TaskChannelPage", "TaskChannelInstance", "TaskChannelContext", "ReservationList", "ReservationPage", "ReservationInstance", "ReservationContext", "require_task", "TaskList", "TaskPage", "TaskInstance", "TaskContext", "TaskQueueCumulativeStatisticsList", "TaskQueueCumulativeStatisticsPage", "TaskQueueCumulativeStatisticsInstance", "TaskQueueCumulativeStatisticsContext", "TaskQueueRealTimeStatisticsList", "TaskQueueRealTimeStatisticsPage", "TaskQueueRealTimeStatisticsInstance", "TaskQueueRealTimeStatisticsContext", "TaskQueueStatisticsList", "TaskQueueStatisticsPage", "TaskQueueStatisticsInstance", "TaskQueueStatisticsContext", "TaskQueuesStatisticsList", "TaskQueuesStatisticsPage", "TaskQueuesStatisticsInstance", "TaskQueueList", "TaskQueuePage", "TaskQueueInstance", "TaskQueueContext", "require_reservation", "ReservationList", "ReservationPage", "ReservationInstance", "ReservationContext", "WorkerChannelList", "WorkerChannelPage", "WorkerChannelInstance", "WorkerChannelContext", "WorkerStatisticsList", "WorkerStatisticsPage", "WorkerStatisticsInstance", "WorkerStatisticsContext", "WorkersCumulativeStatisticsList", "WorkersCumulativeStatisticsPage", "WorkersCumulativeStatisticsInstance", "WorkersCumulativeStatisticsContext", "WorkersRealTimeStatisticsList", "WorkersRealTimeStatisticsPage", "WorkersRealTimeStatisticsInstance", "WorkersRealTimeStatisticsContext", "WorkersStatisticsList", "WorkersStatisticsPage", "WorkersStatisticsInstance", "WorkersStatisticsContext", "WorkerList", "WorkerPage", "WorkerInstance", "WorkerContext", "WorkflowCumulativeStatisticsList", "WorkflowCumulativeStatisticsPage", "WorkflowCumulativeStatisticsInstance", "WorkflowCumulativeStatisticsContext", "WorkflowRealTimeStatisticsList", "WorkflowRealTimeStatisticsPage", "WorkflowRealTimeStatisticsInstance", "WorkflowRealTimeStatisticsContext", "WorkflowStatisticsList", "WorkflowStatisticsPage", "WorkflowStatisticsInstance", "WorkflowStatisticsContext", "WorkflowList", "WorkflowPage", "WorkflowInstance", "WorkflowContext", "WorkspaceCumulativeStatisticsList", "WorkspaceCumulativeStatisticsPage", "WorkspaceCumulativeStatisticsInstance", "WorkspaceCumulativeStatisticsContext", "WorkspaceRealTimeStatisticsList", "WorkspaceRealTimeStatisticsPage", "WorkspaceRealTimeStatisticsInstance", "WorkspaceRealTimeStatisticsContext", "WorkspaceStatisticsList", "WorkspaceStatisticsPage", "WorkspaceStatisticsInstance", "WorkspaceStatisticsContext", "WorkspaceList", "WorkspacePage", "WorkspaceInstance", "WorkspaceContext", "require_V1", "twilio", "require_credentialList", "CredentialListList", "CredentialListPage", "CredentialListInstance", "CredentialListContext", "require_ipAccessControlList", "IpAccessControlListList", "IpAccessControlListPage", "IpAccessControlListInstance", "IpAccessControlListContext", "OriginationUrlList", "OriginationUrlPage", "OriginationUrlInstance", "OriginationUrlContext", "require_phoneNumber", "PhoneNumberList", "PhoneNumberPage", "PhoneNumberInstance", "PhoneNumberContext", "require_recording", "RecordingList", "RecordingPage", "RecordingInstance", "RecordingContext", "TrunkList", "TrunkPage", "TrunkInstance", "TrunkContext", "require_V1", "twilio", "CustomerProfilesChannelEndpointAssignmentList", "CustomerProfilesChannelEndpointAssignmentPage", "CustomerProfilesChannelEndpointAssignmentInstance", "CustomerProfilesChannelEndpointAssignmentContext", "CustomerProfilesEntityAssignmentsList", "CustomerProfilesEntityAssignmentsPage", "CustomerProfilesEntityAssignmentsInstance", "CustomerProfilesEntityAssignmentsContext", "CustomerProfilesEvaluationsList", "CustomerProfilesEvaluationsPage", "CustomerProfilesEvaluationsInstance", "CustomerProfilesEvaluationsContext", "CustomerProfilesList", "CustomerProfilesPage", "CustomerProfilesInstance", "CustomerProfilesContext", "require_endUser", "EndUserList", "EndUserPage", "EndUserInstance", "EndUserContext", "require_endUserType", "EndUserTypeList", "EndUserTypePage", "EndUserTypeInstance", "EndUserTypeContext", "PoliciesList", "PoliciesPage", "PoliciesInstance", "PoliciesContext", "require_supportingDocument", "SupportingDocumentList", "SupportingDocumentPage", "SupportingDocumentInstance", "SupportingDocumentContext", "require_supportingDocumentType", "SupportingDocumentTypeList", "SupportingDocumentTypePage", "SupportingDocumentTypeInstance", "SupportingDocumentTypeContext", "TrustProductsChannelEndpointAssignmentList", "TrustProductsChannelEndpointAssignmentPage", "TrustProductsChannelEndpointAssignmentInstance", "TrustProductsChannelEndpointAssignmentContext", "TrustProductsEntityAssignmentsList", "TrustProductsEntityAssignmentsPage", "TrustProductsEntityAssignmentsInstance", "TrustProductsEntityAssignmentsContext", "TrustProductsEvaluationsList", "TrustProductsEvaluationsPage", "TrustProductsEvaluationsInstance", "TrustProductsEvaluationsContext", "TrustProductsList", "TrustProductsPage", "TrustProductsInstance", "TrustProductsContext", "require_V1", "twilio", "FormList", "FormPage", "FormInstance", "FormContext", "AccessTokenList", "AccessTokenPage", "AccessTokenInstance", "AccessTokenContext", "require_notification", "NotificationList", "NotificationPage", "NotificationInstance", "ChallengeList", "ChallengePage", "ChallengeInstance", "ChallengeContext", "FactorList", "FactorPage", "FactorInstance", "FactorContext", "NewFactorList", "NewFactorPage", "NewFactorInstance", "EntityList", "EntityPage", "EntityInstance", "EntityContext", "MessagingConfigurationList", "MessagingConfigurationPage", "MessagingConfigurationInstance", "MessagingConfigurationContext", "BucketList", "BucketPage", "BucketInstance", "BucketContext", "RateLimitList", "RateLimitPage", "RateLimitInstance", "RateLimitContext", "VerificationCheckList", "VerificationCheckPage", "VerificationCheckInstance", "VerificationList", "VerificationPage", "VerificationInstance", "VerificationContext", "require_webhook", "WebhookList", "WebhookPage", "WebhookInstance", "WebhookContext", "require_service", "ServiceList", "ServicePage", "ServiceInstance", "ServiceContext", "TemplateList", "TemplatePage", "TemplateInstance", "VerificationAttemptList", "VerificationAttemptPage", "VerificationAttemptInstance", "VerificationAttemptContext", "VerificationAttemptsSummaryList", "VerificationAttemptsSummaryPage", "VerificationAttemptsSummaryInstance", "VerificationAttemptsSummaryContext", "require_V2", "twilio", "CompositionHookList", "CompositionHookPage", "CompositionHookInstance", "CompositionHookContext", "CompositionList", "CompositionPage", "CompositionInstance", "CompositionContext", "CompositionSettingsList", "CompositionSettingsPage", "CompositionSettingsInstance", "CompositionSettingsContext", "require_recording", "RecordingList", "RecordingPage", "RecordingInstance", "RecordingContext", "RecordingSettingsList", "RecordingSettingsPage", "RecordingSettingsInstance", "RecordingSettingsContext", "PublishedTrackList", "PublishedTrackPage", "PublishedTrackInstance", "PublishedTrackContext", "SubscribeRulesList", "SubscribeRulesPage", "SubscribeRulesInstance", "SubscribedTrackList", "SubscribedTrackPage", "SubscribedTrackInstance", "SubscribedTrackContext", "ParticipantList", "ParticipantPage", "ParticipantInstance", "ParticipantContext", "RecordingRulesList", "RecordingRulesPage", "RecordingRulesInstance", "require_recording", "RoomRecordingList", "RoomRecordingPage", "RoomRecordingInstance", "RoomRecordingContext", "require_room", "RoomList", "RoomPage", "RoomInstance", "RoomContext", "require_V1", "twilio", "ArchivedCallList", "ArchivedCallPage", "ArchivedCallInstance", "ArchivedCallContext", "ByocTrunkList", "ByocTrunkPage", "ByocTrunkInstance", "ByocTrunkContext", "ConnectionPolicyTargetList", "ConnectionPolicyTargetPage", "ConnectionPolicyTargetInstance", "ConnectionPolicyTargetContext", "ConnectionPolicyList", "ConnectionPolicyPage", "ConnectionPolicyInstance", "ConnectionPolicyContext", "BulkCountryUpdateList", "BulkCountryUpdatePage", "BulkCountryUpdateInstance", "HighriskSpecialPrefixList", "HighriskSpecialPrefixPage", "HighriskSpecialPrefixInstance", "require_country", "CountryList", "CountryPage", "CountryInstance", "CountryContext", "SettingsList", "SettingsPage", "SettingsInstance", "SettingsContext", "DialingPermissionsList", "IpRecordList", "IpRecordPage", "IpRecordInstance", "IpRecordContext", "SourceIpMappingList", "SourceIpMappingPage", "SourceIpMappingInstance", "SourceIpMappingContext", "require_V1", "twilio", "require_command", "CommandList", "CommandPage", "CommandInstance", "CommandContext", "require_ratePlan", "RatePlanList", "RatePlanPage", "RatePlanInstance", "RatePlanContext", "DataSessionList", "DataSessionPage", "DataSessionInstance", "UsageRecordList", "UsageRecordPage", "UsageRecordInstance", "require_sim", "SimList", "SimPage", "SimInstance", "SimContext", "require_usageRecord", "UsageRecordList", "UsageRecordPage", "UsageRecordInstance", "require_V1", "require_Wireless", "twilio", "EsimProfileList", "EsimProfilePage", "EsimProfileInstance", "EsimProfileContext", "require_fleet", "FleetList", "FleetPage", "FleetInstance", "FleetContext", "IpCommandList", "IpCommandPage", "IpCommandInstance", "IpCommandContext", "NetworkAccessProfileNetworkList", "NetworkAccessProfileNetworkPage", "NetworkAccessProfileNetworkInstance", "NetworkAccessProfileNetworkContext", "NetworkAccessProfileList", "NetworkAccessProfilePage", "NetworkAccessProfileInstance", "NetworkAccessProfileContext", "NetworkList", "NetworkPage", "NetworkInstance", "NetworkContext", "BillingPeriodList", "BillingPeriodPage", "BillingPeriodInstance", "require_sim", "SimList", "SimPage", "SimInstance", "SimContext", "SmsCommandList", "SmsCommandPage", "SmsCommandInstance", "SmsCommandContext", "require_usageRecord", "UsageRecordList", "UsageRecordPage", "UsageRecordInstance", "require_V1", "twilio", "require_exportConfiguration", "ExportConfigurationList", "ExportConfigurationPage", "ExportConfigurationInstance", "ExportConfigurationContext", "require_day", "DayList", "DayPage", "DayInstance", "DayContext", "require_exportCustomJob", "ExportCustomJobList", "ExportCustomJobPage", "ExportCustomJobInstance", "require_job", "JobList", "JobPage", "JobInstance", "JobContext", "require_export", "ExportList", "ExportPage", "ExportInstance", "ExportContext", "require_V1", "twilio", "Twilio", "Proxy", "RestClient", "TwiML", "TwiML", "Reject", "Prompt", "TwiML", "TwiML", "Twilio", "import_lib", "twilio", "TwiML", "twilio"]
}
